00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <algorithm>
00012 #include <cstdlib>
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "GaudiKernel/IDataProviderSvc.h"
00026 #include "GaudiKernel/IToolSvc.h"
00027 #include "GaudiKernel/IProperty.h"
00028 #include "GaudiKernel/Property.h"
00029 #include "GaudiKernel/ISvcLocator.h"
00030 #include "GaudiKernel/MsgStream.h"
00031 #include "GaudiKernel/ObjectVector.h"
00032 #include "GaudiKernel/SmartDataPtr.h"
00033 #include "GaudiKernel/SmartRef.h"
00034 #include "GaudiKernel/Stat.h"
00035 #include "GaudiKernel/System.h"
00036 #include "GaudiKernel/IJobOptionsSvc.h"
00037 #include "GaudiKernel/StatEntity.h"
00038 #include "GaudiKernel/Algorithm.h"
00039 #include "GaudiKernel/AlgTool.h"
00040
00041
00042
00043 #include "GaudiAlg/Print.h"
00044 #include "GaudiAlg/GaudiCommon.h"
00045 #include "GaudiAlg/GaudiAlgorithm.h"
00046 #include "GaudiAlg/GaudiTool.h"
00047
00048
00049
00050 #include "GaudiUtils/RegEx.h"
00051
00052
00053
00054 #include "boost/format.hpp"
00055 #include "boost/lexical_cast.hpp"
00056
00057
00058 #ifdef _WIN32
00059 #pragma warning ( disable:4661 ) // incomplete explicit templates
00060 #endif
00061
00062
00063
00064
00065
00066 template < class PBASE >
00067 GaudiCommon<PBASE>::~GaudiCommon() { resetMsgStream(); }
00068
00069
00070
00071
00072
00073 template <class PBASE>
00074 void
00075 GaudiCommon<PBASE>::initGaudiCommonConstructor( const IInterface * parent )
00076 {
00077
00078 m_msgLevel = MSG::NIL;
00079 m_msgStream = 0;
00080 m_updMgrSvc = 0;
00081 m_fastContainersSvc = 0;
00082 m_typePrint = true;
00083 m_propsPrint = false;
00084 m_statPrint = true;
00085 m_errorsPrint = true;
00086 m_context = "" ;
00087 m_rootInTES = "" ;
00088 m_globalTimeOffset = 0.0 ;
00089
00090 m_counterSummarySvc=NULL;
00091 m_counterList=std::vector<std::string>(1,".*");
00092 m_statEntityList=std::vector<std::string>(0);
00093
00094
00095
00096
00097 m_header = " | Counter | # | sum | mean/eff^* | rms/err^* | min | max |" ;
00098
00099 m_format1 = " | %|-48.48s|%|50t||%|10d| |%|11.7g| |%|#11.5g| |%|#11.5g| |%|#12.5g| |%|#12.5g| |" ;
00100
00101 m_format2 = " |*%|-48.48s|%|50t||%|10d| |%|11.5g| |(%|#9.6g| +- %|-#9.6g|)%%| ------- | ------- |" ;
00102
00103 m_useEffFormat = true ;
00104
00105
00106
00107 this->declareProperty
00108 ( "ErrorsPrint" , m_errorsPrint ,
00109 "Print the statistics of errors/warnings/exceptions")
00110 -> declareUpdateHandler
00111 ( &GaudiCommon<PBASE>::printErrorHandler, this ) ;
00112
00113 this->declareProperty
00114 ( "PropertiesPrint" , m_propsPrint ,
00115 "Print the properties of the component ")
00116 -> declareUpdateHandler
00117 ( &GaudiCommon<PBASE>::printPropsHandler, this ) ;
00118
00119 this->declareProperty
00120 ( "StatPrint" , m_statPrint ,
00121 "Print the table of counters" )
00122 -> declareUpdateHandler
00123 ( &GaudiCommon<PBASE>::printStatHandler, this ) ;
00124
00125 this->declareProperty
00126 ( "TypePrint" , m_typePrint ,
00127 "Add the actal C++ component type into the messages" ) ;
00128
00129 this->declareProperty ( "Context" , m_context ) ;
00130
00131 this->declareProperty ( "RootInTES" , m_rootInTES ) ;
00132
00133 this->declareProperty ( "RootOnTES" , m_rootOnTES ) ;
00134
00135 this->declareProperty ( "GlobalTimeOffset", m_globalTimeOffset ) ;
00136
00137
00138
00139 this->declareProperty
00140 ( "StatTableHeader" , m_header ,
00141 "The header row for the output Stat-table" ) ;
00142
00143 this->declareProperty
00144 ( "RegularRowFormat" , m_format1 ,
00145 "The format for the regular row in the output Stat-table" ) ;
00146
00147 this->declareProperty
00148 ( "EfficiencyRowFormat" , m_format2 ,
00149 "The format for the regular row in the output Stat-table" ) ;
00150
00151 this->declareProperty
00152 ( "UseEfficiencyRowFormat" , m_useEffFormat ,
00153 "Use the special format for printout of efficiency counters" ) ;
00154
00155
00156
00157 this->declareProperty(
00158 "CounterList",
00159 m_counterList=std::vector<std::string>(1,".*"),
00160 "RegEx list, of simple integer counters for CounterSummary.");
00161
00162 this->declareProperty(
00163 "StatEntityList",
00164 m_statEntityList=std::vector<std::string>(0),
00165 "RegEx list, of StatEntity counters for CounterSummary.");
00166
00167
00168 this->outputLevelProperty().declareUpdateHandler( &GaudiCommon<PBASE>::msgLevelHandler, this );
00169
00170
00171 if ( parent )
00172 {
00173 if ( const GaudiAlgorithm* gAlg = dynamic_cast<const GaudiAlgorithm*>(parent) )
00174 {
00175 m_context = gAlg->context();
00176 m_rootInTES = gAlg->rootInTES();
00177 m_globalTimeOffset = gAlg->globalTimeOffset();
00178 }
00179 else if ( const GaudiTool* gTool = dynamic_cast<const GaudiTool*> (parent) )
00180 {
00181 m_context = gTool->context();
00182 m_rootInTES = gTool->rootInTES();
00183 m_globalTimeOffset = gTool->globalTimeOffset();
00184 }
00185 }
00186
00187
00188 IJobOptionsSvc* jos = svc<IJobOptionsSvc>( "JobOptionsSvc" );
00189
00190
00191 const std::vector<const Property*>* myList = jos->getProperties( this->name() );
00192 if ( 0 != myList )
00193 {
00194
00195 for ( std::vector<const Property*>::const_iterator iter = myList->begin();
00196 iter != myList->end();
00197 ++iter )
00198 {
00199 const StringProperty* sp = dynamic_cast<const StringProperty*>(*iter);
00200 if ( 0 != sp )
00201 {
00202 if ( "Context" == (*iter)->name() )
00203 {
00204 m_context = sp->value();
00205 } else if ( "RootInTES" == (*iter)->name() ) {
00206 m_rootInTES = sp->value();
00207 } else if ( "GlobalTimeOffset" == (*iter)->name() ) {
00208 m_globalTimeOffset = atof( sp->value().c_str() );
00209 }
00210 }
00211 }
00212 }
00213
00214
00215 release( jos ).ignore();
00216
00217 }
00218
00219
00220
00221
00222
00223 template < class PBASE >
00224 StatusCode GaudiCommon<PBASE>::initialize()
00225 {
00226
00227
00228 const StatusCode sc = PBASE::initialize();
00229 if ( sc.isFailure() )
00230 { return Error ( "Failed to initialise base class PBASE", sc ) ; }
00231
00232
00233
00234 if ( msgLevel(MSG::DEBUG) )
00235 {
00236 debug() << "Initialize base class GaudiCommon<" << System::typeinfoName(typeid(PBASE)) << ">" << endmsg;
00237 if ( !context().empty() )
00238 debug() << "Created with context = '" << context() << "'" << endmsg;
00239 }
00240
00241
00242
00243 if ( m_rootInTES.empty() && !m_rootOnTES.empty() )
00244 {
00245 m_rootInTES = m_rootOnTES;
00246 Warning( "RootOnTES option is OBSOLETE -> Use RootInTES instead. RootInTES has been updated to "
00247 + m_rootInTES, StatusCode::SUCCESS ).ignore();
00248 }
00249 else if ( !m_rootInTES.empty() && !m_rootOnTES.empty() )
00250 {
00251 Warning( "Options RootOnTES AND RootInTES are defined ! Use RootInTES. RootOnTES is ignored",
00252 StatusCode::SUCCESS ).ignore();
00253 }
00254
00255
00256 if ( !m_rootInTES.empty() &&
00257 m_rootInTES.substr(m_rootInTES.size()-1) != "/" ) m_rootInTES += "/";
00258
00259
00260 this->svcLoc()->service("CounterSummarySvc",m_counterSummarySvc,false).ignore() ;
00261 if (msgLevel(MSG::DEBUG))
00262 {
00263 if (m_counterSummarySvc==NULL )
00264 debug() << "could not locate CounterSummarySvc, no counter summary will be made" << endmsg;
00265 else debug() << "found CounterSummarySvc OK" << endmsg;
00266 }
00267
00268
00269 if ( propsPrint() ) { printProps(MSG::ALWAYS); }
00270 else if ( msgLevel(MSG::DEBUG) ) { printProps(MSG::DEBUG); }
00271
00272 return sc;
00273 }
00274
00275
00276
00277
00278
00279 template < class PBASE >
00280 StatusCode GaudiCommon<PBASE>::finalize()
00281 {
00282 StatusCode sc = StatusCode::SUCCESS;
00283
00284
00285 if ( msgLevel(MSG::DEBUG) || (statPrint() && !counters().empty()) )
00286 {
00287
00288 printStat ( statPrint() ? MSG::ALWAYS : MSG::DEBUG ) ;
00289 }
00290
00291 if(m_counterSummarySvc && this->svcLoc()->existsService("CounterSummarySvc"))
00292 {
00293 if ( msgLevel(MSG::DEBUG) ) debug() << "adding counters to CounterSummarySvc" << endmsg;
00294 for(Statistics::const_iterator i=this->counters().begin();
00295 i!=this->counters().end();
00296 i++)
00297 {
00298 if(Gaudi::Utils::RegEx::matchOr(i->first,m_statEntityList))
00299 m_counterSummarySvc->addCounter(this->name(),i->first,i->second,
00300 Gaudi::CounterSummary::SaveStatEntity);
00301 else if(Gaudi::Utils::RegEx::matchOr(i->first,m_counterList))
00302 m_counterSummarySvc->addCounter(this->name(),i->first,i->second);
00303 }
00304 }
00305
00306 if ( msgLevel(MSG::DEBUG) )
00307 {
00308 debug() << "Tools to release :";
00309 for ( AlgTools::const_iterator i = m_tools.begin();
00310 i != m_tools.end(); ++i )
00311 {
00312 debug() << " " << (*i)->name();
00313 }
00314 debug() << endmsg;
00315 }
00316 while ( !m_tools.empty() ) { sc = sc && releaseTool( m_tools.back() ) ; }
00317
00318
00319 if ( msgLevel(MSG::DEBUG) )
00320 {
00321 debug() << "Services to release :";
00322 for ( Services::const_iterator i = m_services.begin();
00323 i != m_services.end(); ++i )
00324 {
00325 debug() << " " << (*i).first;
00326 }
00327 debug() << endmsg;
00328 }
00329 while ( !m_services.empty() ) { sc = sc && releaseSvc( m_services.begin()->second ) ; }
00330
00331
00332 if(m_counterSummarySvc)
00333 {
00334 m_counterSummarySvc->release();
00335 m_counterSummarySvc=NULL;
00336 }
00337
00338
00339 if ( !m_errors.empty() || !m_warnings.empty() || !m_exceptions.empty() )
00340 {
00341 always() << "Exceptions/Errors/Warnings/Infos Statistics : "
00342 << m_exceptions .size () << "/"
00343 << m_errors .size () << "/"
00344 << m_warnings .size () << "/"
00345 << m_infos .size () << endmsg ;
00346 if ( errorsPrint() ) { printErrors () ; }
00347 }
00348
00349
00350 resetMsgStream();
00351
00352
00353 m_counters .clear() ;
00354 m_exceptions .clear() ;
00355 m_infos .clear() ;
00356 m_warnings .clear() ;
00357 m_errors .clear() ;
00358 m_counterList.clear() ;
00359 m_statEntityList.clear() ;
00360
00361
00362 return sc && PBASE::finalize();
00363 }
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373 template < class PBASE >
00374 StatusCode GaudiCommon<PBASE>::release ( const IInterface* interface ) const
00375 {
00376 if ( 0 == interface )
00377 { return Error ( "release(IInterface):: IInterface* points to NULL!" ) ; }
00378
00379 const IAlgTool* algTool = dynamic_cast<const IAlgTool*>( interface ) ;
00380
00381 return 0 != algTool ? releaseTool( algTool ) : releaseSvc( interface ) ;
00382 }
00383
00384
00385
00386
00387
00388 template < class PBASE >
00389 StatusCode GaudiCommon<PBASE>::releaseTool ( const IAlgTool* algTool ) const
00390 {
00391 if( 0 == algTool )
00392 { return Error ( "releaseTool(IAlgTool):: IAlgTool* points to NULL!" ) ; }
00393 if( this->toolSvc() == 0 )
00394 { return Error ( "releaseTool(IAlgTool):: IToolSvc* points to NULL!" ) ; }
00395
00396 AlgTools::reverse_iterator it =
00397 std::find( m_tools.rbegin() , m_tools.rend() , algTool ) ;
00398 if( m_tools.rend() == it )
00399 { return Warning("releaseTool(IAlgTool):: IAlgTool* is not active" ) ; }
00400
00401 IAlgTool* t = *it ;
00402
00403 const std::string name = t->name();
00404 if ( msgLevel(MSG::DEBUG) )
00405 { debug() << "Releasing tool '" << name << "'" << endmsg; }
00406
00407 m_tools.erase( --it.base() ) ;
00408
00409 const StatusCode sc = this->toolSvc()->releaseTool( t ) ;
00410 if ( sc.isFailure() )
00411 { return Warning ( "releaseTool(IAlgTool):: error from IToolSvc whilst releasing "+name , sc ) ; }
00412
00413 return sc ;
00414 }
00415
00416
00417
00418
00419
00420 template < class PBASE >
00421 StatusCode GaudiCommon<PBASE>::releaseSvc ( const IInterface* Svc ) const
00422 {
00423 if( 0 == Svc ) {
00424 return Error ( "releaseSvc(IInterface):: IInterface* points to NULL!" ) ;
00425 }
00426 SmartIF<IService> svc(const_cast<IInterface*>(Svc));
00427 if (svc.isValid()) {
00428 Services::iterator it = m_services.find(svc->name());
00429 if (it == m_services.end()) {
00430 return Warning( "releaseSvc(IInterface):: IInterface* is not active" );
00431 }
00432 if ( msgLevel(MSG::DEBUG) ) {
00433 debug() << "Releasing service '" << it->first << "'" << endmsg;
00434 }
00435 m_services.erase(it);
00436 return StatusCode::SUCCESS;
00437 }
00438 return Warning( "releaseSvc(IInterface):: IInterface* is not a service" );
00439 }
00440
00441
00442
00443
00444
00445 template < class PBASE >
00446 void GaudiCommon<PBASE>::addToToolList( IAlgTool * tool ) const
00447 {
00448 m_tools.push_back( tool ) ;
00449 }
00450
00451
00452
00453
00454
00455 template < class PBASE >
00456 void GaudiCommon<PBASE>::addToServiceList( const SmartIF<IService>& svc ) const
00457 {
00458 if (svc.isValid()) {
00459 m_services[svc->name()] = svc;
00460 }
00461 }
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471 template < class PBASE >
00472 StatusCode GaudiCommon<PBASE>::Error( const std::string& msg ,
00473 const StatusCode st ,
00474 const size_t mx ) const
00475 {
00476
00477 const size_t num = ++m_errors[msg] ;
00478
00479 if ( num > mx ) { return st ; }
00480 else if ( num == mx )
00481 { return Print ( "The ERROR message is suppressed : '" +
00482 msg + "'" , st , MSG::ERROR ) ; }
00483
00484 return Print ( msg , st , MSG::ERROR ) ;
00485 }
00486
00487
00488
00489
00490
00491 template < class PBASE >
00492 StatusCode GaudiCommon<PBASE>::Warning
00493 ( const std::string& msg ,
00494 const StatusCode st ,
00495 const size_t mx ) const
00496 {
00497
00498 const size_t num = ++m_warnings[msg] ;
00499
00500 if ( num > mx ) { return st ; }
00501 else if ( num == mx )
00502 { return Print ( "The WARNING message is suppressed : '" +
00503 msg + "'" , st , MSG::WARNING ) ; }
00504
00505 return Print ( msg , st , MSG::WARNING ) ;
00506 }
00507
00508
00509
00510
00511
00512 template < class PBASE >
00513 StatusCode GaudiCommon<PBASE>::Info
00514 ( const std::string& msg ,
00515 const StatusCode st ,
00516 const size_t mx ) const
00517 {
00518
00519 const size_t num = ++m_infos[msg] ;
00520
00521 if ( num > mx ) { return st ; }
00522 else if ( num == mx )
00523 { return Print ( "The INFO message is suppressed : '" +
00524 msg + "'" , st , MSG::INFO ) ; }
00525
00526 return Print ( msg , st , MSG::INFO ) ;
00527 }
00528
00529
00530
00531
00532
00533 template < class PBASE >
00534 StatusCode GaudiCommon<PBASE>::Print( const std::string& msg ,
00535 const StatusCode st ,
00536 const MSG::Level lvl ) const
00537 {
00538
00539 if ( !msgLevel( lvl ) ) { return st ; }
00540
00541
00542 MsgStream& str = msgStream( lvl ) ;
00543 if ( typePrint() ) { str << System::typeinfoName(typeid(*this)) << ":: " ; }
00544
00545 str << msg ;
00546
00547 if ( st.isSuccess() ) { }
00548 else if ( StatusCode::FAILURE != st.getCode() )
00549 { str << " StatusCode=" << st.getCode() ; }
00550 else
00551 { str << " StatusCode=FAILURE" ; }
00552
00553 str << endmsg ;
00554
00555 return st;
00556 }
00557
00558
00559
00560
00561
00562 template < class PBASE >
00563 StatusCode GaudiCommon<PBASE>::Exception( const std::string & msg ,
00564 const GaudiException & exc ,
00565 const StatusCode sc ) const
00566 {
00567
00568 ++m_exceptions[ msg ];
00569 Print ( "Exception (re)throw: " + msg , sc , MSG::FATAL );
00570 throw GaudiException( this->name() + ":: " + msg , this->name() , sc, exc);
00571 return sc ;
00572 }
00573
00574
00575
00576
00577
00578 template < class PBASE >
00579 StatusCode GaudiCommon<PBASE>::Exception( const std::string & msg ,
00580 const std::exception & exc ,
00581 const StatusCode sc ) const
00582 {
00583
00584 ++m_exceptions[ msg ];
00585 Print ( "Exception (re)throw: " + msg , sc , MSG::FATAL );
00586 throw GaudiException( this->name() + ":: " + msg+"("+exc.what()+")", "", sc );
00587 return sc ;
00588 }
00589
00590
00591
00592
00593
00594 template < class PBASE >
00595 StatusCode GaudiCommon<PBASE>::Exception( const std::string & msg ,
00596 const StatusCode sc ) const
00597 {
00598
00599 ++m_exceptions[ msg ];
00600 Print ( "Exception throw: " + msg , sc , MSG::FATAL );
00601 throw GaudiException( this->name() + ":: " + msg , "", sc );
00602 return sc ;
00603 }
00604
00605
00606
00607
00608
00609 template < class PBASE >
00610 long GaudiCommon<PBASE>::printStat( const MSG::Level level ) const
00611 {
00612
00613 if ( counters().empty() ) { return 0 ; }
00614 MsgStream& msg = msgStream ( level ) ;
00615
00616 msg << "Number of counters : " << counters().size() ;
00617
00618 if ( !counters().empty() ) { msg << std::endl << m_header ; }
00619
00620 for ( Statistics::const_iterator entry = counters().begin() ;
00621 counters().end() != entry ; ++entry )
00622 {
00623 msg << std::endl
00624 << Gaudi::Utils::formatAsTableRow
00625 ( entry -> first ,
00626 entry -> second ,
00627 m_useEffFormat ,
00628 m_format1 , m_format2 );
00629 }
00630
00631 msg << endmsg ;
00632
00633 return counters().size() ;
00634 }
00635
00636
00637
00638
00639
00640 template < class PBASE >
00641 long GaudiCommon<PBASE>::printErrors ( const MSG::Level level ) const
00642 {
00643
00644 boost::format ftm ( " %s = %|.8s| %|23t| Message = '%s'" );
00645
00646 {
00647 for ( Counter::const_iterator excp = m_exceptions.begin() ;
00648 excp != m_exceptions.end() ; ++excp )
00649 {
00650 msgStream(level)
00651 << ( ftm % "#EXCEPTIONS" % excp->second % excp->first )
00652 << endmsg;
00653 }
00654 }
00655 {
00656 for ( Counter::const_iterator error = m_errors.begin() ;
00657 error != m_errors.end() ; ++error )
00658 {
00659 msgStream(level)
00660 << ( ftm % "#ERRORS " % error->second % error->first )
00661 << endmsg;
00662 }
00663 }
00664 {
00665 for ( Counter::const_iterator warning = m_warnings.begin() ;
00666 warning != m_warnings.end() ; ++warning )
00667 {
00668 msgStream(level)
00669 << ( ftm % "#WARNINGS " % warning->second % warning->first )
00670 << endmsg;
00671 }
00672 }
00673 {
00674 for ( Counter::const_iterator info = m_infos.begin() ;
00675 info != m_infos.end() ; ++info )
00676 {
00677 msgStream(level)
00678 << ( ftm % "#INFOS " % info->second % info->first )
00679 << endmsg;
00680 }
00681 }
00682
00683
00684 return
00685 m_exceptions .size () +
00686 m_errors .size () +
00687 m_warnings .size () +
00688 m_infos .size () ;
00689 }
00690
00691
00692
00696
00697 template < class PBASE >
00698 long GaudiCommon<PBASE>::printProps ( const MSG::Level level ) const
00699 {
00700
00701
00702 MsgStream& msg = msgStream ( level );
00703 typedef std::vector<Property*> Properties;
00704 const Properties& properties = this->getProperties() ;
00705 msg << "List of ALL properties of "
00706 << System::typeinfoName( typeid( *this ) ) << "/" << this->name()
00707 << " #properties = " << properties.size() << endmsg ;
00708 for ( Properties::const_reverse_iterator property
00709 = properties.rbegin() ;
00710 properties.rend() != property ; ++property )
00711 {
00712 msg << "Property ['Name': Value] = "
00713 << ( **property)
00714 << endmsg ;
00715 }
00716 return properties.size() ;
00717 }
00718
00719
00720
00721
00722
00723 template < class PBASE >
00724 void GaudiCommon<PBASE>::msgLevelHandler ( Property & theProp )
00725 {
00726
00727 resetMsgStream();
00728
00729
00730 m_msgLevel =
00731 this->outputLevel() < (int) MSG::NIL ? MSG::NIL :
00732 this->outputLevel() >= (int) MSG::NUM_LEVELS ? MSG::ALWAYS :
00733 MSG::Level( this->outputLevel() ) ;
00734
00735
00736 if ( this->msgSvc()->outputLevel(this->name()) != this->outputLevel() )
00737 {
00738 this->msgSvc()->setOutputLevel( this->name(), this->outputLevel() );
00739 }
00740
00741
00742 if ( msgLevel(MSG::DEBUG) )
00743 {
00744 debug() << "Property update for "
00745 << theProp.name() << " : new value = " << this->outputLevel() << endmsg;
00746 }
00747 }
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757 template < class PBASE >
00758 DataObject* GaudiCommon<PBASE>::put ( IDataProviderSvc* svc ,
00759 DataObject* object ,
00760 const std::string& location ,
00761 const bool useRootInTES ) const
00762 {
00763
00764 Assert ( 0 != svc , "put():: Invalid 'service'!" ) ;
00765 Assert ( 0 != object , "put():: Invalid 'Object'!" ) ;
00766 Assert ( !location.empty() , "put():: Invalid 'address' = '' " ) ;
00767
00768 const std::string & fullLocation = fullTESLocation( location, useRootInTES );
00769
00770 const StatusCode status = '/' == fullLocation[0] ?
00771 svc -> registerObject( fullLocation , object ) :
00772 svc -> registerObject( "/Event/" + fullLocation , object ) ;
00773
00774 if ( status.isFailure() )
00775 { Exception ( "put():: could not register '" +
00776 System::typeinfoName( typeid( *object ) ) +
00777 "' at address '" + fullLocation + "'" , status ) ; }
00778 if ( msgLevel( MSG::DEBUG ) )
00779 { Print( "The object of type '" +
00780 System::typeinfoName( typeid( *object ) ) +
00781 "' is registered in TS at address '"
00782 + fullLocation + "'" , status , MSG::DEBUG ) ; }
00783 return object;
00784 }
00785
00786
00787
00788
00789
00790 template < class PBASE >
00791 void GaudiCommon<PBASE>::printErrorHandler ( Property& )
00792 {
00793
00794 if ( this -> FSMState() < Gaudi::StateMachine::INITIALIZED ) { return ; }
00795 if ( this -> errorsPrint() ) { this -> printErrors () ; }
00796 }
00797
00798
00799
00800 template < class PBASE >
00801 void GaudiCommon<PBASE>::printPropsHandler ( Property& )
00802 {
00803
00804 if ( this -> FSMState() < Gaudi::StateMachine::INITIALIZED ) { return ; }
00805 if ( this -> propsPrint() ) { this -> printProps ( MSG::ALWAYS ) ; }
00806 }
00807
00808
00809
00810 template < class PBASE >
00811 void GaudiCommon<PBASE>::printStatHandler ( Property& )
00812 {
00813
00814 if ( this -> FSMState() < Gaudi::StateMachine::INITIALIZED ) { return ; }
00815 if ( this -> statPrint() ) { this -> printStat ( MSG::ALWAYS ) ; }
00816 }
00817
00818
00819
00820
00821
00822
00823
00824