BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Calibration/CalibData/include/CalibData/CalibBase.h
Go to the documentation of this file.
1//$Header: /bes/bes/BossCvs/Calibration/CalibData/CalibData/CalibBase.h,v 1.3 2020/05/25
2// 22:01:27 maqm Exp $
3#ifndef CalibData_CalibBase_h
4#define CalibData_CalibBase_h
5
6/** @class CalibBase
7
8 Used as a base for all objects in the calibration data store.
9 Implement IValidity.
10
11 Permits implementation of deep copy by means of virtual update
12 method. [Used in CalibMySQLCnvSvc::updateCalib]
13
14 @author J. Bogart
15
16*/
17
18#include "GaudiKernel/DataObject.h"
19#include "GaudiKernel/IValidity.h"
20// #include "GaudiKernel/ITime.h"
21
22#include "CalibData/CalibModel.h"
23
24// extern const CLID& CLID_Calib_CalibBase;
25
26class MsgStream;
27
28namespace CalibData {
29 // class CalibTime;
30
31 class CalibBase : public DataObject, virtual public IValidity {
32
33 friend class XmlBaseCnv;
34 friend class RootBaseCnv;
35
36 public:
38 // CalibBase(const ITime& since, const ITime& till, int serNo = -1);
39
40 CalibBase( const CalibBase& obj );
41
42 /// Following is intended for deep copy
43 virtual StatusCode update( CalibBase& obj, MsgStream* );
44 virtual ~CalibBase();
45
46 // Re-implemented from DataObject
47 /// Class ID of this instance
48 inline virtual const CLID& clID() const { return classID(); }
49
50 /// Class ID of this class
51 inline static const CLID& classID() { return CLID_Calib_CalibBase; };
52
53 public:
54 // Implementation of IValidity
55
56 /// Check if the data object has a well defined validity range
57 /* virtual bool isValid();
58
59 /// Check if the data object is valid at the specified time
60 virtual bool isValid(const ITime& t);
61
62 /// Get start of validity
63 virtual const ITime& validSince();
64
65 /// Get end of validity
66 virtual const ITime& validTill();
67
68 /// Set validity range
69 virtual void setValidity(const ITime& since, const ITime& till);
70
71 /// Set start of validity
72 virtual void setValiditySince(const ITime& since);
73
74 /// Set end of validity
75 virtual void setValidityTill(const ITime& till);
76
77 /// Update the validity range (foreseen for tree-like structures)
78 virtual StatusCode updateValidity();
79 */
80 /// Get serial number of metadata row corresponding to calibration.
81 /// Can be used by clients to determine if object has been updated
82 /// since last access.
83 virtual int getSerNo() const { return m_serNo; }
84
85 /* virtual const CalibTime* getValidStart() const {return m_validSince;}
86 virtual const CalibTime* getValidEnd() const {return m_validTill;}
87 */
88 protected:
89 /// Serial number of corresponding metadata row.
91
92 void setSerNo( int ser ) { m_serNo = ser; }
93
94 // Other possible things to keep here: flavor, calibration type
95 };
96
97} // namespace CalibData
98#endif
virtual const CLID & clID() const
Class ID of this instance.
static const CLID & classID()
Class ID of this class.
virtual int getSerNo() const
Check if the data object has a well defined validity range.
int m_serNo
Serial number of corresponding metadata row.
virtual StatusCode update(CalibBase &obj, MsgStream *)
Following is intended for deep copy.
Definition CalibBase.cxx:34