| The Gaudi Framework v32r1 (f65d50dc)

Public Types | Protected Attributes | List of all members
HistogramPersistencySvc Class Reference

HistogramPersistencySvc class implementation definition. More...

`#include <src/HistogramPersistencySvc/HistogramPersistencySvc.h>`

Inheritance diagram for HistogramPersistencySvc:
[legend]
Collaboration diagram for HistogramPersistencySvc:
[legend]

## Public Types
typedef std::set< std::string > | Set
| for report: unconverted histograms More...
Public Types inherited from extends< Service, IConversionSvc, IPersistencySvc, IAddressCreator >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
Public Types inherited from Service
using | Factory = Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)>
Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using | PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| Typedef used to refer to this class from derived classes, as in. More...
Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using | base_class = CommonMessaging
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...

## Public Member Functions
PersistencySvc overrides
StatusCode | initialize () override
| Initialize the service. More...
StatusCode | reinitialize () override
| Reinitialize the service. More...
StatusCode | finalize () override
| Finalize the service. More...
StatusCode | createRep (DataObject *pObject, IOpaqueAddress *&refpAddress) override
| Implementation of IConverter: Convert the transient object to the requested representation. More...
: Object implementation
| HistogramPersistencySvc (const std::string &name, ISvcLocator *svc)
| Standard Constructor. More...
Public Member Functions inherited from PersistencySvc
long | repSvcType () const override
| Return default service type. More...
const CLID & | objType () const override
| Retrieve the class type of objects the converter produces. (DUMMY) More...
StatusCode | createObj (IOpaqueAddress *pAddress, DataObject *&refpObject) override
| Implementation of IConverter: Create the transient representation of an object. More...
StatusCode | fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) override
| Implementation of IConverter: Resolve the references of the created transient object. More...
StatusCode | updateObj (IOpaqueAddress *pAddress, DataObject *refpObject) override
| Implementation of IConverter: Update the transient object from the other representation. More...
StatusCode | updateObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) override
| Implementation of IConverter: Update the references of an updated transient object. More...
StatusCode | createRep (DataObject *pObject, IOpaqueAddress *&refpAddress) override
| Implementation of IConverter: Convert the transient object to the requested representation. More...
StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) override
| Implementation of IConverter: Resolve the references of the converted object. More...
StatusCode | updateRep (IOpaqueAddress *pAddress, DataObject *pObject) override
| Implementation of IConverter: Update the converted representation of a transient object. More...
StatusCode | updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) override
| Implementation of IConverter: Update the references of an already converted object. More...
StatusCode | setDataProvider (IDataProviderSvc *pStore) override
| Define transient datastore. More...
SmartIF< IDataProviderSvc > & | dataProvider () const override
| Access reference to transient datastore. More...
StatusCode | setConversionSvc (IConversionSvc *svc) override
| Set conversion service the converter is connected to. More...
SmartIF< IConversionSvc > & | conversionSvc () const override
| Get conversion service the converter is connected to. More...
StatusCode | setAddressCreator (IAddressCreator *creator) override
| Set address creator facility. More...
SmartIF< IAddressCreator > & | addressCreator () const override
| Retrieve address creator facility. More...
StatusCode | addConverter (IConverter *pConverter) override
| Add converter object to conversion service. More...
StatusCode | addConverter (const CLID &clid) override
| Add converter object to conversion service. More...
IConverter * | converter (const CLID &clid) override
| Retrieve converter from list. More...
StatusCode | removeConverter (const CLID &clid) override
| Remove converter object from conversion service (if present). More...
StatusCode | connectOutput (const std::string &outputFile, const std::string &openMode) override
| Connect the output file to the service with open mode. More...
StatusCode | connectOutput (const std::string &outputFile) override
| Connect the output file to the service. More...
StatusCode | commitOutput (const std::string &output, bool do_commit) override
| Commit pending output. More...
StatusCode | createAddress (long svc_type, const CLID &clid, const std::string *pars, const unsigned long *ipars, IOpaqueAddress *&refpAddress) override
| Create a Generic address using explicit arguments to identify a single object. More...
StatusCode | convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress) override
| Convert an address to string form. More...
StatusCode | createAddress (long svc_type, const CLID &clid, const std::string &refAddress, IOpaqueAddress *&refpAddress) override
| Convert an address in string form to object form. More...
StatusCode | addCnvService (IConversionSvc *service) override
| Add a new Service. More...
StatusCode | removeCnvService (long type) override
| Remove a Service. More...
StatusCode | setDefaultCnvService (long type) override
| Set default service type. More...
StatusCode | getService (long service_type, IConversionSvc *&refpSvc) override
| Retrieve conversion service identified by technology. More...
StatusCode | getService (const std::string &service_type, IConversionSvc *&refpSvc) override
| Retrieve conversion service identified by technology. More...
StatusCode | initialize () override
| Initialize the service. More...
StatusCode | finalize () override
| stop the service. More...
Public Member Functions inherited from extends< Service, IConversionSvc, IPersistencySvc, IAddressCreator >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
Public Member Functions inherited from Service
const std::string & | name () const override
| Retrieve name of the service. More...
StatusCode | configure () override
StatusCode | initialize () override
StatusCode | start () override
StatusCode | stop () override
StatusCode | finalize () override
StatusCode | terminate () override
Gaudi::StateMachine::State | FSMState () const override
Gaudi::StateMachine::State | targetFSMState () const override
StatusCode | reinitialize () override
StatusCode | restart () override
StatusCode | sysInitialize () override
| Initialize Service. More...
StatusCode | sysStart () override
| Initialize Service. More...
StatusCode | sysStop () override
| Initialize Service. More...
StatusCode | sysFinalize () override
| Finalize Service. More...
StatusCode | sysReinitialize () override
| Re-initialize the Service. More...
StatusCode | sysRestart () override
| Re-initialize the Service. More...
| Service (std::string name, ISvcLocator *svcloc)
| Standard Constructor. More...
SmartIF< ISvcLocator > & | serviceLocator () const override
| Retrieve pointer to service locator. More...
StatusCode | setProperties ()
| Method for setting declared properties to the values specified for the job. More...
template<class T >
StatusCode | service (const std::string &name, const T *&psvc, bool createIf=true) const
| Access a service by name, creating it if it doesn't already exist. More...
template<class T >
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const
template<typename IFace = IService>
SmartIF< IFace > | service (const std::string &name, bool createIf=true) const
template<class T >
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const
| Access a service by name and type, creating it if it doesn't already exist. More...
template<class T >
StatusCode | declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
| Declare used tool. More...
SmartIF< IAuditorSvc > & | auditorSvc () const
| The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| PropertyHolder ()=default
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Details::PropertyBase &prop)
| Declare a property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
| Helper to wrap a regular data member and use it as a regular property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
| Declare a PropertyBase instance setting name and documentation. More...
Gaudi::Details::PropertyBase * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
| Declare a remote property. More...
StatusCode | setProperty (const Gaudi::Details::PropertyBase &p) override
| set the property form another property More...
StatusCode | setProperty (const std::string &s) override
| set the property from the formatted string More...
StatusCode | setProperty (const std::string &n, const std::string &v) override
| set the property from name and the value More...
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
StatusCode | getProperty (Gaudi::Details::PropertyBase *p) const override
| get the property More...
const Gaudi::Details::PropertyBase & | getProperty (const std::string &name) const override
| get the property by name More...
StatusCode | getProperty (const std::string &n, std::string &v) const override
| convert the property to the string More...
const std::vector< Gaudi::Details::PropertyBase * > & | getProperties () const override
| get all properties More...
bool | hasProperty (const std::string &name) const override
| Return true if we have a property with the given name. More...
| PropertyHolder (const PropertyHolder &)=delete
PropertyHolder & | operator= (const PropertyHolder &)=delete
Public Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level | msgLevel () const
| get the cached level (originally extracted from the embedded MsgStream) More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const
| Backward compatibility function for getting the output level. More...
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
const SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...

## Protected Attributes
Gaudi::Property< std::string > | m_histPersName {this, "HistogramPersistency", "", "name of the Hist Pers type"}
Gaudi::Property< std::string > | m_outputFile {this, "OutputFile", "", "name of the output file"}
Gaudi::Property< std::vector< std::string > > | m_convert
Gaudi::Property< std::vector< std::string > > | m_exclude
Gaudi::Property< bool > | m_warnings {this, "Warnings", true, "Set this property to false to suppress warning messages"}
Set | m_converted
| for the final report: the list of converted histograms More...
Set | m_excluded
| for the final report: the list of excluded histograms More...
Protected Attributes inherited from PersistencySvc
long | m_cnvDefType = TEST_StorageType
| Default service type. More...
SmartIF< IDataProviderSvc > | m_dataSvc
| Pointer to datma provider service. More...
Services | m_cnvServices
| List of convermsion workers. More...
SmartIF< IConversionSvc > | m_cnvDefault
| Default output service. More...
Gaudi::Property< std::vector< std::string > > | m_svcNames
bool | m_enable = true
| Flag to indicate that the service is enabled. More...
SmartIF< IAddressCreator > | m_addrCreator
| Pointer to the IAddressCreator interface of this, for addressCreator(). More...
Protected Attributes inherited from Service
Gaudi::StateMachine::State | m_state = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::StateMachine::State | m_targetState = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::Property< int > | m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
Gaudi::Property< bool > | m_auditInit {this, "AuditServices", false, " unused"}
Gaudi::Property< bool > | m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
Gaudi::Property< bool > | m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
Gaudi::Property< bool > | m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
Gaudi::Property< bool > | m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
Gaudi::Property< bool > | m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
Gaudi::Property< bool > | m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
SmartIF< IAuditorSvc > | m_pAuditorSvc
| Auditor Service. More...

## Additional Inherited Members
Protected Types inherited from PersistencySvc
typedef std::map< long, ServiceEntry > | Services
Protected Member Functions inherited from PersistencySvc
SmartIF< IConversionSvc > & | service (const std::string &nam)
| Retrieve conversion service by name. More...
SmartIF< IConversionSvc > & | service (long service_type)
| Retrieve conversion service from list. More...
SmartIF< IAddressCreator > & | addressCreator (long service_type)
| Retrieve address creator from list. More...
void | encodeAddrHdr (long service_type, const CLID &clid, std::string &address) const
| Retrieve string from storage type and clid. More...
void | decodeAddrHdr (const std::string &address, long &service_type, CLID &clid, std::string &address_trailer) const
| Retrieve storage type and clid from address header of string. More...
StatusCode | makeCall (int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
| Implementation helper. More...
bool | enable (bool value)
| Set enabled flag. More...
Protected Member Functions inherited from Service
| ~Service () override
| Standard Destructor. More...
int | outputLevel () const
| get the `Service's` output level More...
Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBase * | property (const std::string &name) const
Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level | setUpMessaging () const
| Set up local caches. More...
MSG::Level | resetMessaging ()
| Reinitialize internal states. More...
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...

## Detailed Description

HistogramPersistencySvc class implementation definition.

System: The LHCb Offline System

Package: HistogramPersistencySvc

Dependencies:

- PersistencySvc definition: "Kernel/Interfaces/PersistencySvc.h"

History:

    +---------+----------------------------------------------+---------+
    |    Date |                 Comment                      | Who     |
    +---------+----------------------------------------------+---------+
    | 3/11/98 | Initial version                              | M.Frank |
    +---------+----------------------------------------------+---------+

Author
  Markus Frank

Version
  1.0

Definition at line 47 of file HistogramPersistencySvc.h.

## Member Typedef Documentation

## ◆ Set

typedef std::set<std::string> HistogramPersistencySvc::Set

for report: unconverted histograms

Definition at line 70 of file HistogramPersistencySvc.h.

## Constructor & Destructor Documentation

## ◆ HistogramPersistencySvc()

HistogramPersistencySvc::HistogramPersistencySvc | ( | const std::string & | name,
|  | ISvcLocator * | svc
| ) |  |

Standard Constructor.

Definition at line 205 of file HistogramPersistencySvc.cpp.

206 : PersistencySvc( name, svc ) {
207 // bypass update handler
208 m_svcNames.value() = std::vector<std::string>{{"RootHistSvc"}};
209 }
PersistencySvc::m_svcNames
Gaudi::Property< std::vector< std::string > > m_svcNames
Definition: PersistencySvc.h:237
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:274
PersistencySvc
PersistencySvc class implementation definition.
Definition: PersistencySvc.h:50
std::vector< std::string >

## Member Function Documentation

## ◆ createRep()

StatusCode HistogramPersistencySvc::createRep | ( | DataObject * | pObject,
|  | IOpaqueAddress *& | refpAddress
| ) |  |
| override

Implementation of IConverter: Convert the transient object to the requested representation.

Definition at line 173 of file HistogramPersistencySvc.cpp.

173 {
174 // enable the conversion
175 enable( true );
176 // conversion is possible ?
177 if ( "NONE" == m_histPersName ) {
178 enable( false );
179 return PersistencySvc::createRep( pObj, refpAddr ); // RETURN
180 }
181 // histogram ?
182 if ( dynamic_cast<AIDA::IBaseHistogram*>( pObj ) ) {
183
184 auto match_pObj = [&]( const std::string& s ) { return match( pObj, s ); };
185 // Empty ConvertHistos property means convert all
186 bool select = ( m_convert.empty() || std::any_of( m_convert.begin(), m_convert.end(), match_pObj ) ) &&
187 std::none_of( m_exclude.begin(), m_exclude.end(), match_pObj );
188 //
189 enable( select );
190 //
191 const auto& path = oname( pObj );
192 //
193 if ( !select ) {
194 m_excluded.insert( path );
195 } else {
196 m_converted.insert( path );
197 }
198 }
199 //
200 return PersistencySvc::createRep( pObj, refpAddr ); // RETURN
201 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:932
HistogramPersistencySvc::m_convert
Gaudi::Property< std::vector< std::string > > m_convert
Definition: HistogramPersistencySvc.h:75
HistogramPersistencySvc::m_excluded
Set m_excluded
for the final report: the list of excluded histograms
Definition: HistogramPersistencySvc.h:84
HistogramPersistencySvc::m_histPersName
Gaudi::Property< std::string > m_histPersName
Definition: HistogramPersistencySvc.h:73
HistogramPersistencySvc::m_converted
Set m_converted
for the final report: the list of converted histograms
Definition: HistogramPersistencySvc.h:82
std::string
STL class.
HistogramPersistencySvc::m_exclude
Gaudi::Property< std::vector< std::string > > m_exclude
Definition: HistogramPersistencySvc.h:77
PersistencySvc::enable
bool enable(bool value)
Set enabled flag.
Definition: PersistencySvc.cpp:507
PersistencySvc::createRep
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
Definition: PersistencySvc.cpp:125
std::set::insert
T insert(T... args)
std::any_of
T any_of(T... args)
gaudirun.s
string s
Definition: gaudirun.py:316

## ◆ finalize()

StatusCode HistogramPersistencySvc::finalize | ( |  | ) |
| override

Finalize the service.

Definition at line 58 of file HistogramPersistencySvc.cpp.

58 {
59 //
60 if ( !( m_convert.empty() && m_exclude.empty() ) ) { // print message if any of the two properties is used
61 info() << "Histograms Converted/Excluded: " << m_converted.size() << "/" << m_excluded.size() << endmsg;
62 }
63 if ( msgLevel( MSG::DEBUG ) ) {
64 if ( !m_excluded.empty() ) {
65 auto& log = debug();
66 log << "Excluded Histos : #" << m_excluded.size();
67 for ( const auto& item : m_excluded ) { log << std::endl << " '" << item << "'"; }
68 log << endmsg;
69 }
70 //
71 if ( !m_converted.empty() ) {
72 auto& log = debug();
73 log << "Converted Histos : #" << m_converted.size();
74 for ( const auto& item : m_converted ) { log << std::endl << " '" << item << "'"; }
75 log << endmsg;
76 }
77 }
78 return PersistencySvc::finalize();
79 }
std::set::empty
T empty(T... args)
HistogramPersistencySvc::m_convert
Gaudi::Property< std::vector< std::string > > m_convert
Definition: HistogramPersistencySvc.h:75
HistogramPersistencySvc::m_excluded
Set m_excluded
for the final report: the list of excluded histograms
Definition: HistogramPersistencySvc.h:84
MSG::DEBUG
Definition: IMessageSvc.h:15
std::endl
T endl(T... args)
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:104
HistogramPersistencySvc::m_converted
Set m_converted
for the final report: the list of converted histograms
Definition: HistogramPersistencySvc.h:82
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
HistogramPersistencySvc::m_exclude
Gaudi::Property< std::vector< std::string > > m_exclude
Definition: HistogramPersistencySvc.h:77
PersistencySvc::finalize
StatusCode finalize() override
stop the service.
Definition: PersistencySvc.cpp:498
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
std::set::size
T size(T... args)
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
Gaudi.Configuration.log
log
Definition: Configuration.py:13

## ◆ initialize()

StatusCode HistogramPersistencySvc::initialize | ( |  | ) |
| override

Initialize the service.

Definition at line 83 of file HistogramPersistencySvc.cpp.

83 {
84 StatusCode status = PersistencySvc::initialize();
85 return status.isSuccess() ? reinitialize() : status;
86 }
PersistencySvc::initialize
StatusCode initialize() override
Initialize the service.
Definition: PersistencySvc.cpp:489
HistogramPersistencySvc::reinitialize
StatusCode reinitialize() override
Reinitialize the service.
Definition: HistogramPersistencySvc.cpp:90
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267

## ◆ reinitialize()

StatusCode HistogramPersistencySvc::reinitialize | ( |  | ) |
| override

Reinitialize the service.

Definition at line 90 of file HistogramPersistencySvc.cpp.

90 {
91 // Obtain the IProperty of the ApplicationMgr
92 auto prpMgr = serviceLocator()->as<IProperty>();
93 if ( !prpMgr ) {
94 fatal() << "IProperty interface not found in ApplicationMgr." << endmsg;
95 return StatusCode::FAILURE;
96 } else {
97 setProperty( prpMgr->getProperty( "HistogramPersistency" ) ).ignore();
98 }
99
100 // To keep backward compatibility, we set the property of conversion service
101 // into JobOptions catalogue
102 if ( !m_outputFile.empty() ) {
103 auto joptsvc = serviceLocator()->service<IJobOptionsSvc>( "JobOptionsSvc" );
104 if ( joptsvc ) {
105 Gaudi::Property<std::string> p( "OutputFile", m_outputFile );
106 if ( m_histPersName == "ROOT" ) {
107 joptsvc->addPropertyToCatalogue( "RootHistSvc", p ).ignore();
108 } else if ( m_histPersName == "HBOOK" ) {
109 joptsvc->addPropertyToCatalogue( "HbookHistSvc", p ).ignore();
110 }
111 }
112 }
113
114 // Load the Histogram persistency service that's required as default
115 setConversionSvc( nullptr ).ignore();
116 if ( m_histPersName == "ROOT" ) {
117 setConversionSvc( service( "RootHistSvc" ) ).ignore();
118 if ( !conversionSvc() ) { return StatusCode::FAILURE; }
119 enable( true );
120 } else if ( m_histPersName == "HBOOK" ) {
121 setConversionSvc( service( "HbookHistSvc" ) ).ignore();
122 if ( !conversionSvc() ) { return StatusCode::FAILURE; }
123 enable( true );
124 } else if ( m_histPersName == "NONE" ) {
125 enable( false );
126 if ( m_warnings ) { warning() << "Histograms saving not required." << endmsg; }
127 } else {
128 setConversionSvc( service( m_histPersName ) ).ignore();
129 if ( !conversionSvc() ) { return StatusCode::FAILURE; }
130 enable( true );
131 if ( m_warnings ) { warning() << "Unknown Histogram Persistency Mechanism " << m_histPersName << endmsg; }
132 }
133 return StatusCode::SUCCESS;
134 }
PersistencySvc::service
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
Definition: PersistencySvc.cpp:204
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:277
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:352
PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >::setProperty
StatusCode setProperty(const Gaudi::Details::PropertyBase &p) override
set the property form another property
Definition: PropertyHolder.h:145
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:101
HistogramPersistencySvc::m_histPersName
Gaudi::Property< std::string > m_histPersName
Definition: HistogramPersistencySvc.h:73
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
PersistencySvc::setConversionSvc
StatusCode setConversionSvc(IConversionSvc *svc) override
Set conversion service the converter is connected to.
Definition: PersistencySvc.cpp:171
ISvcLocator::as
SmartIF< IFace > as()
Definition: ISvcLocator.h:103
HistogramPersistencySvc::m_outputFile
Gaudi::Property< std::string > m_outputFile
Definition: HistogramPersistencySvc.h:74
PersistencySvc::enable
bool enable(bool value)
Set enabled flag.
Definition: PersistencySvc.cpp:507
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:76
IJobOptionsSvc
Main interface for the JobOptions service.
Definition: IJobOptionsSvc.h:20
HistogramPersistencySvc::m_warnings
Gaudi::Property< bool > m_warnings
Definition: HistogramPersistencySvc.h:79
PersistencySvc::conversionSvc
SmartIF< IConversionSvc > & conversionSvc() const override
Get conversion service the converter is connected to.
Definition: PersistencySvc.cpp:177
StatusCode::ignore
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:153
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
IProperty
The IProperty is the basic interface for all components which have properties that can be set or get.
Definition: IProperty.h:20
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:92
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## Member Data Documentation

## ◆ m_convert

Gaudi::Property<std::vector<std::string> > HistogramPersistencySvc::m_convert
| protected

Initial value:
{
this, "ConvertHistos", {}, "The list of patterns to be accepted for conversion"}

Definition at line 75 of file HistogramPersistencySvc.h.

## ◆ m_converted

Set HistogramPersistencySvc::m_converted
| protected

for the final report: the list of converted histograms

Definition at line 82 of file HistogramPersistencySvc.h.

## ◆ m_exclude

Gaudi::Property<std::vector<std::string> > HistogramPersistencySvc::m_exclude
| protected

Initial value:
{
this, "ExcludeHistos", {}, "The list of patterns to be excluded from conversion"}

Definition at line 77 of file HistogramPersistencySvc.h.

## ◆ m_excluded

Set HistogramPersistencySvc::m_excluded
| protected

for the final report: the list of excluded histograms

Definition at line 84 of file HistogramPersistencySvc.h.

## ◆ m_histPersName

Gaudi::Property<std::string> HistogramPersistencySvc::m_histPersName {this, "HistogramPersistency", "", "name of the Hist Pers type"}
| protected

Definition at line 73 of file HistogramPersistencySvc.h.

## ◆ m_outputFile

Gaudi::Property<std::string> HistogramPersistencySvc::m_outputFile {this, "OutputFile", "", "name of the output file"}
| protected

Definition at line 74 of file HistogramPersistencySvc.h.

## ◆ m_warnings

Gaudi::Property<bool> HistogramPersistencySvc::m_warnings {this, "Warnings", true, "Set this property to false to suppress warning messages"}
| protected

Definition at line 79 of file HistogramPersistencySvc.h.

The documentation for this class was generated from the following files:

- GaudiCommonSvc/src/HistogramPersistencySvc/HistogramPersistencySvc.h
- GaudiCommonSvc/src/HistogramPersistencySvc/HistogramPersistencySvc.cpp