| The Gaudi Framework v27r1

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

HistogramPersistencySvc class implementation definition. More...

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

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

## Public Types
typedef std::vector< std::string > | Strings
| the actual type for the vector of strings More...
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
typedef Gaudi::PluginService::Factory< IService *, const std::string &, ISvcLocator * > | Factory
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...
| ~HistogramPersistencySvc () override=default
| Standard Destructor. 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...
| PersistencySvc (const std::string &name, ISvcLocator *svc)
| Standard Constructor. More...
| ~PersistencySvc () override=default
| Standard Destructor. 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...
| ~extends () override=default
| Virtual destructor. 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...
StatusCode | setProperty (const Property &p) override
StatusCode | setProperty (const std::string &s) override
StatusCode | setProperty (const std::string &n, const std::string &v) override
StatusCode | getProperty (Property *p) const override
const Property & | getProperty (const std::string &name) const override
StatusCode | getProperty (const std::string &n, std::string &v) const override
const std::vector< Property * > & | getProperties () const override
bool | hasProperty (const std::string &name) const override
template<class TYPE >
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value 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 >
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const
| Declare the named property. More...
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
| Declare remote named properties. More...
template<class T >
StatusCode | declarePrivateTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used Private tool. More...
template<class T >
StatusCode | declarePublicTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used Public 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 CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
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...
MSG::Level | msgLevel () const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces...>
| ~extend_interfaces () override=default
| Virtual destructor. More...

## Protected Attributes
std::string | m_histPersName
| Name of the Hist Pers type. More...
std::string | m_outputFile
| Name of the outputFile. More...
Strings | m_convert
| the list of patterns to be converted More...
Strings | m_exclude
| the list of patterns to be excludes More...
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...
bool | m_warnings
| Flag to disable warning messages when using external input. 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...
StringArrayProperty | m_svcNames
| Names of services to be requested from the service locator and added by default. More...
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
IntegerProperty | m_outputLevel = MSG::NIL
| Service output level. More...
Gaudi::StateMachine::State | m_state = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::StateMachine::State | m_targetState = Gaudi::StateMachine::OFFLINE
| Service state. More...

## Additional Inherited Members
Protected Types inherited from PersistencySvc
typedef std::map< long, ServiceEntry > | Services
Protected Member Functions inherited from PersistencySvc
void | svcNamesHandler (Property &theProp)
| Handlers for Service Names Property. More...
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 CommonMessaging< implements< IService, IProperty, IStateful > >
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

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

for report: unconverted histograms

Definition at line 75 of file HistogramPersistencySvc.h.

typedef std::vector<std::string> HistogramPersistencySvc::Strings

the actual type for the vector of strings

Definition at line 73 of file HistogramPersistencySvc.h.

## Constructor & Destructor Documentation

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

Standard Constructor.

Definition at line 240 of file HistogramPersistencySvc.cpp.

242 : PersistencySvc(name, svc)
243 {
244 std::vector<std::string> defServices;
245 defServices.push_back("RootHistSvc");
246 m_svcNames.set(defServices);
247 declareProperty ("HistogramPersistency", m_histPersName = "");
248 declareProperty ("OutputFile", m_outputFile = "");
249 //
250 declareProperty
251 ("ConvertHistos" , m_convert ,
252 "The list of patterns to be accepted for conversion" ) ;
253 //
254 declareProperty
255 ("ExcludeHistos" , m_exclude ,
256 "The list of patterns to be excluded for conversion" ) ;
257 declareProperty("Warnings",m_warnings=true,
258 "Set this property to false to suppress warning messages");
259 }
PropertyWithVerifier::set
bool set(const TYPE &value)
update the value of the property/check the verifier
Definition: Property.h:434
PersistencySvc::m_svcNames
StringArrayProperty m_svcNames
Names of services to be requested from the service locator and added by default.
Definition: PersistencySvc.h:277
HistogramPersistencySvc::m_convert
Strings m_convert
the list of patterns to be converted
Definition: HistogramPersistencySvc.h:83
PersistencySvc::PersistencySvc
PersistencySvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
Definition: PersistencySvc.cpp:567
HistogramPersistencySvc::m_warnings
bool m_warnings
Flag to disable warning messages when using external input.
Definition: HistogramPersistencySvc.h:91
std::vector::push_back
T push_back(T...args)
std::vector< std::string >
HistogramPersistencySvc::m_exclude
Strings m_exclude
the list of patterns to be excludes
Definition: HistogramPersistencySvc.h:85
Service::declareProperty
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:215
HistogramPersistencySvc::m_outputFile
std::string m_outputFile
Name of the outputFile.
Definition: HistogramPersistencySvc.h:81
HistogramPersistencySvc::m_histPersName
std::string m_histPersName
Name of the Hist Pers type.
Definition: HistogramPersistencySvc.h:79

HistogramPersistencySvc::~HistogramPersistencySvc | ( |  | ) |
| override default

Standard Destructor.

## Member Function Documentation

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

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

Definition at line 205 of file HistogramPersistencySvc.cpp.

207 {
208 // enable the conversion
209 enable ( true ) ;
210 // conversion is possible ?
211 if ( "NONE" == m_histPersName )
212 {
213 enable ( false ) ;
214 return PersistencySvc::createRep ( pObj , refpAddr ) ; // RETURN
215 }
216 // histogram ?
217 if ( dynamic_cast<AIDA::IBaseHistogram*> ( pObj ) )
218 {
219
220 auto match_pObj = [&](const std::string& s) { return match( pObj , s ); };
221 // Empty ConvertHistos property means convert all
222 bool select = ( m_convert.empty()
223 || std::any_of( m_convert.begin(), m_convert.end(), match_pObj )
224 ) && std::none_of( m_exclude.begin(), m_exclude.end(), match_pObj );
225 //
226 enable ( select ) ;
227 //
228 const auto& path = oname ( pObj ) ;
229 //
230 if ( !select ) { m_excluded.insert ( path ) ; }
231 else { m_converted.insert ( path ) ; }
232 }
233 //
234 return PersistencySvc::createRep ( pObj , refpAddr ) ; // RETURN
235 }
std::vector::empty
T empty(T...args)
HistogramPersistencySvc::m_excluded
Set m_excluded
for the final report: the list of excluded histograms
Definition: HistogramPersistencySvc.h:89
std::vector::end
T end(T...args)
HistogramPersistencySvc::m_convert
Strings m_convert
the list of patterns to be converted
Definition: HistogramPersistencySvc.h:83
HistogramPersistencySvc::m_converted
Set m_converted
for the final report: the list of converted histograms
Definition: HistogramPersistencySvc.h:87
std::string
STL class.
PersistencySvc::enable
bool enable(bool value)
Set enabled flag.
Definition: PersistencySvc.cpp:560
PersistencySvc::createRep
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
Definition: PersistencySvc.cpp:133
Gaudi::Utils::Histos::path
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
Definition: HistoTableFormat.cpp:191
std::set::insert
T insert(T...args)
std::vector::begin
T begin(T...args)
std::any_of
T any_of(T...args)
gaudirun.s
string s
Definition: gaudirun.py:245
HistogramPersistencySvc::m_exclude
Strings m_exclude
the list of patterns to be excludes
Definition: HistogramPersistencySvc.h:85
AnalysisInit.select
def select(list, sel)
Definition: AnalysisInit.py:29
HistogramPersistencySvc::m_histPersName
std::string m_histPersName
Name of the Hist Pers type.
Definition: HistogramPersistencySvc.h:79

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

Finalize the service.

Definition at line 58 of file HistogramPersistencySvc.cpp.

59 {
60 //
61 if ( !(m_convert.empty() && m_exclude.empty()) )
62 { // print message if any of the two properties is used
63 info() << "Histograms Converted/Excluded: "
64 << m_converted.size() << "/" << m_excluded.size() << endmsg ;
65 }
66 if (msgLevel(MSG::DEBUG)) {
67 if ( !m_excluded.empty() )
68 {
69 auto& log = debug();
70 log << "Excluded Histos : #" << m_excluded.size() ;
71 for ( const auto& item : m_excluded )
72 { log << std::endl << " '" << item << "'" ; }
73 log << endmsg ;
74 }
75 //
76 if ( !m_converted.empty() )
77 {
78 auto& log = debug();
79 log << "Converted Histos : #" << m_converted.size() ;
80 for ( const auto& item : m_converted )
81 { log << std::endl << " '" << item << "'" ; }
82 log << endmsg ;
83 }
84 }
85 return PersistencySvc::finalize();
86 }
std::vector::empty
T empty(T...args)
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:124
HistogramPersistencySvc::m_excluded
Set m_excluded
for the final report: the list of excluded histograms
Definition: HistogramPersistencySvc.h:89
Gaudi.Configuration.log
tuple log
Definition: Configuration.py:13
MSG::DEBUG
Definition: IMessageSvc.h:18
std::endl
T endl(T...args)
HistogramPersistencySvc::m_convert
Strings m_convert
the list of patterns to be converted
Definition: HistogramPersistencySvc.h:83
HistogramPersistencySvc::m_converted
Set m_converted
for the final report: the list of converted histograms
Definition: HistogramPersistencySvc.h:87
PersistencySvc::finalize
StatusCode finalize() override
stop the service.
Definition: PersistencySvc.cpp:547
std::set::size
T size(T...args)
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:127
HistogramPersistencySvc::m_exclude
Strings m_exclude
the list of patterns to be excludes
Definition: HistogramPersistencySvc.h:85
ana.item
tuple item
print s1,s2
Definition: ana.py:146
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:136
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

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

Initialize the service.

Definition at line 90 of file HistogramPersistencySvc.cpp.

90 {
91 StatusCode status = PersistencySvc::initialize();
92 return status.isSuccess() ? reinitialize() : status;
93 }
PersistencySvc::initialize
StatusCode initialize() override
Initialize the service.
Definition: PersistencySvc.cpp:536
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
HistogramPersistencySvc::reinitialize
StatusCode reinitialize() override
Reinitialize the service.
Definition: HistogramPersistencySvc.cpp:97
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26

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

Reinitialize the service.

Definition at line 97 of file HistogramPersistencySvc.cpp.

98 {
99 // Obtain the IProperty of the ApplicationMgr
100 auto prpMgr = serviceLocator()->as<IProperty>();
101 if ( !prpMgr ) {
102 fatal() << "IProperty interface not found in ApplicationMgr." << endmsg;
103 return StatusCode::FAILURE;
104 }
105 else {
106 setProperty(prpMgr->getProperty("HistogramPersistency")).ignore();
107 }
108
109 // To keep backward compatibility, we set the property of conversion service
110 // into JobOptions catalogue
111 if( !m_outputFile.empty() ) {
112 auto joptsvc = serviceLocator()->service<IJobOptionsSvc> ("JobOptionsSvc");
113 if( joptsvc ) {
114 StringProperty p("OutputFile", m_outputFile);
115 if ( m_histPersName == "ROOT" ) {
116 joptsvc->addPropertyToCatalogue("RootHistSvc", p).ignore();
117 } else if (m_histPersName == "HBOOK" ) {
118 joptsvc->addPropertyToCatalogue("HbookHistSvc", p).ignore();
119 }
120 }
121 }
122
123 // Load the Histogram persistency service that's required as default
124 setConversionSvc(nullptr).ignore();
125 if ( m_histPersName == "ROOT" ) {
126 setConversionSvc(service("RootHistSvc")).ignore();
127 if ( !conversionSvc() ) {
128 return StatusCode::FAILURE;
129 }
130 enable(true);
131 }
132 else if ( m_histPersName == "HBOOK" ) {
133 setConversionSvc(service("HbookHistSvc")).ignore();
134 if ( !conversionSvc() ) {
135 return StatusCode::FAILURE;
136 }
137 enable(true);
138 }
139 else if ( m_histPersName == "NONE" ) {
140 enable(false);
141 if ( m_warnings ) {
142 warning() << "Histograms saving not required." << endmsg;
143 }
144 }
145 else {
146 setConversionSvc(service(m_histPersName)).ignore();
147 if ( !conversionSvc() ) {
148 return StatusCode::FAILURE;
149 }
150 enable(true);
151 if ( m_warnings ) {
152 warning() << "Unknown Histogram Persistency Mechanism " << m_histPersName << endmsg;
153 }
154 }
155 return StatusCode::SUCCESS;
156 }
PersistencySvc::service
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
Definition: PersistencySvc.cpp:222
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:324
std::string::empty
T empty(T...args)
Service::setProperty
StatusCode setProperty(const Property &p) override
Definition: Service.cpp:330
PersistencySvc::setConversionSvc
StatusCode setConversionSvc(IConversionSvc *svc) override
Set conversion service the converter is connected to.
Definition: PersistencySvc.cpp:183
ISvcLocator::as
SmartIF< IFace > as()
Definition: ISvcLocator.h:106
HistogramPersistencySvc::m_warnings
bool m_warnings
Flag to disable warning messages when using external input.
Definition: HistogramPersistencySvc.h:91
SimpleProperty< std::string >
PersistencySvc::enable
bool enable(bool value)
Set enabled flag.
Definition: PersistencySvc.cpp:560
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:78
IJobOptionsSvc
Main interface for the JobOptions service.
Definition: IJobOptionsSvc.h:20
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:121
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode::SUCCESS
Definition: StatusCode.h:30
PersistencySvc::conversionSvc
SmartIF< IConversionSvc > & conversionSvc() const override
Get conversion service the converter is connected to.
Definition: PersistencySvc.cpp:189
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:108
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:112
IProperty
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:21
HistogramPersistencySvc::m_outputFile
std::string m_outputFile
Name of the outputFile.
Definition: HistogramPersistencySvc.h:81
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
HistogramPersistencySvc::m_histPersName
std::string m_histPersName
Name of the Hist Pers type.
Definition: HistogramPersistencySvc.h:79

## Member Data Documentation

Strings HistogramPersistencySvc::m_convert
| protected

the list of patterns to be converted

Definition at line 83 of file HistogramPersistencySvc.h.

Set HistogramPersistencySvc::m_converted
| protected

for the final report: the list of converted histograms

Definition at line 87 of file HistogramPersistencySvc.h.

Strings HistogramPersistencySvc::m_exclude
| protected

the list of patterns to be excludes

Definition at line 85 of file HistogramPersistencySvc.h.

Set HistogramPersistencySvc::m_excluded
| protected

for the final report: the list of excluded histograms

Definition at line 89 of file HistogramPersistencySvc.h.

std::string HistogramPersistencySvc::m_histPersName
| protected

Name of the Hist Pers type.

Definition at line 79 of file HistogramPersistencySvc.h.

std::string HistogramPersistencySvc::m_outputFile
| protected

Name of the outputFile.

Definition at line 81 of file HistogramPersistencySvc.h.

bool HistogramPersistencySvc::m_warnings
| protected

Flag to disable warning messages when using external input.

Definition at line 91 of file HistogramPersistencySvc.h.

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

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