MQinoMiNtpWriter.hh

Go to the documentation of this file.
00001 
00047 #ifndef MQINO_Mi_NTPWRITER_HH
00048 #define MQINO_Mi_NTPWRITER_HH
00049 
00050 #include "QFileWriter.hh"
00051 #include "QCuore.hh"
00052 #include "QTime.hh"
00053 #include <cmath>
00054 #include <cstring>
00055 #include <TFile.h>
00056 #include <TBranch.h>
00057 #include <TTree.h>
00058 #include <QEvent.hh>
00059 #include <iostream>
00060 #include <fstream>
00061 #include <iomanip>
00062 #include <cstdlib>
00063 #include <cstdio>
00064 
00065 
00066 //class TFile;
00067 //class TTree;
00068 //class TBranch;
00069 
00070 
00071 /*
00072 struct ntpw_t{
00073         short ch;
00074         short part;
00075         int ev;
00076         int meas;
00077         unsigned int utime;
00078         unsigned int ftime;
00079         float tdamp;
00080         float fdamp;
00081         float secpeakamp;
00082         float tvl;
00083         float tvr;
00084         float delay;
00085         float spdelay;
00086         float baseline;
00087         float baselineRMS;
00088         float maxmin;
00089         float rt;
00090         float dt;
00091         float afamp;
00092         float aftv;
00093         int type;
00094 };
00095 */
00096 
00097 class MQinoMiNtpWriter : public QFileWriter{
00098 
00099         public:
00100                 MQinoMiNtpWriter(QSequence *s);
00101 
00102                 virtual ~MQinoMiNtpWriter();
00103                 
00104                 void Open(const std::string& filename);
00105 
00106                 void Dump(const QEvent& ev);
00107 
00108                 void Close();
00109                 //QTime time();
00110         private:
00111                 fstream fpp;
00112                 int fEventNumber;
00113                 
00114                 int fEvCnt;
00115                 struct npt_t{
00116                         UShort_t ev;
00117                         UChar_t part;
00118                         UChar_t ch;
00119                         Float_t parf[16];
00120                 };
00121                 struct headm{
00122                         Char_t ch1[4];
00123                         Char_t ch2[4];
00124                         Char_t ch3[4];
00125                         UInt_t date;
00126                         Float_t f[13];
00127                 };
00128                 struct headp{
00129                         Char_t text[44];
00130                         Float_t f[6];
00131                 };
00132 
00133                 npt_t fNtp;
00134                 headm fHM;
00135                 headp fHP;
00136                 
00138                 ULong64_t fStartRunUnix;
00139                 
00140                 int fPartialSize;
00141         bool fWriteStab;
00142 
00143 
00144 };
00145 
00146 #endif

Generated on Tue Nov 16 10:50:00 2010 for CUORE Software by  doxygen 1.5.6