BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
EsTimeCalibData.h
Go to the documentation of this file.
1#ifndef CalibData_EsTimeCalibData_h
2#define CalibData_EsTimeCalibData_h
3
4/* @class CalibData_EsTimeCalibData_h
5
6 calibration data class
7 calibration infrastructure
8
9*/
10
13#include <vector>
14
15using namespace std;
16
17namespace CalibData {
19
20 public:
22 virtual ~EsTimeCalibData(){
23 if( m_TestCalibConst) { delete m_TestCalibConst; }
24 if( m_toffsetb.size()>0 ) { m_toffsetb.clear(); }
25 if( m_toffsete.size()>0 ) { m_toffsete.clear(); }
26 if( m_bunchtime.size()>0 ) { m_bunchtime.clear(); }
27 if( m_runFrom.size()>0 ) { m_runFrom.clear(); }
28 if( m_runTo.size()>0 ) { m_runTo.clear(); }
29 if( m_eventFrom.size()>0 ) { m_eventFrom.clear(); }
30 if( m_eventTo.size()>0 ) { m_eventTo.clear(); }
31 return;
32 }
33
34 // Re-implemented from DataObject
35 inline virtual const CLID& clID() const { return classID(); }
36
37 inline static const CLID& classID() { return CLID_Calib_EsTimeCal; }
38
39 virtual StatusCode update(CalibBase1& other, MsgStream* log);
40
41 //set the Calibdata of EsTime
42 void setTestCalibConst(const vector<double>* TestCalibConst);
43 void setToffsetb(const double toffsetb);
44 void setToffsete(const double toffsete);
45 void setBunchTime(const int bunchtime);
46 void setRunFrom(const int runFrom);
47 void setRunTo(const int runTo);
48 void setEventFrom(const int eventFrom);
49 void setEventTo(const int eventTo);
50
51 //get the CalibData of EsTime
52 double getTestCalibConst(unsigned int No) const { return *((m_TestCalibConst->begin())+No);}
53 //get the size of the vectors
54 int getTestCalibConstNo() const { return m_TestCalibConst->size();}
55 //get the time of offset for barrel
56 double getToffsetb();
57 double getToffsetb(unsigned int No);
58 //get the time of offset for endcap
59 double getToffsete();
60 double getToffsete(unsigned int No);
61 //get the time interval of each bunch
62 double getBunchTime();
63 double getBunchTime(unsigned int No);
64 // get the run begin
65 unsigned int getSize() const { return m_bunchtime.size(); }
66 int getRunFrom();
67 int getRunFrom(unsigned int No);
68 // get the run end
69 int getRunTo();
70 int getRunTo(unsigned int No);
71 // get the event number begin
73 int getEventFrom(unsigned int No);
74 // get the event number end
75 int getEventTo();
76 int getEventTo(unsigned int No);
77
78 private:
79 vector<double>* m_TestCalibConst;
80 vector<double> m_toffsetb;
81 vector<double> m_toffsete;
82 vector<int> m_bunchtime;
83 vector<int> m_runFrom;
84 vector<int> m_runTo;
85 vector<int> m_eventFrom;
86 vector<int> m_eventTo;
87 };
88}
89
90
91#endif //CalibData_EsTimeCalibData_h
const CLID CLID_Calib_EsTimeCal
Definition: CalibModel.h:51
virtual const CLID & clID() const
double getTestCalibConst(unsigned int No) const
void setRunFrom(const int runFrom)
static const CLID & classID()
void setEventTo(const int eventTo)
void setToffsetb(const double toffsetb)
void setEventFrom(const int eventFrom)
void setBunchTime(const int bunchtime)
void setTestCalibConst(const vector< double > *TestCalibConst)
void setRunTo(const int runTo)
unsigned int getSize() const
void setToffsete(const double toffsete)