27 static std::string undefFileName =
"UndefinedROOTOutputFileName";
68 if( undefFileName != m_defFileName ) {
69 m_hfile->Write(
"",TObject::kOverwrite);
81 if( m_outputEnabled && undefFileName != m_defFileName ) {
86 if ( top.
ptr() == pObject ) {
87 TDirectory* pDir = m_hfile.get();
101 <<
"Error while creating persistent Histogram:"
111 <<
"Internal error while creating Histogram persistent representations"
115 if (m_outputEnabled && !m_prtWar) {
119 <<
"no ROOT output file name, "
120 <<
"Histograms cannot be persistified" <<
endmsg;
133 "Flag to enable/disable the output to file.");
bool m_outputEnabled
Flag to enable/disable the output to file.
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Implementation of IConverter: Convert the transient object to the requested representation.
Definition of the MsgStream class used to transmit messages.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
StatusCode finalize() override
Finalise the service.
PersSvc(const std::string &name, ISvcLocator *svc)
Standard constructor.
bool isFailure() const
Test for a status code of FAILURE.
IRegistry * registry() const
Get pointer to Registry.
std::string m_defFileName
Default file name.
#define DECLARE_COMPONENT(type)
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Convert a collection of transient data objects into another representation.
TYPE * ptr()
Automatic conversion to data type.
const std::string & name() const override
Retrieve name of the service.
virtual StatusCode finalize()
stop the service.
This class is used for returning status codes from appropriate routines.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
const long ROOT_StorageType
bool m_alphaIds
Force alphabetic histograms/ntuple IDs.
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
A small class used to access easily (and efficiently) data items residing in data stores...
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Persistency service - to store histograms in ROOT format.
virtual StatusCode initialize()
Initialize the service.
virtual const id_type & identifier() const =0
Full identifier (or key)
Opaque address interface definition.
Base class for all conversion services.
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
std::unique_ptr< TFile > m_hfile
Pointer to the ROOT file.
A DataObject is the base class of any identifiable object on any data store.
StatusCode initialize() override
Initialise the service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.