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> 
   70    info() << 
"Histograms Converted/Excluded: " << m_converted.size() << 
"/" << m_excluded.size() << endmsg;
 
   75      log << 
"Excluded  Histos : #" << 
m_excluded.size();
 
   76      for ( 
const auto& item : 
m_excluded ) { log << std::endl << 
"  '" << item << 
"'"; }
 
   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;
 
  106    setProperty( prpMgr->getProperty( 
"HistogramPersistency" ) ).ignore();
 
  113    const std::string outputFile = 
'"' + 
m_outputFile + 
'"';
 
  115      opts.set( 
"RootHistSvc.OutputFile", outputFile );
 
  117      opts.set( 
"HbookHistSvc.OutputFile", outputFile );
 
 
  146  const std::string s_NULL = 
"<NULL>";
 
  154  inline bool match( 
const std::string& name, 
const std::string& pat ) {
 
  156    return std::string::npos != name.find( pat );
 
  163  inline const std::string& oname( 
const DataObject* obj ) {
 
  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 );
 
 
  215  m_svcNames.value() = std::vector<std::string>{ { 
"RootHistSvc" } };
 
 
bool PyHelper setProperty(IInterface *p, char *name, char *value)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MSG::Level msgLevel() const
A DataObject is the base class of any identifiable object on any data store.
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
IRegistry * registry() const
Get pointer to Registry.
HistogramPersistencySvc class implementation definition.
Set m_converted
for the final report: the list of converted histograms
Gaudi::Property< std::string > m_histPersName
StatusCode initialize() override
Initialize the service.
HistogramPersistencySvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
StatusCode finalize() override
Finalize the service.
Gaudi::Property< std::vector< std::string > > m_convert
Gaudi::Property< bool > m_warnings
StatusCode reinitialize() override
Reinitialize the service.
Set m_excluded
for the final report: the list of excluded histograms
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
Gaudi::Property< std::string > m_outputFile
Gaudi::Property< std::vector< std::string > > m_exclude
Opaque address interface definition.
The IProperty is the basic interface for all components which have properties that can be set or get.
virtual const id_type & identifier() const =0
Full identifier (or key)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Gaudi::Interfaces::IOptionsSvc & getOptsSvc()
Direct access to Gaudi::Interfaces::IOptionsSvc implementation.
PersistencySvc class implementation definition.
StatusCode setConversionSvc(IConversionSvc *svc) override
Set conversion service the converter is connected to.
Gaudi::Property< std::vector< std::string > > m_svcNames
SmartIF< IConversionSvc > & conversionSvc() const override
Get conversion service the converter is connected to.
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
StatusCode initialize() override
Initialize the service.
bool enable(bool value)
Set enabled flag.
StatusCode finalize() override
stop the service.
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
const std::string & name() const override
Retrieve name of the service.
This class is used for returning status codes from appropriate routines.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE