| The Gaudi Framework v32r1 (f65d50dc)

EvtDataSvc.cpp
Go to the documentation of this file.
1 //====================================================================
2 // EvtDataSvc.cpp
3 //--------------------------------------------------------------------
4 //
5 // Package : System ( The LHCb Offline System)
6 //
7 // Description: implementation of the Transient event data service.
8 //
9 // Author : M.Frank
10 // History :
11 // +---------+----------------------------------------------+---------
12 // | Date | Comment | Who
13 // +---------+----------------------------------------------+---------
14 // | 29/10/98| Initial version | MF
15 // +---------+----------------------------------------------+---------
16 //
17 //====================================================================
18 #define DATASVC_EVTDATASVC_CPP
19
20 #include "GaudiKernel/IConversionSvc.h"
21 #include "GaudiKernel/ISvcLocator.h"
22
23 #include "EvtDataSvc.h"
24
25 // Instantiation of a static factory class used by clients to create
26 // instances of this service
27 DECLARE_COMPONENT( EvtDataSvc )
28
29 StatusCode EvtDataSvc::initialize() {
31 // Nothing to do: just call base class initialisation
32 StatusCode status = DataSvc::initialize();
33
34 // Attach data loader facility
35 m_cnvSvc = serviceLocator()->service( "EventPersistencySvc" );
36 status = setDataLoader( m_cnvSvc );
37 return status;
38 }
40 StatusCode EvtDataSvc::reinitialize() {
41 // Do nothing for this service
42 return StatusCode::SUCCESS;
43 }
45 StatusCode EvtDataSvc::finalize() {
46 m_cnvSvc = nullptr; // release
47 DataSvc::finalize().ignore();
48 return StatusCode::SUCCESS;
49 }
EvtDataSvc::m_cnvSvc
SmartIF< IConversionSvc > m_cnvSvc
Definition: EvtDataSvc.h:21
EvtDataSvc::finalize
StatusCode finalize() override
Service finalization.
Definition: EvtDataSvc.cpp:45
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:277
EvtDataSvc::initialize
StatusCode initialize() override
Service initialisation.
Definition: EvtDataSvc.cpp:30
DataSvc::setDataLoader
StatusCode setDataLoader(IConversionSvc *svc, IDataProviderSvc *dpsvc=nullptr) override
IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service and optionally a data pro...
Definition: DataSvc.cpp:177
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginServiceV1.h:46
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:76
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
DataSvc::finalize
StatusCode finalize() override
Service initialization.
Definition: DataSvc.cpp:845
EvtDataSvc.h
StatusCode::ignore
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:153
IConversionSvc.h
DataSvc::initialize
StatusCode initialize() override
Service initialization.
Definition: DataSvc.cpp:812
EvtDataSvc
A EvtDataSvc is the base class for event services.
Definition: EvtDataSvc.h:13
EvtDataSvc::reinitialize
StatusCode reinitialize() override
Service reinitialisation.
Definition: EvtDataSvc.cpp:40
ISvcLocator.h