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 aTimeMin, const double aTimeMax); 00063 00067 inline int GetNTrees(void){ return (int)triggerfilename.size(); }; 00068 00072 inline int GetNFiles(void){ return (int)triggerfilename.size(); }; 00073 00078 inline double* GetFileStarts(void){ return Tstart; }; 00079 00084 inline double* GetFileStops(void){ return Tstop; }; 00085 00090 inline double* GetTreeStarts(void){ return Tstart; }; 00091 00096 inline double* GetTreeStops(void){ return Tstop; }; 00097 00102 inline double GetTimeMin(void){return fTimeMin;}; 00103 00108 inline double GetTimeMax(void){return fTimeMax;}; 00109 00114 inline void SetVerbose(const int aVerbose){ Verbose=aVerbose; }; 00115 00121 bool SetNewPattern(const string aPattern); 00122 00126 inline bool GetStatus(void){ return status_OK; }; 00127 00131 inline int GetTriggerID(void){ return randid; }; 00132 00136 inline string GetTriggerStringID(void){ return srandid; }; 00137 00138 protected: 00139 00140 // STATUS 00141 bool status_OK; 00142 00143 // PARAMETERS 00144 int Verbose; 00145 string Pattern; 00146 string Dir; 00147 int randid; 00148 string srandid; 00149 00150 // SEGMENTS 00151 Segments *Seg; 00152 double *Tstart; 00153 double *Tstop; 00154 vector <string> triggerfilename; 00155 Segments *Gaps; 00156 00157 // META 00158 //int Ninfiles; ///< number of input files 00159 double fTimeMin; 00160 double fTimeMax; 00161 00162 private: 00163 bool GetInputSegments(void); 00164 00165 ClassDef(ReadTriggerSegments,0) 00166 }; 00167 00168 #endif 00169 00170