MQinoMiCompleteDataReaderFast.hh

Go to the documentation of this file.
00001 
00053 #ifndef _Q_QINOMICOMPLETEDATAREADERFAST_HH
00054 #define _Q_QINOMICOMPLETEDATAREADERFAST_HH
00055 
00056 #include "QReader.hh"
00057 #include "MQinoMiNtpReader.hh"
00058 #include "QCuore.hh"
00059 #include <string>
00060 #include <vector>
00061 #include "zlib.h"
00062 
00063 //structure for file name and characteristics needed for appropriate 
00064 // reading
00065 struct QFile_t {
00066         std::string filename;
00067         bool isDiff;
00068 };
00069 
00071 struct QBinRecStruct_t {
00072         char cHeader[8];        
00073         short chan;     
00074         unsigned short pulseTime1;
00075         unsigned short pulseTime2;
00076         short first_sampl; 
00077         short sampl[1023]; 
00078 };
00079 
00080 class MQinoMiCompleteDataReaderFast : public QReader {
00081 
00082         public:
00083                 MQinoMiCompleteDataReaderFast(QSequence* s);
00084 
00085                 virtual ~MQinoMiCompleteDataReaderFast();
00086 
00087                 // Init method is called before event loop
00088                 void Init();
00089 
00090                 // Doit method is called for each event, getting the event as argument
00091                 QEvent* Do( QEvent* ev);
00092 
00093                 // Done method is called after event loop
00094                 void Done();
00095 
00096                 // Jump to Event . Partial to jump is stored in fPartialToJump
00097                 const QError& ReadEvent(int event);
00098                 const QError& ReadFile();
00099                 QEvent* FillEvent( QEvent* ev);
00100 
00101 
00102         private:
00103 
00105                 void NewRun();
00106 
00107                 // Maria 130309
00108                 //int fMinAdcRange, fMaxAdcRange;
00109                 float fMinAdcRange, fMaxAdcRange;
00110                 int fNumSamples;
00111         float fSamplingFrequency;
00112                 Int_t frecord_size;
00113                 std::string fRunNumber;
00114                 std::vector<QFile_t> files;
00115 
00117                 std::vector<QFile_t>::iterator filesIter;
00118 
00120                 std::vector<QFile_t>::iterator filesEnd;
00121 
00123                 std::vector<std::string>::iterator fIter;
00124 
00127                 std::string fFileUName;
00128 
00130                 gzFile fCurrentFile;
00131 
00133                 int fRunEventNumber;
00134 
00135                 /*@brief used to fill the run list*/ 
00136                 struct QFile_t f;
00137 
00138                 /*@brief identifier of the current run, as listed in the file list*/
00139                 std::string fName;
00140 
00141                 /*@brief date of the current run */ 
00142                 std::string fDate;
00143 
00144                 /*@brief number of pre trigger samples */ 
00145         size_t fPreTriggerSamples;
00146 
00147         /*@brief true if the input file is a noise one */ 
00148         size_t fIsNoise;
00149 
00151         bool fSaveInAuxData;
00152 
00154         QDbDetector::DetectorName fDetector;
00155 
00157         char *fTimeZone;
00158 
00159 
00160         // MARIA
00161         int fPartialToJump;
00162         int fRunToJump;
00163         MQinoMiNtpReader* fNtpReader;
00164         char * fBuffer;
00165         int fEventsInFile;
00166         int fEventsRead;
00167 
00168 
00169 };
00170 
00171 
00172 #endif

Generated on Tue Nov 16 10:49:59 2010 for CUORE Software by  doxygen 1.5.6