BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/CalibData/CalibData/CalibBase.h
Go to the documentation of this file.
1//$Header: /bes/bes/BossCvs/Calibration/CalibData/CalibData/CalibBase.h,v 1.2 2011/02/17 05:10:16 maqm Exp $
2#ifndef CalibData_CalibBase_h
3#define CalibData_CalibBase_h
4
5/** @class CalibBase
6
7 Used as a base for all objects in the calibration data store.
8 Implement IValidity.
9
10 Permits implementation of deep copy by means of virtual update
11 method. [Used in CalibMySQLCnvSvc::updateCalib]
12
13 @author J. Bogart
14
15*/
16
17#include "GaudiKernel/DataObject.h"
18#include "GaudiKernel/IValidity.h"
19//#include "GaudiKernel/ITime.h"
20
21#include "CalibData/CalibModel.h"
22
23// extern const CLID& CLID_Calib_CalibBase;
24
25class MsgStream;
26
27namespace CalibData {
28 //class CalibTime;
29
30 class CalibBase : public DataObject,
31 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
55 // Implementation of IValidity
56
57 /// Check if the data object has a well defined validity range
58 /* virtual bool isValid();
59
60 /// Check if the data object is valid at the specified time
61 virtual bool isValid(const ITime& t);
62
63 /// Get start of validity
64 virtual const ITime& validSince();
65
66 /// Get end of validity
67 virtual const ITime& validTill();
68
69 /// Set validity range
70 virtual void setValidity(const ITime& since, const ITime& till);
71
72 /// Set start of validity
73 virtual void setValiditySince(const ITime& since);
74
75 /// Set end of validity
76 virtual void setValidityTill(const ITime& till);
77
78 /// Update the validity range (foreseen for tree-like structures)
79 virtual StatusCode updateValidity();
80*/
81 /// Get serial number of metadata row corresponding to calibration.
82 /// Can be used by clients to determine if object has been updated
83 /// since last access.
84 virtual int getSerNo() const {return m_serNo;}
85
86 /* virtual const CalibTime* getValidStart() const {return m_validSince;}
87 virtual const CalibTime* getValidEnd() const {return m_validTill;}
88 */
89 protected:
90
91 // IValidity data
92
93 /// Start of validity
94 //CalibTime* m_validSince;
95 // ITime* m_validSince;
96
97 /// End of validity
98 //CalibTime* m_validTill;
99 // ITime* m_validTill;
100
101 /// Serial number of corresponding metadata row.
102 int m_serNo;
103
104 void setSerNo(int ser) { m_serNo = ser;}
105
106 // Other possible things to keep here: flavor, calibration type
107
108 };
109
110}
111#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.
virtual StatusCode update(CalibBase &obj, MsgStream *)
Following is intended for deep copy.
CalibBase(const CalibBase &obj)