The Gaudi Framework  v30r3 (a5ef0a68)
PersSvc.h
Go to the documentation of this file.
1 #ifndef ROOTHISTCNV_PERSSVC_H
2 #define ROOTHISTCNV_PERSSVC_H 1
3 
4 // Include files
6 
7 // Forward declarations
8 class TFile;
9 
10 namespace RootHistCnv
11 {
12 
19  class PersSvc : public ConversionSvc
20  {
21  public:
23  StatusCode initialize() override;
24 
26  StatusCode finalize() override;
27 
29  StatusCode createRep( DataObject* pObject, IOpaqueAddress*& refpAddress ) override;
30 
33 
34  private:
35  // undefFileName is defined in PersSvc.cpp
36  Gaudi::Property<std::string> m_defFileName{this, "OutputFile", undefFileName, "default file name"};
37  Gaudi::Property<bool> m_alphaIds{this, "ForceAlphaIds", false, "force alphabetic histograms/ntuple IDs"};
38  Gaudi::Property<bool> m_outputEnabled{this, "OutputEnabled", true, "Flag to enable/disable the output to file."};
39 
41  bool m_prtWar = false;
42  };
43 
44 } // namespace RootHistCnv
45 
46 #endif // ROOTHISTCNV_PERSSVC_H
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:288
StatusCode finalize() override
Finalise the service.
Definition: PersSvc.cpp:60
Implementation of property with value of concrete type.
Definition: Property.h:381
Gaudi::Property< bool > m_alphaIds
Definition: PersSvc.h:37
PersSvc(const std::string &name, ISvcLocator *svc)
Standard constructor.
Definition: PersSvc.h:32
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Convert a collection of transient data objects into another representation.
Definition: PersSvc.cpp:75
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
Gaudi::Property< bool > m_outputEnabled
Definition: PersSvc.h:38
const long ROOT_StorageType
Definition: ClassID.h:52
bool m_prtWar
Already printed a Warning.
Definition: PersSvc.h:41
Persistency service - to store histograms in ROOT format.
Definition: PersSvc.h:19
Opaque address interface definition.
Base class for all conversion services.
Definition: ConversionSvc.h:45
std::unique_ptr< TFile > m_hfile
Pointer to the ROOT file.
Definition: PersSvc.h:40
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
StatusCode initialize() override
Initialise the service.
Definition: PersSvc.cpp:33
Gaudi::Property< std::string > m_defFileName
Definition: PersSvc.h:36