File indexing completed on 2024-04-06 11:56:00
0001 #ifndef CocoaDaqReaderRoot_h
0002 #define CocoaDaqReaderRoot_h
0003 #include "TFile.h"
0004 #include "TTree.h"
0005 #include "Alignment/CocoaDaq/interface/CocoaDaqReader.h"
0006 class CocoaDaqRootEvent;
0007 class AliDaqPosition2D;
0008 class AliDaqPositionCOPS;
0009 class AliDaqTilt;
0010 class AliDaqDistance;
0011 class OpticalAlignMeasurementInfo;
0012
0013 class CocoaDaqReaderRoot : public CocoaDaqReader {
0014 public:
0015 CocoaDaqReaderRoot(const std::string& m_inFileName);
0016 ~CocoaDaqReaderRoot() override;
0017 bool ReadNextEvent() override;
0018 bool ReadEvent(int nev) override;
0019 void BuildMeasurementsFromOptAlign(std::vector<OpticalAlignMeasurementInfo>& measList) override;
0020
0021 public:
0022 int GetNEvents() const { return nev; }
0023
0024 private:
0025 OpticalAlignMeasurementInfo GetMeasFromPosition2D(AliDaqPosition2D* pos2D);
0026 OpticalAlignMeasurementInfo GetMeasFromPositionCOPS(AliDaqPositionCOPS* posCOPS);
0027 OpticalAlignMeasurementInfo GetMeasFromTilt(AliDaqTilt* tilt);
0028 OpticalAlignMeasurementInfo GetMeasFromDist(AliDaqDistance* dist);
0029
0030 private:
0031 CocoaDaqRootEvent* theEvent;
0032 TFile* theFile;
0033 TTree* theTree;
0034 int nev;
0035 int nextEvent;
0036 };
0037
0038 #endif