MQinoNtpReader.hh

Go to the documentation of this file.
00001 
00040 #ifndef _Q_QINONTPREADER_HH
00041 #define _Q_QINONTPREADER_HH
00042 
00043 #include "QReader.hh"
00044 #include "QCuore.hh"
00045 #include "QDbDetector.hh"
00046 #include "TChain.h"
00047 #include "TFile.h"
00048 
00049 struct ntp_t{
00050         short ch;
00051         short part;
00052         int ev;
00053         int meas;
00054         unsigned int utime;
00055         unsigned int ftime;
00056         float tdamp;
00057         float fdamp;
00058         float secpeakamp;
00059         float tvl;
00060         float tvr;
00061         float delay;
00062         float spdelay;
00063         float baseline;
00064         float baselineRMS;
00065         float maxmin;
00066         float rt;
00067         float dt;
00068         float afamp;
00069         float aftv;
00070         int type;
00071 };
00072 
00073 class MQinoNtpReader: public QReader {
00074 
00075         public:
00076 
00077                 MQinoNtpReader(QSequence* s);
00078 
00079                 virtual ~MQinoNtpReader();
00080 
00081                 // Init method is called before event loop
00082                 virtual void Init();
00083 
00084                 // Doit method is called for each event, getting the event as argument
00085                 virtual QEvent* Do( QEvent* ev);
00086 
00087                 // Done method is called after event loop
00088                 virtual void Done();
00089 
00090                 const QError& JumpToEvent(unsigned int event);
00091 
00092 
00093         private:
00094 
00097                 int GetNextEvNumber();
00098 
00099         void DontWriteTimes();
00100 
00102                 unsigned int fEvents;
00103 
00105                 struct ntp_t fNtp;
00106 
00108                 float fStabAmp;
00109 
00111                 TChain* fChain;
00112 
00113 
00115                 unsigned int fStartRunUnix;
00116 
00118                 int fFileUID;
00119 
00121                 bool fReadStabilizedNtuples;
00123                 bool fLoadInAux;
00124 
00126                 bool fIsStabilized;
00127 
00128                 /* brief temporary variable used to decode the fNtp.type flag*/
00129                 int fFlag;
00130 
00131                 /* if true, the times are not written in the event. Needed with the CompleteDataReader */
00132                 bool fDontWriteTimes; 
00133 
00135         unsigned int fPartialSize;
00136 
00138         QDbDetector::DetectorName fDetector;
00139 
00140                 friend class MQinoCompleteDataReader;
00141 
00142                 Double_t fMaxChan;
00143                 Double_t fDuration;
00144 
00145 };
00146 
00147 #endif
00148 

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