Go to the documentation of this file.
30 #define PERSISTENCYSVC_HISTOGRAMPERSISTENCYSVC_CPP
51 # pragma clang diagnostic push
52 # pragma clang diagnostic ignored "-Wkeyword-macro"
54 #define class class GAUDI_API
56 # pragma clang diagnostic pop
58 #include <AIDA/IBaseHistogram.h>
69 if ( !( m_convert.empty() && m_exclude.empty() ) ) {
70 info() <<
"Histograms Converted/Excluded: " << m_converted.size() <<
"/" << m_excluded.size() <<
endmsg;
73 if ( !m_excluded.empty() ) {
75 log <<
"Excluded Histos : #" << m_excluded.size();
76 for (
const auto& item : m_excluded ) {
log <<
std::endl <<
" '" << item <<
"'"; }
80 if ( !m_converted.empty() ) {
82 log <<
"Converted Histos : #" << m_converted.size();
83 for (
const auto& item : m_converted ) {
log <<
std::endl <<
" '" << item <<
"'"; }
103 fatal() <<
"IProperty interface not found in ApplicationMgr." <<
endmsg;
115 opts.set(
"RootHistSvc.OutputFile", outputFile );
117 opts.set(
"HbookHistSvc.OutputFile", outputFile );
156 return std::string::npos !=
name.find( pat );
164 if ( !obj ) {
return s_NULL; }
174 inline bool match(
const DataObject* obj,
const std::string& pat ) {
return obj && match( oname( obj ), pat ); }
189 if (
dynamic_cast<AIDA::IBaseHistogram*
>( pObj ) ) {
191 auto match_pObj = [&](
const std::string&
s ) {
return match( pObj,
s ); };
198 const auto&
path = oname( pObj );
PersistencySvc class implementation definition.
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
StatusCode finalize() override
stop the service.
HistogramPersistencySvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
SmartIF< IConversionSvc > & conversionSvc() const override
Get conversion service the converter is connected to.
Gaudi::Property< std::vector< std::string > > m_convert
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
StatusCode setProperty(const Gaudi::Details::PropertyBase &p)
Set the property from a property.
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
StatusCode initialize() override
Initialize the service.
Set m_excluded
for the final report: the list of excluded histograms
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
const ValueType & value() const
Set m_converted
for the final report: the list of converted histograms
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Gaudi::Property< std::string > m_histPersName
Gaudi::Property< std::vector< std::string > > m_svcNames
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Gaudi::Property< bool > m_warnings
StatusCode initialize() override
Initialize the service.
StatusCode setConversionSvc(IConversionSvc *svc) override
Set conversion service the converter is connected to.
constexpr static const auto SUCCESS
StatusCode reinitialize() override
Reinitialize the service.
Gaudi::Property< std::string > m_outputFile
HistogramPersistencySvc class implementation definition.
#define DECLARE_COMPONENT(type)
virtual const id_type & identifier() const =0
Full identifier (or key)
constexpr static const auto FAILURE
bool enable(bool value)
Set enabled flag.
IRegistry * registry() const
Get pointer to Registry.
Gaudi::Property< std::vector< std::string > > m_exclude
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator