00001 00002 // Author : florent robinet (LAL - Orsay): robinet@lal.in2p3.fr 00004 #ifndef __ReadTriggerSegments__ 00005 #define __ReadTriggerSegments__ 00006 00007 #include "Chain.h" 00008 #include "Segments.h" 00009 00010 using namespace std; 00011 00021 class ReadTriggerSegments { 00022 00023 public: 00024 00038 ReadTriggerSegments(const string apattern, const string adirectory="", const int averbose=0); 00039 00043 virtual ~ReadTriggerSegments(void); 00053 inline Segments *GetSegments(void){ return Seg; }; 00054 00062 string GetTriggerFiles(const double astart, const double astop); 00063 00067 inline int GetNTrees(void){ return Ninfiles; };// returns the number of trees 00068 00072 inline int GetNFiles(void){ return Ninfiles; };// returns the number of files 00073 00078 inline double* GetFileStarts(void){ return Tstart; };// get file starts 00079 00084 inline double* GetFileStops(void){ return Tstop; };// get file stops 00085 00090 inline double* GetTreeStarts(void){ return Tstart; };// get Tree starts 00091 00096 inline double* GetTreeStops(void){ return Tstop; };// get Tree stops 00097 00102 inline double GetTimeMin(void){return fTimeMin;};// get min time 00103 00108 inline double GetTimeMax(void){return fTimeMax;}; 00109 00114 inline void SetVerbose(const int averbose){ fverbose=averbose; }; 00115 00121 bool SetNewPattern(const string apattern); 00122 00123 00124 protected: 00125 00126 // STATUS 00127 bool status_OK; 00128 00129 // PARAMETERS 00130 int fverbose; 00131 string fpattern; 00132 string fdir; 00133 int randid; 00134 string srandid; 00135 00136 // SEGMENTS 00137 Segments *Seg; 00138 double *Tstart; 00139 double *Tstop; 00140 vector <string> frootfilename; 00141 00142 // META 00143 int Ninfiles; 00144 double fTimeMin; 00145 double fTimeMax; 00146 00147 private: 00148 bool GetInputSegments(); 00149 00150 ClassDef(ReadTriggerSegments,0) 00151 }; 00152 00153 #endif 00154 00155