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
9 #include "GaudiKernel/Time.h"
10 #include "GaudiKernel/TsDataSvc.h"
11 
12 // Forward declarations
13 class StatusCode;
14 class IAddressCreator;
15 
17  //--------------------------------------------------------------------------
27 
28 class DetDataSvc : public extends<TsDataSvc, IDetDataSvc, IIncidentListener>
29 {
30 
31  // unhides DataSvc updateObject methods
33 
34 public:
35  // Overloaded DataSvc methods
36 
38  StatusCode initialize() override;
39 
41  StatusCode reinitialize() override;
42 
44  StatusCode finalize() override;
45 
47  StatusCode clearStore() override;
48 
50  StatusCode updateObject( DataObject* toUpdate ) override;
51 
53  DetDataSvc( const std::string& name, ISvcLocator* svc );
54 
56  ~DetDataSvc() override = default;
57 
58 private:
61 
62 public:
63  // Implementation of the IDetDataSvc interface
64 
67  bool validEventTime() const override;
68 
70  const Gaudi::Time& eventTime() const override;
71 
73  void setEventTime( const Gaudi::Time& time ) override;
74 
75 public:
76  // Implementation of the IIncidentListener interface
77 
79  void handle( const Incident& ) override;
80 
81 private:
83  "Detector Data Persistency Storage type"};
84  Gaudi::Property<std::string> m_detDbLocation{this, "DetDbLocation", "empty",
85  "location of detector Db (filename,URL)"};
86  Gaudi::Property<std::string> m_detDbRootName{this, "DetDbRootName", "dd", "name of the root node of the detector"};
87  Gaudi::Property<bool> m_usePersistency{this, "UsePersistency", false, "control if the persistency is required"};
88  Gaudi::Property<std::string> m_persistencySvcName{this, "PersistencySvc", "DetectorPersistencySvc",
89  "name of the persistency service"};
90 
93 
96 };
97 
98 #endif // DETECTORDATASVC_DETDATASVC_H
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:289
Implementation of property with value of concrete type.
Definition: Property.h:313
void handle(const Incident &) override
Inform that a new incident has occured.
Definition: DetDataSvc.cpp:196
bool validEventTime() const override
Check if the event time has been set.
Definition: DetDataSvc.cpp:190
StatusCode updateObject(IRegistry *pDirectory) override
Update object identified by its directory entry.
Definition: TsDataSvc.cpp:1017
StatusCode updateObject(DataObject *toUpdate) override
Update object.
Definition: DetDataSvc.cpp:208
IAddressCreator interface definition.
Gaudi::Property< std::string > m_detDbRootName
Definition: DetDataSvc.h:86
~DetDataSvc() override=default
Standard Destructor.
Gaudi::Property< std::string > m_detDbLocation
Definition: DetDataSvc.h:84
const Gaudi::Time & eventTime() const override
Get the event time.
Definition: DetDataSvc.cpp:193
STL class.
Gaudi::Property< bool > m_usePersistency
Definition: DetDataSvc.h:87
StatusCode setupDetectorDescription()
Deal with Detector Description initialization.
Definition: DetDataSvc.cpp:56
StatusCode clearStore() override
Remove all data objects in the data store.
Definition: DetDataSvc.cpp:148
Based on seal::Time.
Definition: Time.h:213
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
SmartIF< IAddressCreator > m_addrCreator
Address Creator to be used.
Definition: DetDataSvc.h:95
DetDataSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
Definition: DetDataSvc.cpp:174
StatusCode reinitialize() override
Initialize the service.
Definition: DetDataSvc.cpp:110
StatusCode finalize() override
Finalize the service.
Definition: DetDataSvc.cpp:129
StatusCode initialize() override
Initialize the service.
Definition: DetDataSvc.cpp:27
const long XML_StorageType
Definition: ClassID.h:57
Gaudi::Property< std::string > m_persistencySvcName
Definition: DetDataSvc.h:88
Gaudi::Time m_eventTime
Current event time.
Definition: DetDataSvc.h:92
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
Base class for all Incidents (computing events).
Definition: Incident.h:17
Gaudi::Property< int > m_detStorageType
Definition: DetDataSvc.h:82
void setEventTime(const Gaudi::Time &time) override
Set the new event time.
Definition: DetDataSvc.cpp:183
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30