| The Gaudi Framework v27r1

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

- File List
- File Members

PersSvc.h
Go to the documentation of this file.
1 #ifndef ROOTHISTCNV_PERSSVC_H
2 #define ROOTHISTCNV_PERSSVC_H 1
3
4 // Include files
5 #include "GaudiKernel/ConversionSvc.h"
6
7 // Forward declarations
8 class TFile;
9
10
11 namespace RootHistCnv {
12
19 class PersSvc : public ConversionSvc {
20 public:
22 StatusCode initialize() override;
23
25 StatusCode finalize() override;
26
28 StatusCode createRep(DataObject* pObject, IOpaqueAddress*& refpAddress) override;
29
31 PersSvc( const std::string& name, ISvcLocator* svc );
32
34 ~PersSvc() override = default;
35
36 private:
37 std::string m_defFileName;
38 std::unique_ptr<TFile> m_hfile;
39 bool m_prtWar = false;
40 bool m_alphaIds;
41 bool m_outputEnabled;
42 };
43
44 } // namespace RootHistCnv
45
46 #endif // ROOTHISTCNV_PERSSVC_H
RootHistCnv::PersSvc::m_outputEnabled
bool m_outputEnabled
Flag to enable/disable the output to file.
Definition: PersSvc.h:41
RootHistCnv::PersSvc::~PersSvc
~PersSvc() override=default
Standard destructor.
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
RootHistCnv::PersSvc::finalize
StatusCode finalize() override
Finalise the service.
Definition: PersSvc.cpp:62
ConversionSvc.h
RootHistCnv::PersSvc::PersSvc
PersSvc(const std::string &name, ISvcLocator *svc)
Standard constructor.
Definition: PersSvc.cpp:127
RootHistCnv::PersSvc::m_defFileName
std::string m_defFileName
Default file name.
Definition: PersSvc.h:37
RootHistCnv::PersSvc::createRep
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Convert a collection of transient data objects into another representation.
Definition: PersSvc.cpp:76
std::string
STL class.
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:319
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
RootHistCnv
Definition: DirectoryCnv.h:17
RootHistCnv::PersSvc::m_alphaIds
bool m_alphaIds
Force alphabetic histograms/ntuple IDs.
Definition: PersSvc.h:40
RootHistCnv::PersSvc::m_prtWar
bool m_prtWar
Already printed a Warning.
Definition: PersSvc.h:39
std::unique_ptr< TFile >
RootHistCnv::PersSvc
Persistency service - to store histograms in ROOT format.
Definition: PersSvc.h:19
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
ConversionSvc
Base class for all conversion services.
Definition: ConversionSvc.h:46
RootHistCnv::PersSvc::m_hfile
std::unique_ptr< TFile > m_hfile
Pointer to the ROOT file.
Definition: PersSvc.h:38
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
RootHistCnv::PersSvc::initialize
StatusCode initialize() override
Initialise the service.
Definition: PersSvc.cpp:31