The Gaudi Framework
master (68c8ac5a)
Toggle main menu visibility
Loading...
Searching...
No Matches
EvtDataSvc.cpp
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2026 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
//====================================================================
12
// EvtDataSvc.cpp
13
//--------------------------------------------------------------------
14
//
15
// Package : System ( The LHCb Offline System)
16
//
17
// Description: implementation of the Transient event data service.
18
//
19
// Author : M.Frank
20
// History :
21
// +---------+----------------------------------------------+---------
22
// | Date | Comment | Who
23
// +---------+----------------------------------------------+---------
24
// | 29/10/98| Initial version | MF
25
// +---------+----------------------------------------------+---------
26
//
27
//====================================================================
28
29
// Framework includes
30
#include <
GaudiKernel/DataSvc.h
>
31
#include <
GaudiKernel/IConversionSvc.h
>
32
#include <
GaudiKernel/ISvcLocator.h
>
33
40
class
EvtDataSvc
:
public
DataSvc
{
41
public
:
42
using
DataSvc::DataSvc
;
43
StatusCode
initialize
()
override
;
44
StatusCode
reinitialize
()
override
;
45
StatusCode
finalize
()
override
;
46
47
private
:
48
SmartIF<IConversionSvc>
m_cnvSvc
;
49
};
50
51
// Instantiation of a static factory class used by clients to create
52
// instances of this service
53
DECLARE_COMPONENT
(
EvtDataSvc
)
54
55
56
StatusCode
EvtDataSvc
::
initialize
() {
57
// Nothing to do: just call base class initialisation
58
StatusCode
status =
DataSvc::initialize
();
59
60
// Attach data loader facility
61
m_cnvSvc
=
serviceLocator
()->service(
"EventPersistencySvc"
);
62
status =
setDataLoader
(
m_cnvSvc
);
63
return
status;
64
}
65
66
StatusCode
EvtDataSvc::reinitialize
() {
67
// Do nothing for this service
68
return
StatusCode::SUCCESS
;
69
}
70
71
StatusCode
EvtDataSvc::finalize
() {
72
m_cnvSvc
=
nullptr
;
// release
73
DataSvc::finalize
().
ignore
();
74
return
StatusCode::SUCCESS
;
75
}
DataSvc.h
IConversionSvc.h
ISvcLocator.h
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition
PluginServiceV1.h:45
DataSvc::DataSvc
DataSvc(const DataSvc &)=delete
copy constructor disabled
DataSvc::finalize
StatusCode finalize() override
Service initialization.
Definition
DataSvc.cpp:828
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:160
DataSvc::initialize
StatusCode initialize() override
Service initialization.
Definition
DataSvc.cpp:795
EvtDataSvc
A EvtDataSvc is the base class for event services.
Definition
EvtDataSvc.cpp:40
EvtDataSvc::m_cnvSvc
SmartIF< IConversionSvc > m_cnvSvc
Definition
EvtDataSvc.cpp:48
EvtDataSvc::DataSvc
DataSvc(const DataSvc &)=delete
copy constructor disabled
EvtDataSvc::reinitialize
StatusCode reinitialize() override
Service reinitialisation.
Definition
EvtDataSvc.cpp:66
EvtDataSvc::finalize
StatusCode finalize() override
Service finalization.
Definition
EvtDataSvc.cpp:71
EvtDataSvc::initialize
StatusCode initialize() override
Service initialisation.
Definition
EvtDataSvc.cpp:56
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition
Service.cpp:336
SmartIF
Small smart pointer class with automatic reference counting for IInterface.
Definition
SmartIF.h:28
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
StatusCode::ignore
void ignore() const
Allow discarding a StatusCode without warning.
Definition
StatusCode.h:128
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition
StatusCode.h:99
GaudiCommonSvc
src
DataSvc
EvtDataSvc.cpp
Generated on
for The Gaudi Framework by
1.17.0