21 #define PERSISTENCYSVC_HISTOGRAMPERSISTENCYSVC_CPP
43 #define class class GAUDI_API
44 #include "AIDA/IBaseHistogram.h"
57 if ( !(m_convert.empty() && m_exclude.empty()) )
59 log <<
MSG::INFO <<
"Histograms Converted/Excluded: "
60 << m_converted.size() <<
"/" << m_excluded.size() <<
endmsg ;
63 if ( !m_excluded.empty() )
65 log <<
MSG::DEBUG <<
"Excluded Histos : #" << m_excluded.size() ;
68 { log <<
std::endl <<
" '" << (*item) <<
"'" ; }
72 if ( !m_converted.empty() )
74 log <<
MSG::DEBUG <<
"Converted Histos : #" << m_converted.size() ;
77 { log <<
std::endl <<
" '" << (*item) <<
"'" ; }
102 log <<
MSG::FATAL <<
"IProperty interface not found in ApplicationMgr." <<
endmsg;
106 setProperty(prpMgr->getProperty(
"HistogramPersistency")).ignore();
116 joptsvc->addPropertyToCatalogue(
"RootHistSvc", p).ignore();
118 joptsvc->addPropertyToCatalogue(
"HbookHistSvc", p).ignore();
175 return std::string::npos != name.find ( pat );
184 if ( 0 == obj ) {
return s_NULL ; }
186 return ( 0 == reg ) ? obj -> name () : reg -> identifier () ;
197 if ( 0 == obj ) {
return false ; }
198 return match ( oname ( obj ) , pat ) ;
212 if (
"NONE" == m_histPersName )
218 if ( 0 != dynamic_cast<AIDA::IBaseHistogram*> ( pObj ) )
222 if ( m_convert.empty() ) { select = true ; }
227 {
if ( match ( pObj , *
item ) ) { select = true ; break ; } }
232 {
if ( match ( pObj , *
item ) ) { select = false ; break ; } }
238 if ( !select ) { m_excluded.insert ( path ) ; }
239 else { m_converted.insert ( path ) ; }
260 m_svcNames.set(defServices);
261 declareProperty (
"HistogramPersistency", m_histPersName =
"");
262 declareProperty (
"OutputFile", m_outputFile =
"");
265 (
"ConvertHistos" , m_convert ,
266 "The list of patterns to be accepted for conversion" ) ;
269 (
"ExcludeHistos" , m_exclude ,
270 "The list of patterns to be excluded for conversion" ) ;
271 declareProperty(
"Warnings",m_warnings=
true,
272 "Set this property to false to suppress warning messages");