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                 int fMinAdcRange, fMaxAdcRange;
00108                 int fNumSamples;
00109         float fSamplingFrequency;
00110                 Int_t frecord_size;
00111                 std::string fRunNumber;
00112                 std::vector<QFile_t> files;
00113 
00115                 std::vector<QFile_t>::iterator filesIter;
00116 
00118                 std::vector<QFile_t>::iterator filesEnd;
00119 
00121                 std::vector<std::string>::iterator fIter;
00122 
00125                 std::string fFileUName;
00126 
00128                 gzFile fCurrentFile;
00129 
00131                 int fRunEventNumber;
00132 
00133                 /*@brief used to fill the run list*/ 
00134                 struct QFile_t f;
00135 
00136                 /*@brief identifier of the current run, as listed in the file list*/
00137                 std::string fName;
00138 
00139                 /*@brief date of the current run */ 
00140                 std::string fDate;
00141 
00142                 /*@brief number of pre trigger samples */ 
00143         size_t fPreTriggerSamples;
00144 
00145         /*@brief true if the input file is a noise one */ 
00146         size_t fIsNoise;
00147 
00149         bool fSaveInAuxData;
00150 
00152         QDbDetector::DetectorName fDetector;
00153 
00155         char *fTimeZone;
00156 
00157 
00158         // MARIA
00159         int fPartialToJump;
00160         int fRunToJump;
00161         MQinoMiNtpReader* fNtpReader;
00162         char * fBuffer;
00163         int fEventsInFile;
00164         int fEventsRead;
00165 
00166 
00167 };
00168 
00169 
00170 #endif

Generated on Fri Mar 6 13:40:40 2009 for CUORE Software by  doxygen 1.5.1