#ifndef __FDTOOLS_H #define __FDTOOLS_H #include #include #include #include #include "Version.h" class FdT3 { public : FdT3(TEyeEventHeader *h, int fileId = 0, int pos = 0) { Run = h->GetRunNo(); Id = h->GetEventNo(); T3Id = h->GetT3Id(); Sec = h->GetTimeStamp()->GetSec(); Nano = h->GetTimeStamp()->GetNanoSec(); T3Sec = h->GetT3TimeStamp()->GetSec(); T3Nano = h->GetT3TimeStamp()->GetNanoSec(); Eye = h->GetEyeNo(); type = h->GetEventClass(); FileId = fileId; Saved = -1; Matched = 0; Pos = pos; } void Dump (ostream& ostr=cout); bool operator <(const FdT3 &right) const { if(Sec == right.Sec) return (Nano < right.Nano); else return (Sec < right.Sec); }; bool operator >(const FdT3 &right) const { if(Sec == right.Sec) return (Nano > right.Nano); else return (Sec > right.Sec); }; bool operator <=(const FdT3 &right) const { if(Sec == right.Sec) return (Nano <= right.Nano); else return (Sec <= right.Sec); }; bool operator >=(const FdT3 &right) const { if(Sec == right.Sec) return (Nano >= right.Nano); else return (Sec >= right.Sec); }; UInt_t Run, Id, T3Id, Sec, Nano, T3Sec, T3Nano, Eye; int FileId, Pos; int Saved, Matched; TEyeEventHeader::EEventClass type; }; int FdToolsBuildFilteredFdFileList(char *sdmFile, std::vector &fileNamess,bool lyon, bool laser=false); int FdToolsBuildFdFileList(char *sdmFile, std::vector &fileNamess, bool lyon, bool laser=false); int FdToolsBuildFdT3List(std::vector &fileNamess, std::vector&); TEyeEvent *FdToolsGetEyeEvent(FdT3 &t, std::vector &fileNames); #endif