21 #define PERSISTENCYSVC_HISTOGRAMPERSISTENCYSVC_CPP
42 #define class class GAUDI_API
43 #include "AIDA/IBaseHistogram.h"
56 if ( !(m_convert.empty() && m_exclude.empty()) )
58 log <<
MSG::INFO <<
"Histograms Converted/Excluded: "
59 << m_converted.size() <<
"/" << m_excluded.size() <<
endmsg ;
62 if ( !m_excluded.empty() )
64 log <<
MSG::DEBUG <<
"Excluded Histos : #" << m_excluded.size() ;
67 { log <<
std::endl <<
" '" << (*item) <<
"'" ; }
71 if ( !m_converted.empty() )
73 log <<
MSG::DEBUG <<
"Converted Histos : #" << m_converted.size() ;
76 { log <<
std::endl <<
" '" << (*item) <<
"'" ; }
101 log <<
MSG::FATAL <<
"IProperty interface not found in ApplicationMgr." <<
endmsg;
105 setProperty(prpMgr->getProperty(
"HistogramPersistency")).ignore();
115 joptsvc->addPropertyToCatalogue(
"RootHistSvc", p).ignore();
117 joptsvc->addPropertyToCatalogue(
"HbookHistSvc", p).ignore();
174 return std::string::npos != name.find ( pat );
183 if ( 0 == obj ) {
return s_NULL ; }
185 return ( 0 == reg ) ? obj -> name () : reg -> identifier () ;
196 if ( 0 == obj ) {
return false ; }
197 return match ( oname ( obj ) , pat ) ;
211 if (
"NONE" == m_histPersName )
217 if ( 0 != dynamic_cast<AIDA::IBaseHistogram*> ( pObj ) )
221 if ( m_convert.empty() ) { select = true ; }
226 {
if ( match ( pObj , *
item ) ) { select = true ; break ; } }
231 {
if ( match ( pObj , *
item ) ) { select = false ; break ; } }
237 if ( !select ) { m_excluded.insert ( path ) ; }
238 else { m_converted.insert ( path ) ; }
259 m_svcNames.set(defServices);
260 declareProperty (
"HistogramPersistency", m_histPersName =
"");
261 declareProperty (
"OutputFile", m_outputFile =
"");
264 (
"ConvertHistos" , m_convert ,
265 "The list of patterns to be accepted for conversion" ) ;
268 (
"ExcludeHistos" , m_exclude ,
269 "The list of patterns to be excluded for conversion" ) ;
270 declareProperty(
"Warnings",m_warnings=
true,
271 "Set this property to false to suppress warning messages");