MLightRootFileReader.hh
Go to the documentation of this file.00001 #ifndef _M_ROOTFILEREADER2_HH_
00002 #define _M_ROOTFILEREADER2_HH_
00003
00059 #include "QFileReader.hh"
00060 #include <list>
00061 #include <TObjString.h>
00062 #include "MRootFileReader.hh"
00063 #include "QRootFileReaderCommon.hh"
00064
00065 namespace Cuore {class QEvent;}
00066
00067 class TFile;
00068 class QTree;
00069 class QObjectR;
00070 class QBaseEventR;
00071 class TEventList;
00072
00073 class MLightRootFileReader : public QFileReader, public QRootFileReaderCommon {
00074
00075 public:
00077 MLightRootFileReader(QSequence* s);
00078
00080 ~MLightRootFileReader();
00081
00083 void Open(const std::string& filename);
00084
00086 QEvent* Fill(QEvent* ev);
00087
00089 void Close();
00090
00091 private:
00093 QTree* fTree;
00094 QBaseEventR* fEventR;
00095 Long64_t fEvents;
00096 bool fLightening;
00097 TEventList* fEventList;
00098 bool fUseCutsFile;
00099
00100 template<class T> class Datum {
00101 public:
00102 Datum(const std::string& name) { fName = name; }
00103 std::string fName;
00104 T fObj;
00105
00106 QObject* fQObj;
00107 };
00108
00109 void SetBranchesCache();
00110 void ClearBranchesCache();
00111 std::list<Datum<int> > fIntList;
00112 std::list<Datum<double> > fDoubleList;
00113 std::list<Datum<float> > fFloatList;
00114 std::list<Datum<bool> > fBoolList;
00115 std::list<Datum<TObjString*> > fStringList;
00116 std::list<Datum<QObjectR*> > fQObjectList;
00117 std::list<Datum<TObject*> > fTObjectList;
00118
00119 friend class LRootGlobalReader;
00120 };
00121
00122 #endif
00123