BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Calibration/CalibData/include/CalibData/EsTime/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
11#include "CalibData/CalibBase1.h"
12#include "CalibData/CalibModel.h"
13#include <vector>
14
15using namespace std;
16
17namespace CalibData {
18 class EsTimeCalibData : public CalibBase1 {
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 {
53 return *( ( m_TestCalibConst->begin() ) + No );
54 }
55 // get the size of the vectors
56 int getTestCalibConstNo() const { return m_TestCalibConst->size(); }
57 // get the time of offset for barrel
58 double getToffsetb();
59 double getToffsetb( unsigned int No );
60 // get the time of offset for endcap
61 double getToffsete();
62 double getToffsete( unsigned int No );
63 // get the time interval of each bunch
64 double getBunchTime();
65 double getBunchTime( unsigned int No );
66 // get the run begin
67 unsigned int getSize() const { return m_bunchtime.size(); }
68 int getRunFrom();
69 int getRunFrom( unsigned int No );
70 // get the run end
71 int getRunTo();
72 int getRunTo( unsigned int No );
73 // get the event number begin
75 int getEventFrom( unsigned int No );
76 // get the event number end
77 int getEventTo();
78 int getEventTo( unsigned int No );
79
80 private:
81 vector<double>* m_TestCalibConst;
82 vector<double> m_toffsetb;
83 vector<double> m_toffsete;
84 vector<int> m_bunchtime;
85 vector<int> m_runFrom;
86 vector<int> m_runTo;
87 vector<int> m_eventFrom;
88 vector<int> m_eventTo;
89 };
90} // namespace CalibData
91
92#endif // CalibData_EsTimeCalibData_h
void setTestCalibConst(const vector< double > *TestCalibConst)
void setRunFrom(const int runFrom)
void setEventTo(const int eventTo)
void setToffsetb(const double toffsetb)
void setEventFrom(const int eventFrom)
virtual StatusCode update(CalibBase1 &other, MsgStream *log)
void setBunchTime(const int bunchtime)
void setRunTo(const int runTo)
void setToffsete(const double toffsete)