The Gaudi Framework  v29r0 (ff2e7097)
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 
35  ~PersSvc() override = default;
36 
37  private:
38  // undefFileName is defined in PersSvc.cpp
39  Gaudi::Property<std::string> m_defFileName{this, "OutputFile", undefFileName, "default file name"};
40  Gaudi::Property<bool> m_alphaIds{this, "ForceAlphaIds", false, "force alphabetic histograms/ntuple IDs"};
41  Gaudi::Property<bool> m_outputEnabled{this, "OutputEnabled", true, "Flag to enable/disable the output to file."};
42 
44  bool m_prtWar = false;
45  };
46 
47 } // namespace RootHistCnv
48 
49 #endif // ROOTHISTCNV_PERSSVC_H
~PersSvc() override=default
Standard destructor.
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:289
StatusCode finalize() override
Finalise the service.
Definition: PersSvc.cpp:61
Implementation of property with value of concrete type.
Definition: Property.h:319
Gaudi::Property< bool > m_alphaIds
Definition: PersSvc.h:40
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:28
Gaudi::Property< bool > m_outputEnabled
Definition: PersSvc.h:41
const long ROOT_StorageType
Definition: ClassID.h:52
bool m_prtWar
Already printed a Warning.
Definition: PersSvc.h:44
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:43
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:29
StatusCode initialize() override
Initialise the service.
Definition: PersSvc.cpp:33
Gaudi::Property< std::string > m_defFileName
Definition: PersSvc.h:39