The Gaudi Framework
master (9f3f8895)
Toggle main menu visibility
Loading...
Searching...
No Matches
PersSvc.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2025 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
#pragma once
12
13
// Include files
14
#include <
GaudiKernel/ConversionSvc.h
>
15
16
// Forward declarations
17
class
TFile;
18
19
namespace
RootHistCnv
{
20
26
27
class
PersSvc
:
public
ConversionSvc
{
28
public
:
30
StatusCode
initialize
()
override
;
31
33
StatusCode
finalize
()
override
;
34
36
StatusCode
createRep
(
DataObject
* pObject,
IOpaqueAddress
*& refpAddress )
override
;
37
39
PersSvc
(
const
std::string&
name
,
ISvcLocator
* svc ) :
ConversionSvc
(
name
, svc,
ROOT_StorageType
) {}
40
41
private
:
42
// undefFileName is defined in PersSvc.cpp
43
Gaudi::Property<std::string>
m_defFileName
{
this
,
"OutputFile"
, undefFileName,
"default file name"
};
44
Gaudi::Property<bool>
m_alphaIds
{
this
,
"ForceAlphaIds"
,
false
,
"force alphabetic histograms/ntuple IDs"
};
45
Gaudi::Property<bool>
m_outputEnabled
{
this
,
"OutputEnabled"
,
true
,
"Flag to enable/disable the output to file."
};
46
47
std::unique_ptr<TFile>
m_hfile
;
48
bool
m_prtWar
=
false
;
49
};
50
51
}
// namespace RootHistCnv
ROOT_StorageType
const long ROOT_StorageType
Definition
ClassID.h:60
ConversionSvc.h
ConversionSvc::ConversionSvc
ConversionSvc(const std::string &name, ISvcLocator *svc, long type)
Standard Constructor.
Definition
ConversionSvc.cpp:321
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition
DataObject.h:37
Gaudi::Property
Implementation of property with value of concrete type.
Definition
Property.h:35
IOpaqueAddress
Opaque address interface definition.
Definition
IOpaqueAddress.h:28
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition
ISvcLocator.h:42
PersSvc::PersSvc
PersSvc(const std::string &name, ISvcLocator *svc)
Standard constructor.
Definition
PersSvc.h:39
RootHistCnv::PersSvc::PersSvc
PersSvc(const std::string &name, ISvcLocator *svc)
Standard constructor.
Definition
PersSvc.h:39
RootHistCnv::PersSvc::m_outputEnabled
Gaudi::Property< bool > m_outputEnabled
Definition
PersSvc.h:45
RootHistCnv::PersSvc::m_prtWar
bool m_prtWar
Already printed a Warning.
Definition
PersSvc.h:48
RootHistCnv::PersSvc::finalize
StatusCode finalize() override
Finalise the service.
Definition
PersSvc.cpp:66
RootHistCnv::PersSvc::initialize
StatusCode initialize() override
Initialise the service.
Definition
PersSvc.cpp:42
RootHistCnv::PersSvc::m_defFileName
Gaudi::Property< std::string > m_defFileName
Definition
PersSvc.h:43
RootHistCnv::PersSvc::m_alphaIds
Gaudi::Property< bool > m_alphaIds
Definition
PersSvc.h:44
RootHistCnv::PersSvc::m_hfile
std::unique_ptr< TFile > m_hfile
Pointer to the ROOT file.
Definition
PersSvc.h:47
RootHistCnv::PersSvc::createRep
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Convert a collection of transient data objects into another representation.
Definition
PersSvc.cpp:81
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition
Service.cpp:333
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
RootHistCnv
Definition
DirectoryCnv.h:26
RootHistCnv
src
PersSvc.h
Generated on
for The Gaudi Framework by
1.17.0