00001 #ifndef _ots_MonicelliFileReader_h 00002 #define _ots_MonicelliFileReader_h 00003 00004 #include <string> 00005 #include <TApplication.h> 00006 00007 class TFile; 00008 class TTree; 00009 class TBranch; 00010 namespace monicelli 00011 { 00012 class Event; 00013 class EventHeader; 00014 class Geometry; 00015 } 00016 00017 namespace ots 00018 { 00019 00020 class MonicelliFileReader 00021 { 00022 public: 00023 MonicelliFileReader(); 00024 ~MonicelliFileReader(); 00025 00026 bool openGeoFile (std::string fileName); 00027 bool openEventsFile (std::string fileName); 00028 void closeGeoFile (void); 00029 void closeEventsFile (void); 00030 unsigned int getNumberOfEvents (void); 00031 std::string getFileName (void); 00032 void readEvent (unsigned int event); 00033 monicelli::Event* getEventPointer (void); 00034 monicelli::EventHeader* getEventHeaderPointer(void); 00035 monicelli::Geometry* getGeometryPointer (void); 00036 00037 private: 00038 int argv; 00039 char** argc; 00040 TApplication theApp_ ; 00041 TFile* theGeoFile_ ; 00042 TFile* theEventsFile_ ; 00043 TTree* inputGeometryTree_; 00044 TTree* inputEventTree_ ; 00045 TTree* inputEventHeader_ ; 00046 00047 monicelli::Event* theEvent_ ; 00048 monicelli::EventHeader* theEventHeader_ ; 00049 monicelli::Geometry* theGeometry_ ; 00050 TBranch* theEventBranch_ ; 00051 TTree* theEventTree_ ; 00052 } ; 00053 00054 } 00055 #endif