| The Gaudi Framework v29r0 (ff2e7097)

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

- File List
- File Members

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 {
32 // Nothing to do: just call base class initialisation
33 StatusCode status = DataSvc::initialize();
34
35 // Attach data loader facility
36 m_cnvSvc = serviceLocator()->service( "EventPersistencySvc" );
37 status = setDataLoader( m_cnvSvc );
38 return status;
39 }
41 StatusCode EvtDataSvc::reinitialize()
42 {
43 // Do nothing for this service
44 return StatusCode::SUCCESS;
45 }
47 StatusCode EvtDataSvc::finalize()
48 {
49 m_cnvSvc = nullptr; // release
50 DataSvc::finalize().ignore();
51 return StatusCode::SUCCESS;
52 }
53
55 EvtDataSvc::EvtDataSvc( const std::string& name, ISvcLocator* svc ) : DataSvc( name, svc ) {}
EvtDataSvc::m_cnvSvc
SmartIF< IConversionSvc > m_cnvSvc
Definition: EvtDataSvc.h:27
StatusCode::SUCCESS
Definition: StatusCode.h:31
EvtDataSvc::finalize
StatusCode finalize() override
Service finalization.
Definition: EvtDataSvc.cpp:47
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:289
EvtDataSvc::EvtDataSvc
EvtDataSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
Definition: EvtDataSvc.cpp:55
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:33
std::string
STL class.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
DataSvc::finalize
StatusCode finalize() override
Service initialization.
Definition: DataSvc.cpp:1156
EvtDataSvc.h
IConversionSvc.h
DataSvc::initialize
StatusCode initialize() override
Service initialization.
Definition: DataSvc.cpp:1119
EvtDataSvc
A EvtDataSvc is the base class for event services.
Definition: EvtDataSvc.h:13
DataSvc
Data service base class.
Definition: DataSvc.h:44
EvtDataSvc::reinitialize
StatusCode reinitialize() override
Service reinitialisation.
Definition: EvtDataSvc.cpp:41
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:109
ISvcLocator.h