| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

DetDataSvc.h
Go to the documentation of this file.
1 #ifndef DETECTORDATASVC_DETDATASVC_H
2 #define DETECTORDATASVC_DETDATASVC_H
3
4 // Base classes
5 //#include "GaudiKernel/DataSvc.h"
6 // D. Piparo: Change to the new thread safe version
7 #include "GaudiKernel/TsDataSvc.h"
8 #include "GaudiKernel/IDetDataSvc.h"
9 #include "GaudiKernel/IIncidentListener.h"
10 #include "GaudiKernel/Time.h"
11
12 // Forward declarations
13 class StatusCode;
14 class IAddressCreator;
15
17 //--------------------------------------------------------------------------
27
28 class DetDataSvc : public extends<TsDataSvc,
29 IDetDataSvc,
30 IIncidentListener>
31 {
32
33 // unhides DataSvc updateObject methods
34 using TsDataSvc::updateObject;
35
36 public:
37
38 // Overloaded DataSvc methods
39
41 StatusCode initialize() override;
42
44 StatusCode reinitialize() override;
45
47 StatusCode finalize() override;
48
50 StatusCode clearStore() override;
51
53 StatusCode updateObject( DataObject* toUpdate ) override;
54
56 DetDataSvc(const std::string& name, ISvcLocator* svc);
57
59 ~DetDataSvc() override = default;
60
61 private:
63 StatusCode setupDetectorDescription();
64
65 public:
66
67 // Implementation of the IDetDataSvc interface
68
71 bool validEventTime() const override;
72
74 const Gaudi::Time& eventTime() const override;
75
77 void setEventTime( const Gaudi::Time& time ) override;
78
79 public:
80
81 // Implementation of the IIncidentListener interface
82
84 void handle( const Incident& ) override;
85
86 private:
87
89 int m_detStorageType = XML_StorageType;
90
92 std::string m_detDbLocation = "empty";
93
95 std::string m_detDbRootName = "dd";
96
98 std::string m_persistencySvcName = "DetectorPersistencySvc";
99
101 bool m_usePersistency = false;
102
104 Gaudi::Time m_eventTime = 0;
105
107 SmartIF<IAddressCreator> m_addrCreator = nullptr;
108
109 };
110
111 #endif // DETECTORDATASVC_DETDATASVC_H
DetDataSvc::validEventTime
bool validEventTime() const override
Check if the event time has been set.
Definition: DetDataSvc.cpp:199
SmartIF< IAddressCreator >
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
plotSpeedupsPyRoot.time
tuple time
Definition: plotSpeedupsPyRoot.py:146
DetDataSvc::eventTime
const Gaudi::Time & eventTime() const override
Get the event time.
Definition: DetDataSvc.cpp:204
DetDataSvc::handle
void handle(const Incident &) override
Inform that a new incident has occured.
Definition: DetDataSvc.cpp:209
TsDataSvc::updateObject
StatusCode updateObject(IRegistry *pDirectory) override
Update object identified by its directory entry.
Definition: TsDataSvc.cpp:1017
DetDataSvc::updateObject
StatusCode updateObject(DataObject *toUpdate) override
Update object.
Definition: DetDataSvc.cpp:219
IAddressCreator
IAddressCreator interface definition.
Definition: IAddressCreator.h:28
DetDataSvc::~DetDataSvc
~DetDataSvc() override=default
Standard Destructor.
DetDataSvc::m_persistencySvcName
std::string m_persistencySvcName
Name of the persistency service.
Definition: DetDataSvc.h:98
std::string
STL class.
DetDataSvc::setupDetectorDescription
StatusCode setupDetectorDescription()
Deal with Detector Description initialization.
Definition: DetDataSvc.cpp:55
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:319
DetDataSvc
Definition: DetDataSvc.h:28
DetDataSvc::clearStore
StatusCode clearStore() override
Remove all data objects in the data store.
Definition: DetDataSvc.cpp:150
Gaudi::Time
Based on seal::Time.
Definition: Time.h:213
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
DetDataSvc::m_addrCreator
SmartIF< IAddressCreator > m_addrCreator
Address Creator to be used.
Definition: DetDataSvc.h:107
DetDataSvc::m_detStorageType
int m_detStorageType
Detector Data Persistency Storage type.
Definition: DetDataSvc.h:89
IDetDataSvc.h
DetDataSvc::DetDataSvc
DetDataSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
Definition: DetDataSvc.cpp:181
DetDataSvc::reinitialize
StatusCode reinitialize() override
Initialize the service.
Definition: DetDataSvc.cpp:113
DetDataSvc::finalize
StatusCode finalize() override
Finalize the service.
Definition: DetDataSvc.cpp:131
Time.h
DetDataSvc::initialize
StatusCode initialize() override
Initialize the service.
Definition: DetDataSvc.cpp:27
XML_StorageType
const long XML_StorageType
Definition: ClassID.h:57
DetDataSvc::m_detDbRootName
std::string m_detDbRootName
Name of the root node of the detector.
Definition: DetDataSvc.h:95
DetDataSvc::m_eventTime
Gaudi::Time m_eventTime
Current event time.
Definition: DetDataSvc.h:104
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
DetDataSvc::m_detDbLocation
std::string m_detDbLocation
Location of detector Db (filename,URL)
Definition: DetDataSvc.h:92
Incident
Base class for all Incidents (computing events).
Definition: Incident.h:17
DetDataSvc::setEventTime
void setEventTime(const Gaudi::Time &time) override
Set the new event time.
Definition: DetDataSvc.cpp:193
IIncidentListener.h
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
TsDataSvc.h
DetDataSvc::m_usePersistency
bool m_usePersistency
Flag to control if the persistency is required.
Definition: DetDataSvc.h:101