20 #define PERSISTENCYSVC_HISTOGRAMPERSISTENCYSVC_CPP 42 #pragma clang diagnostic push 43 #pragma clang diagnostic ignored "-Wkeyword-macro" 45 #define class class GAUDI_API 47 #pragma clang diagnostic pop 49 #include "AIDA/IBaseHistogram.h" 61 if ( !( m_convert.empty() && m_exclude.empty() ) ) {
62 info() <<
"Histograms Converted/Excluded: " << m_converted.size() <<
"/" << m_excluded.size() <<
endmsg;
65 if ( !m_excluded.empty() ) {
67 log <<
"Excluded Histos : #" << m_excluded.size();
68 for (
const auto& item : m_excluded ) {
74 if ( !m_converted.empty() ) {
76 log <<
"Converted Histos : #" << m_converted.size();
77 for (
const auto& item : m_converted ) {
101 fatal() <<
"IProperty interface not found in ApplicationMgr." <<
endmsg;
104 setProperty( prpMgr->getProperty(
"HistogramPersistency" ) ).ignore();
114 joptsvc->addPropertyToCatalogue(
"RootHistSvc", p ).ignore();
116 joptsvc->addPropertyToCatalogue(
"HbookHistSvc", p ).ignore();
168 return std::string::npos != name.
find( pat );
189 inline bool match(
const DataObject* obj,
const std::string& pat ) {
return obj && match( oname( obj ), pat ); }
205 if ( dynamic_cast<AIDA::IBaseHistogram*>( pObj ) ) {
207 auto match_pObj = [&](
const std::string&
s ) {
return match( pObj,
s ); };
214 const auto&
path = oname( pObj );
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
constexpr static const auto FAILURE
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
const std::string & name() const override
Retrieve name of the service.
StatusCode initialize() override
Initialize the service.
Gaudi::Property< std::vector< std::string > > m_convert
Implementation of property with value of concrete type.
StatusCode setProperty(const Gaudi::Details::PropertyBase &p) override
set the property form another property
Set m_excluded
for the final report: the list of excluded histograms
Gaudi::Property< std::vector< std::string > > m_svcNames
Gaudi::Property< std::string > m_histPersName
StatusCode setConversionSvc(IConversionSvc *svc) override
Set conversion service the converter is connected to.
StatusCode reinitialize() override
Reinitialize the service.
Set m_converted
for the final report: the list of converted histograms
Gaudi::Property< std::string > m_outputFile
IRegistry * registry() const
Get pointer to Registry.
#define DECLARE_COMPONENT(type)
Gaudi::Property< std::vector< std::string > > m_exclude
bool enable(bool value)
Set enabled flag.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Main interface for the JobOptions service.
StatusCode initialize() override
Initialize the service.
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Gaudi::Property< bool > m_warnings
virtual const id_type & identifier() const =0
Full identifier (or key)
This class is used for returning status codes from appropriate routines.
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
StatusCode finalize() override
stop the service.
PersistencySvc class implementation definition.
HistogramPersistencySvc class implementation definition.
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
SmartIF< IConversionSvc > & conversionSvc() const override
Get conversion service the converter is connected to.
HistogramPersistencySvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
constexpr static const auto SUCCESS
const StatusCode & ignore() const
Ignore/check StatusCode.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Opaque address interface definition.
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
The IProperty is the basic interface for all components which have properties that can be set or get...
A DataObject is the base class of any identifiable object on any data store.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.