MRootNtpDumper.hh

Go to the documentation of this file.
00001 #ifndef _M_ROOTNTPDUMPER_HH_
00002 #define _M_ROOTNTPDUMPER_HH_
00003 
00053 #include "QFileWriter.hh"
00054 
00055 class TFile;
00056 class TTree;
00057 class QEventR;
00058 class QObjectR;
00059 class TObject;
00060 class TObjString;
00061 
00062 class MRootNtpDumper : public QFileWriter {
00063 
00064     public:
00066         MRootNtpDumper(QSequence* s);
00067 
00069         ~MRootNtpDumper();
00070 
00072         void Open(const std::string& filename);
00073 
00075         void Dump(const QEvent& ev);
00076 
00078         void Close();
00079 
00080     private:
00081         TFile* fRootOutput;
00082         QEventR* fEventR;
00083         TTree* fTree;
00084         std::string fFileName;
00085         bool fFirstDumpCall;
00086 
00087         // aux data
00088         template<class T> class Datum {
00089             public:
00090                 Datum(const std::string& name) { fName = name; }
00091                 std::string fName;
00092                 T fObj;
00093         };
00094 
00095         std::list<Datum<int> > fIntList;
00096         std::list<Datum<double> > fDoubleList;
00097         std::list<Datum<float> > fFloatList;
00098         std::list<Datum<bool> > fBoolList;
00099         std::list<Datum<TObjString*> > fStringList;
00100         std::list<Datum<QObjectR*> > fQObjectList;
00101         std::list<Datum<const TObject*> > fTObjectList;
00102 
00103 
00104 };
00105 
00106 #endif
00107 

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