| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes | List of all members
GaudiCommon< PBASE > Class Template Reference

Implements the common functionality between GaudiTools and GaudiAlgorithms. More...

`#include <GaudiAlg/GaudiCommon.h>`

Inheritance diagram for GaudiCommon< PBASE >:
[legend]
Collaboration diagram for GaudiCommon< PBASE >:
[legend]

## Public Member Functions
template<class TYPE >
Gaudi::Utils::GetData< TYPE >::return_type | get (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
| Templated access to the data in Gaudi Transient Store. More...
template<class TYPE >
Gaudi::Utils::GetData< TYPE >::return_type | getIfExists (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
| Quicker version of the get function which bypasses the check on the retrieved data. More...
template<class TYPE >
bool | exist (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
| Check the existence of a data object or container in the Gaudi Transient Event Store. More...
template<class TYPE , class TYPE2 >
Gaudi::Utils::GetData< TYPE >::return_type | getOrCreate (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
| Get the existing data object from Gaudi Event Transient store. More...
DataObject * | put (IDataProviderSvc *svc, DataObject *object, const std::string &location, const bool useRootInTES=true) const
| Register a data object or container into Gaudi Event Transient Store. More...
template<class TOOL >
TOOL * | tool (const std::string &type, const std::string &name, const IInterface *parent=0, bool create=true) const
| Useful method for the easy location of tools. More...
template<class TOOL >
TOOL * | tool (const std::string &type, const IInterface *parent=0, bool create=true) const
| A useful method for the easy location of tools. More...
template<class SERVICE >
SmartIF< SERVICE > | svc (const std::string &name, const bool create=true) const
| A useful method for the easy location of services. More...
IUpdateManagerSvc * | updMgrSvc () const
| Short-cut to locate the Update Manager Service. More...
StatusCode | Error (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
| Print the error message and return with the given StatusCode. More...
StatusCode | Warning (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
| Print the warning message and return with the given StatusCode. More...
StatusCode | Info (const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const size_t mx=10) const
| Print the info message and return with the given StatusCode. More...
StatusCode | Print (const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const
| Print the message and return with the given StatusCode. More...
void | Assert (const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
| Assertion - throw exception if the given condition is not fulfilled. More...
void | Assert (const bool ok, const char *message, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
| Assertion - throw exception if the given condition is not fulfilled. More...
void | Exception (const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
| Create and (re)-throw a given GaudiException. More...
void | Exception (const std::string &msg, const std::exception &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
| Create and (re)-throw a given exception. More...
void | Exception (const std::string &msg="no message", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
| Create and throw an exception with the given message. More...
const Statistics & | counters () const
| accessor to all counters More...
StatEntity & | counter (const std::string &tag) const
| accessor to certain counter by name More...
bool | typePrint () const
| Insert the actual C++ type of the algorithm/tool in the messages ? More...
bool | propsPrint () const
| Print properties at initialization ? More...
bool | statPrint () const
| Print statistical counters at finalization ? More...
bool | errorsPrint () const
| Print error counters at finalization ? More...
long | printStat (const MSG::Level level=MSG::ALWAYS) const
| perform the actual printout of statistical counters More...
long | printErrors (const MSG::Level level=MSG::ALWAYS) const
| perform the actual printout of error counters More...
long | printProps (const MSG::Level level=MSG::ALWAYS) const
| perform the actual printout of properties More...
template<class CallerClass >
void | registerCondition (const std::string &condition, StatusCode(CallerClass::*mf)()=nullptr)
| register the current instance to the UpdateManagerSvc as a consumer for a condition. More...
template<class CallerClass , class CondType >
void | registerCondition (const std::string &condition, CondType *&condPtrDest, StatusCode(CallerClass::*mf)()=NULL)
| register the current instance to the UpdateManagerSvc as a consumer for a condition. More...
template<class CallerClass >
void | registerCondition (char *condition, StatusCode(CallerClass::*mf)()=NULL)
| just to avoid conflicts with the version using a pointer to a template class. More...
template<class CallerClass , class TargetClass >
void | registerCondition (TargetClass *condition, StatusCode(CallerClass::*mf)()=NULL)
| register the current instance to the UpdateManagerSvc as a consumer for a condition. More...
StatusCode | runUpdate ()
| asks the UpdateManagerSvc to perform an update of the instance (if needed) without waiting the next BeginEvent incident. More...
| GaudiCommon (const std::string &name, ISvcLocator *pSvcLocator)
| Algorithm constructor. More...
| GaudiCommon (const std::string &type, const std::string &name, const IInterface *parent)
| Tool constructor. More...
StatusCode | initialize () override
| standard initialization method More...
StatusCode | finalize () override
| standard finalization method More...
StatusCode | release (const IInterface *interface) const
| Manual forced (and 'safe') release of the active tool or service. More...
const Services & | services () const
| get the list of aquired services More...
const std::string & | context () const
| Returns the "context" string. Used to identify different processing states. More...
const std::string & | rootInTES () const
| Returns the "rootInTES" string. More...
const std::string | fullTESLocation (const std::string &location, const bool useRootInTES) const
| Returns the full correct event location given the rootInTes settings. More...
template<class TYPE >
Gaudi::Utils::GetData< TYPE >::return_type | get (IDataProviderSvc *service, const std::string &location, const bool useRootInTES) const
template<class TYPE >
Gaudi::Utils::GetData< TYPE >::return_type | getIfExists (IDataProviderSvc *service, const std::string &location, const bool useRootInTES) const
template<class TYPE , class TYPE2 >
Gaudi::Utils::GetData< TYPE >::return_type | getOrCreate (IDataProviderSvc *service, const std::string &location, const bool useRootInTES) const

## Protected Types
using | base_class = PBASE
typedef std::map< std::string, StatEntity > | Statistics
| the actual type of general counters More...
typedef std::map< std::string, unsigned int > | Counter
| the actual type error/warning counter More...
typedef std::vector< IAlgTool * > | AlgTools
| storage for active tools More...
typedef std::vector< SmartIF< IService > > | Services
| storage for active services More...

## Protected Member Functions
| ~GaudiCommon () override=default
| Destructor. More...
StatusCode | releaseTool (const IAlgTool *tool) const
| manual forced (and 'safe') release of the tool More...
StatusCode | releaseSvc (const IInterface *svc) const
| manual forced (and 'safe') release of the service More...

## Protected Attributes
SmartIF< ICounterSummarySvc > | m_counterSummarySvc
| a pointer to the CounterSummarySvc More...
std::vector< std::string > | m_counterList = std::vector<std::string>(1,".*")
| list of counters to declare. Set by property CounterList. This can be a regular expression. More...
std::vector< std::string > | m_statEntityList = std::vector<std::string>(0)

## Static Protected Attributes
static const bool | IgnoreRootInTES = false
| Simple definition to be used with the new useRootInTES argument get<TYPE> and put methods. More...
static const bool | UseRootInTES = true
| Simple definition to be used with the new useRootInTES argument get<TYPE> and put methods. More...

## Private Member Functions
| GaudiCommon ()=delete
| GaudiCommon (const GaudiCommon &)=delete
GaudiCommon & | operator= (const GaudiCommon &)=delete
void | printErrorHandler (Property &)
| handler for "ErrorPrint" property More...
void | printPropsHandler (Property &)
| handler for "PropertiesPrint" property More...
void | printStatHandler (Property &)
| handler for "StatPrint" property More...
void | addToServiceList (SmartIF< IService > svc) const
| Add the given service to the list of acquired services. More...
void | initGaudiCommonConstructor (const IInterface *parent=0)
| Constructor initializations. More...

## Private Attributes
AlgTools | m_managedTools
| List of active tools. More...
Services | m_services
| List of active services. More...
Counter | m_errors
| Counter of errors. More...
Counter | m_warnings
| counter of warnings More...
Counter | m_infos
| counter of infos More...
Counter | m_exceptions
| Counter of exceptions. More...
Statistics | m_counters
| General counters. More...
IUpdateManagerSvc * | m_updMgrSvc = nullptr
| Pointer to the Update Manager Service instance. More...
bool | m_typePrint = true
| insert the actual C++ type of the algorithm in the messages? More...
bool | m_propsPrint = false
| print properties at initialization? More...
bool | m_statPrint = true
| print counters at finalization ? More...
bool | m_errorsPrint = true
| print warning and error counters at finalization ? More...
std::string | m_context
| The context string. More...
std::string | m_rootInTES
| The rootInTES string. More...
std::string | m_header
| the header row More...
std::string | m_format1
| format for regular statistical printout rows More...
std::string | m_format2
| format for "efficiency" statistical printout rows More...
bool | m_useEffFormat
| flag to use the special "efficiency" format More...

## Detailed Description

### template<class PBASE>
class GaudiCommon< PBASE >

Implements the common functionality between GaudiTools and GaudiAlgorithms.

Author
  Chris Jones Chris.nosp@m.toph.nosp@m.er.Ro.nosp@m.b.Jo.nosp@m.nes@c.nosp@m.ern..nosp@m.ch
  Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru
  Rob Lambert Rob.L.nosp@m.ambe.nosp@m.rt@ce.nosp@m.rn.c.nosp@m.h

Date
  2009-08-04

Definition at line 73 of file GaudiCommon.h.

## Member Typedef Documentation

template<class PBASE>

typedef std::vector<IAlgTool*> GaudiCommon< PBASE >::AlgTools
| protected

storage for active tools

Definition at line 108 of file GaudiCommon.h.

template<class PBASE>

using GaudiCommon< PBASE >::base_class = PBASE
| protected

Definition at line 76 of file GaudiCommon.h.

template<class PBASE>

typedef std::map<std::string,unsigned int> GaudiCommon< PBASE >::Counter
| protected

the actual type error/warning counter

Definition at line 106 of file GaudiCommon.h.

template<class PBASE>

typedef std::vector<SmartIF<IService> > GaudiCommon< PBASE >::Services
| protected

storage for active services

Definition at line 110 of file GaudiCommon.h.

template<class PBASE>

typedef std::map<std::string,StatEntity> GaudiCommon< PBASE >::Statistics
| protected

the actual type of general counters

Definition at line 104 of file GaudiCommon.h.

## Constructor & Destructor Documentation

template<class PBASE>

GaudiCommon< PBASE >::GaudiCommon | ( | const std::string & | name,
|  | ISvcLocator * | pSvcLocator
| ) |  |

Algorithm constructor.

template<class PBASE>

GaudiCommon< PBASE >::GaudiCommon | ( | const std::string & | type,
|  | const std::string & | name,
|  | const IInterface * | parent
| ) |  |

Tool constructor.

template<class PBASE>

GaudiCommon< PBASE >::~GaudiCommon | ( |  | ) |
| override protected default

Destructor.

template<class PBASE>

GaudiCommon< PBASE >::GaudiCommon | ( |  | ) |
| private delete

template<class PBASE>

GaudiCommon< PBASE >::GaudiCommon | ( | const GaudiCommon< PBASE > & |  | ) |
| private delete

## Member Function Documentation

template<class PBASE >

void GaudiCommon< PBASE >::addToServiceList | ( | SmartIF< IService > | svc | ) | const
| private

Add the given service to the list of acquired services.

Definition at line 438 of file GaudiCommon.icpp.

439 {
440 if (svc) {
441 auto i = std::lower_bound( std::begin(m_services), std::end(m_services), svc, GaudiCommon_details::svc_lt );
442 if ( i == std::end(m_services) || !GaudiCommon_details::svc_eq(*i,svc) ) {
443 m_services.insert( i, std::move(svc) );
444 } else {
445 this->warning() << "Service " << svc->name() << " already present -- skipping" << endmsg;
446 }
447 }
448 }
GaudiCommon_details::svc_eq
constexpr const struct GaudiCommon_details::svc_eq_t svc_eq
GaudiCommon::m_services
Services m_services
List of active services.
Definition: GaudiCommon.h:736
std::end
T end(T...args)
std::lower_bound
T lower_bound(T...args)
GaudiCommon_details::svc_lt
constexpr const struct GaudiCommon_details::svc_lt_t svc_lt
std::move
T move(T...args)
std::vector::insert
T insert(T...args)
std::begin
T begin(T...args)
ana.i
list i
Definition: ana.py:128
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
template<class PBASE >

void GaudiCommon< PBASE >::Assert | ( | const bool | ok,
|  | const std::string & | message = `""`,
|  | const StatusCode | sc = `StatusCode(StatusCode::FAILURE, true)`
| ) |  | const
| inline

Assertion - throw exception if the given condition is not fulfilled.

See also
  GaudiException

Exceptions

  Exception | for invalid condition

Parameters

  ok | Condition which should be "true"
  message | Message to be associated with the exception

Definition at line 224 of file GaudiCommonImp.h.

227 {
228 if (!ok) Exception( msg , sc );
229 }
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
GaudiCommon::Exception
void Exception(const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Create and (re)-throw a given GaudiException.
Definition: GaudiCommon.icpp:554
template<class PBASE >

void GaudiCommon< PBASE >::Assert | ( | const bool | ok,
|  | const char * | message,
|  | const StatusCode | sc = `StatusCode(StatusCode::FAILURE, true)`
| ) |  | const
| inline

Assertion - throw exception if the given condition is not fulfilled.

See also
  GaudiException

Exceptions

  Exception | for invalid condition

Parameters

  ok | Condition which should be "true"
  message | Message to be associated with the exception

Definition at line 234 of file GaudiCommonImp.h.

237 {
238 if (!ok) Exception( msg , sc );
239 }
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
GaudiCommon::Exception
void Exception(const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Create and (re)-throw a given GaudiException.
Definition: GaudiCommon.icpp:554
template<class PBASE>

const std::string& GaudiCommon< PBASE >::context | ( |  | ) | const
| inline

Returns the "context" string. Used to identify different processing states.

Definition at line 712 of file GaudiCommon.h.

712 { return m_context; }
GaudiCommon::m_context
std::string m_context
The context string.
Definition: GaudiCommon.h:762
template<class PBASE>

StatEntity& GaudiCommon< PBASE >::counter | ( | const std::string & | tag | ) | const
| inline

accessor to certain counter by name

if ( OK ) { ++counter("OK") ; }
// additive counter ('Flag')
counter("#Tracks") += tracks->size() ;
// multiplicative counter ('Weight')
counter("ProbTot") *= probability ;

See also
  StatEntuty

Parameters

  tag | counter name

Returns
  the counter itself

Definition at line 513 of file GaudiCommon.h.

513 { return m_counters[tag] ; }
GaudiCommon::m_counters
Statistics m_counters
General counters.
Definition: GaudiCommon.h:747
template<class PBASE>

const Statistics& GaudiCommon< PBASE >::counters | ( |  | ) | const
| inline

accessor to all counters

Definition at line 494 of file GaudiCommon.h.

494 { return m_counters ; }
GaudiCommon::m_counters
Statistics m_counters
General counters.
Definition: GaudiCommon.h:747
template<class PBASE >

StatusCode GaudiCommon< PBASE >::Error | ( | const std::string & | msg,
|  | const StatusCode | st = `StatusCode::FAILURE`,
|  | const size_t | mx = `10`
| ) |  | const

Print the error message and return with the given StatusCode.

Also performs statistical analysis of the error messages and suppression after the defined number of error instances.

if( a < 0 ) { return Error("a is negative!") ;}
if( b < 0 ) { return Error("b is illegal!" , StatusCode(25) );
if( c < 0 )
{ return Error("c is negative" , StatusCode(35) , 50 );

See also
  MsgStream
  IMessageSvc
  StatusCode

Parameters

  msg | Error message
  st | StatusCode to return
  mx | Maximum number of printouts for this message

Returns
  StatusCode

Definition at line 459 of file GaudiCommon.icpp.

462 {
463 // increase local counter of errors
464 const size_t num = ++m_errors[msg] ;
465 // If suppressed, just return
466 if ( num > mx ) { return st ; }
467 else if ( UNLIKELY(num == mx) ) // issue one-time suppression message
468 { return Print ( "The ERROR message is suppressed : '" +
469 msg + "'" , st , MSG::ERROR ) ; }
470 // return message
471 return Print ( msg , st , MSG::ERROR ) ;
472 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
GaudiCommon::m_errors
Counter m_errors
Counter of errors.
Definition: GaudiCommon.h:739
GaudiCommon::Print
StatusCode Print(const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const
Print the message and return with the given StatusCode.
Definition: GaudiCommon.icpp:521
MSG::ERROR
Definition: IMessageSvc.h:21
template<class PBASE>

bool GaudiCommon< PBASE >::errorsPrint | ( |  | ) | const
| inline

Print error counters at finalization ?

Definition at line 523 of file GaudiCommon.h.

523 { return m_errorsPrint ; }
GaudiCommon::m_errorsPrint
bool m_errorsPrint
print warning and error counters at finalization ?
Definition: GaudiCommon.h:759
template<class PBASE >

void GaudiCommon< PBASE >::Exception | ( | const std::string & | msg,
|  | const GaudiException & | exc,
|  | const StatusCode | sc = `StatusCode(StatusCode::FAILURE, true)`
| ) |  | const

Create and (re)-throw a given GaudiException.

See also
  GaudiException

Exceptions

  GaudiException | always thrown!

Parameters

  msg | Exception message
  exc | (previous) exception of type GaudiException

Definition at line 554 of file GaudiCommon.icpp.

557 {
558 // increase local counter of exceptions
559 ++m_exceptions[ msg ];
560 Print ( "Exception (re)throw: " + msg , sc , MSG::FATAL ).ignore();
561 throw GaudiException( this->name() + ":: " + msg , this->name() , sc, exc);
562 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
GaudiCommon::m_exceptions
Counter m_exceptions
Counter of exceptions.
Definition: GaudiCommon.h:745
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
MSG::FATAL
Definition: IMessageSvc.h:22
GaudiCommon::Print
StatusCode Print(const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const
Print the message and return with the given StatusCode.
Definition: GaudiCommon.icpp:521
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:108
template<class PBASE >

void GaudiCommon< PBASE >::Exception | ( | const std::string & | msg,
|  | const std::exception & | exc,
|  | const StatusCode | sc = `StatusCode(StatusCode::FAILURE, true)`
| ) |  | const

Create and (re)-throw a given exception.

See also
  GaudiException

Exceptions

  std::exception | always thrown!

Parameters

  msg | Exception message
  exc | (previous) exception of type std::exception
  sc | StatusCode

Definition at line 569 of file GaudiCommon.icpp.

572 {
573 // increase local counter of exceptions
574 ++m_exceptions[ msg ];
575 Print ( "Exception (re)throw: " + msg , sc , MSG::FATAL ).ignore();
576 throw GaudiException( this->name() + ":: " + msg+"("+exc.what()+")", "", sc );
577 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
GaudiCommon::m_exceptions
Counter m_exceptions
Counter of exceptions.
Definition: GaudiCommon.h:745
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
merge_files.sc
int sc
Definition: merge_files.py:167
MSG::FATAL
Definition: IMessageSvc.h:22
std::exception::what
T what(T...args)
GaudiCommon::Print
StatusCode Print(const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const
Print the message and return with the given StatusCode.
Definition: GaudiCommon.icpp:521
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:108
template<class PBASE >

void GaudiCommon< PBASE >::Exception | ( | const std::string & | msg = `"no message"`,
|  | const StatusCode | sc = `StatusCode(StatusCode::FAILURE, true)`
| ) |  | const

Create and throw an exception with the given message.

See also
  GaudiException

Exceptions

  GaudiException | always thrown!

Parameters

  msg | Exception message
  sc | StatusCode

Definition at line 584 of file GaudiCommon.icpp.

586 {
587 // increase local counter of exceptions
588 ++m_exceptions[ msg ];
589 Print ( "Exception throw: " + msg , sc , MSG::FATAL ).ignore();
590 throw GaudiException( this->name() + ":: " + msg , "", sc );
591 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
GaudiCommon::m_exceptions
Counter m_exceptions
Counter of exceptions.
Definition: GaudiCommon.h:745
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
MSG::FATAL
Definition: IMessageSvc.h:22
GaudiCommon::Print
StatusCode Print(const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const
Print the message and return with the given StatusCode.
Definition: GaudiCommon.icpp:521
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:108
template<class PBASE >
template<class TYPE >

bool GaudiCommon< PBASE >::exist | ( | IDataProviderSvc * | svc,
|  | const std::string & | location,
|  | const bool | useRootInTES = `true`
| ) |  | const
| inline

Check the existence of a data object or container in the Gaudi Transient Event Store.

bool a1 = exist<DataObject>( evtSvc() , "/Event/MyObject" ) ;
bool a2 = exist<MyHits> ( evtSvc() , "/Event/MyHits" ) ;

Attention
  The method respects the setting of the job option RootInTES by prepending the value of this to the data location that is passed. The default setting for RootInTES is "" so has no effect. This behavior can be suppressed by passing the argument useRootInTES = false

Parameters

  svc | Pointer to data provider service
  location | Address in Gaudi Transient Store
  useRootInTES | Flag to turn on(TRUE) off(FALSE) the use of the RootInTES location property

Returns
  Boolean indicating status of the request

Return values

  true | Data object or container exists and implements a proper interface
  true | Failed to locate the data object or container

Definition at line 92 of file GaudiCommonImp.h.

95 {
96 // check the environment
97 Assert( service , "exist():: IDataProvider* points to NULL!" ) ;
98 // check the data object
99 Gaudi::Utils::CheckData<TYPE> checker ;
100 return checker ( service,
101 fullTESLocation ( location , useRootInTES ) ) ;
102 }
Gaudi::Utils::CheckData
Helper structure for implementation of "exists"-functions for GaudiCommon
Definition: GetData.h:314
GaudiCommon::Assert
void Assert(const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Assertion - throw exception if the given condition is not fulfilled.
Definition: GaudiCommonImp.h:224
GaudiCommon::fullTESLocation
const std::string fullTESLocation(const std::string &location, const bool useRootInTES) const
Returns the full correct event location given the rootInTes settings.
Definition: GaudiCommonImp.h:25
template<class PBASE >

StatusCode GaudiCommon< PBASE >::finalize | ( |  | ) |
| override

standard finalization method

Returns
  status code

Definition at line 280 of file GaudiCommon.icpp.

281 {
282 StatusCode sc = StatusCode::SUCCESS;
283
284 // print the general information about statistical counters
285 if ( this->msgLevel(MSG::DEBUG) || (statPrint() && !counters().empty()) )
286 {
287 // print general statistical counters
288 printStat ( statPrint() ? MSG::ALWAYS : MSG::DEBUG ) ;
289 }
290 //add all counters to the CounterSummarySvc
291 if(m_counterSummarySvc && this->svcLoc()->existsService("CounterSummarySvc"))
292 {
293 if ( this->msgLevel(MSG::DEBUG) ) this->debug() << "adding counters to CounterSummarySvc" << endmsg;
294
295 Gaudi::Utils::RegEx::matchList statList{ m_statEntityList };
296 Gaudi::Utils::RegEx::matchList counterList{ m_counterList };
297
298 for( const auto& i : this->counters() )
299 {
300 if (statList.Or(i.first) )
301 m_counterSummarySvc->addCounter(this->name(),i.first,i.second,
302 Gaudi::CounterSummary::SaveStatEntity);
303 else if (counterList.Or(i.first))
304 m_counterSummarySvc->addCounter(this->name(),i.first,i.second);
305 }
306 }
307 // release all located tools and services
308 if ( this->msgLevel(MSG::DEBUG) )
309 {
310 this->debug() << "Tools to release :";
311 for ( const auto& i : m_managedTools )
312 {
313 this->debug() << " " << i->name();
314 }
315 this->debug() << endmsg;
316 }
317 while ( !m_managedTools.empty() ) { sc = releaseTool( m_managedTools.back() ) && sc; }
318
319 // release all located services
320 if ( this->msgLevel(MSG::DEBUG) )
321 {
322 this->debug() << "Services to release :";
323 for ( const auto& i : m_services ) this->debug() << " " << i->name();
324 this->debug() << endmsg;
325 }
326 while ( !m_services.empty() ) { sc = releaseSvc( m_services.front() ) && sc; }
327
328 //release the CounterSummarySvc manually
329 m_counterSummarySvc.reset();
330
331 // format printout
332 if ( !m_errors.empty() || !m_warnings.empty() || !m_exceptions.empty() )
333 {
334 this->always() << "Exceptions/Errors/Warnings/Infos Statistics : "
335 << m_exceptions .size () << "/"
336 << m_errors .size () << "/"
337 << m_warnings .size () << "/"
338 << m_infos .size () << endmsg ;
339 if ( errorsPrint() ) { printErrors () ; }
340 }
341
342
343 // clear *ALL* counters explicitly
344 m_counters .clear() ;
345 m_exceptions .clear() ;
346 m_infos .clear() ;
347 m_warnings .clear() ;
348 m_errors .clear() ;
349 m_counterList.clear() ;
350 m_statEntityList.clear() ;
351
352 // finalize base class
353 return sc && PBASE::finalize();
354 }
GaudiCommon::m_warnings
Counter m_warnings
counter of warnings
Definition: GaudiCommon.h:741
std::map::empty
T empty(T...args)
GaudiCommon::m_exceptions
Counter m_exceptions
Counter of exceptions.
Definition: GaudiCommon.h:745
GaudiCommon::releaseSvc
StatusCode releaseSvc(const IInterface *svc) const
manual forced (and 'safe') release of the service
Definition: GaudiCommon.icpp:416
GaudiCommon::m_services
Services m_services
List of active services.
Definition: GaudiCommon.h:736
Gaudi::Utils::RegEx::matchList
Definition: RegEx.h:27
MSG::DEBUG
Definition: IMessageSvc.h:18
GaudiCommon::m_counters
Statistics m_counters
General counters.
Definition: GaudiCommon.h:747
GaudiCommon::counters
const Statistics & counters() const
accessor to all counters
Definition: GaudiCommon.h:494
merge_files.sc
int sc
Definition: merge_files.py:167
GaudiCommon::statPrint
bool statPrint() const
Print statistical counters at finalization ?
Definition: GaudiCommon.h:521
Gaudi::CounterSummary::SaveStatEntity
store only the flag()
Definition: ICounterSummarySvc.h:20
GaudiCommon::m_errors
Counter m_errors
Counter of errors.
Definition: GaudiCommon.h:739
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
ICounterSummarySvc::addCounter
virtual void addCounter(const std::string, const std::string name, const StatEntity &, const Gaudi::CounterSummary::SaveType saveType=Gaudi::CounterSummary::SaveSimpleCounter)=0
declare a counter, StatEntity, to be filled in the Counter summary
GaudiCommon::m_infos
Counter m_infos
counter of infos
Definition: GaudiCommon.h:743
GaudiCommon::errorsPrint
bool errorsPrint() const
Print error counters at finalization ?
Definition: GaudiCommon.h:523
GaudiCommon::m_counterSummarySvc
SmartIF< ICounterSummarySvc > m_counterSummarySvc
a pointer to the CounterSummarySvc
Definition: GaudiCommon.h:115
std::map::clear
T clear(T...args)
GaudiCommon::m_statEntityList
std::vector< std::string > m_statEntityList
Definition: GaudiCommon.h:119
std::map::size
T size(T...args)
GaudiCommon::releaseTool
StatusCode releaseTool(const IAlgTool *tool) const
manual forced (and 'safe') release of the tool
Definition: GaudiCommon.icpp:380
GaudiCommon::m_counterList
std::vector< std::string > m_counterList
list of counters to declare. Set by property CounterList. This can be a regular expression.
Definition: GaudiCommon.h:117
GaudiCommon::m_managedTools
AlgTools m_managedTools
List of active tools.
Definition: GaudiCommon.h:734
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:88
GaudiCommon::printStat
long printStat(const MSG::Level level=MSG::ALWAYS) const
perform the actual printout of statistical counters
Definition: GaudiCommon.icpp:598
ana.i
list i
Definition: ana.py:128
MSG::ALWAYS
Definition: IMessageSvc.h:23
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
GaudiCommon::printErrors
long printErrors(const MSG::Level level=MSG::ALWAYS) const
perform the actual printout of error counters
Definition: GaudiCommon.icpp:628
template<class PBASE >

const std::string GaudiCommon< PBASE >::fullTESLocation | ( | const std::string & | location,
|  | const bool | useRootInTES
| ) |  | const
| inline

Returns the full correct event location given the rootInTes settings.

Definition at line 25 of file GaudiCommonImp.h.

27 {
28 // The logic is:
29 // if no R.I.T., give back location
30 // if R.I.T., this is the mapping:
31 // (note that R.I.T. contains a trailing '/')
32 // location -> result
33 // -------------------------------------------------
34 // "" -> R.I.T.[:-1] ("rit")
35 // "/Event" -> R.I.T.[:-1] ("rit")
36 // "/Event/MyObj" -> R.I.T. + "MyObj" ("rit/MyObj")
37 // "MyObj" -> R.I.T. + "MyObj" ("rit/MyObj")
38 return ( !useRootInTES || rootInTES().empty() ?
39 location
40 :
41 location.empty() || ( location == "/Event" ) ?
42 rootInTES().substr(0,rootInTES().size()-1)
43 :
44 0 == location.find("/Event/") ?
45 rootInTES() + location.substr(7)
46 : location[0] == '/' ?
47 rootInTES() + location.substr(1)
48 : rootInTES() + location );
49 }
std::string::empty
T empty(T...args)
GaudiCommon::rootInTES
const std::string & rootInTES() const
Returns the "rootInTES" string.
Definition: GaudiCommon.h:716
std::string::find
T find(T...args)
std::string::substr
T substr(T...args)
template<class PBASE>
template<class TYPE >

Gaudi::Utils::GetData<TYPE>::return_type GaudiCommon< PBASE >::get | ( | IDataProviderSvc * | service,
|  | const std::string & | location,
|  | const bool | useRootInTES
| ) |  | const
| inline

Definition at line 56 of file GaudiCommonImp.h.

59 {
60 // check the environment
61 Assert( service , "get():: IDataProvider* points to NULL!" ) ;
62 // get the helper object:
63 Gaudi::Utils::GetData<TYPE> getter ;
64 return getter ( *this ,
65 service ,
66 fullTESLocation ( location , useRootInTES ) ) ;
67 }
Gaudi::Utils::GetData
Helper structure for implementation of "get"-functions for GaudiCommon
Definition: GaudiCommon.h:36
GaudiCommon::Assert
void Assert(const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Assertion - throw exception if the given condition is not fulfilled.
Definition: GaudiCommonImp.h:224
GaudiCommon::fullTESLocation
const std::string fullTESLocation(const std::string &location, const bool useRootInTES) const
Returns the full correct event location given the rootInTes settings.
Definition: GaudiCommonImp.h:25
template<class PBASE>
template<class TYPE >

Gaudi::Utils::GetData<TYPE>::return_type GaudiCommon< PBASE >::get | ( | IDataProviderSvc * | svc,
|  | const std::string & | location,
|  | const bool | useRootInTES = `true`
| ) |  | const

Templated access to the data in Gaudi Transient Store.

Quick and safe access to the data in Gaudi transient store. The method located the data at given address and perform the debug printout about located data

// Will access MCHits from the given location
MCHits* hits = get<MCHits>( evtSvc () , "MC/Hits" );

Attention
  The method respects the setting of the job option RootInTES by prepending the value of this to the data location that is passed. The default setting for RootInTES is "" so has no effect. This behavior can be suppressed by passing the argument useRootInTES = false

See also
  IDataProviderSvc
  SmartDataPtr

Exceptions

  GaudiException | for Invalid Data Provider Service
  GaudiException | for invalid/unavailable data

Parameters

  svc | Pointer to data service (data provider)
  location | data location/address in Gaudi Transient Store
  useRootInTES | Flag to turn on(TRUE) off(FALSE) the use of the RootInTES location property

Returns
  pointer to the data object

template<class PBASE>
template<class TYPE >

Gaudi::Utils::GetData<TYPE>::return_type GaudiCommon< PBASE >::getIfExists | ( | IDataProviderSvc * | service,
|  | const std::string & | location,
|  | const bool | useRootInTES
| ) |  | const
| inline

Definition at line 74 of file GaudiCommonImp.h.

77 {
78 // check the environment
79 Assert( service , "get():: IDataProvider* points to NULL!" ) ;
80 // get the helper object:
81 Gaudi::Utils::GetData<TYPE> getter ;
82 return getter ( *this ,
83 service ,
84 fullTESLocation ( location , useRootInTES ),
85 false) ;
86 }
Gaudi::Utils::GetData
Helper structure for implementation of "get"-functions for GaudiCommon
Definition: GaudiCommon.h:36
GaudiCommon::Assert
void Assert(const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Assertion - throw exception if the given condition is not fulfilled.
Definition: GaudiCommonImp.h:224
GaudiCommon::fullTESLocation
const std::string fullTESLocation(const std::string &location, const bool useRootInTES) const
Returns the full correct event location given the rootInTes settings.
Definition: GaudiCommonImp.h:25
template<class PBASE>
template<class TYPE >

Gaudi::Utils::GetData<TYPE>::return_type GaudiCommon< PBASE >::getIfExists | ( | IDataProviderSvc * | svc,
|  | const std::string & | location,
|  | const bool | useRootInTES = `true`
| ) |  | const

Quicker version of the get function which bypasses the check on the retrieved data.

template<class PBASE>
template<class TYPE , class TYPE2 >

Gaudi::Utils::GetData<TYPE>::return_type GaudiCommon< PBASE >::getOrCreate | ( | IDataProviderSvc * | service,
|  | const std::string & | location,
|  | const bool | useRootInTES
| ) |  | const
| inline

Definition at line 111 of file GaudiCommonImp.h.

114 {
115 // check the environment
116 Assert ( service , "getOrCreate():: svc points to NULL!" ) ;
117 // get the helper object
118 Gaudi::Utils::GetOrCreateData<TYPE,TYPE2> getter ;
119 return getter ( *this ,
120 service ,
121 fullTESLocation( location, useRootInTES ) ,
122 location ) ;
123 }
Gaudi::Utils::GetOrCreateData
Helper structure for implementation of "getOrCreate"-functions for GaudiCommon ...
Definition: GetData.h:402
GaudiCommon::Assert
void Assert(const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Assertion - throw exception if the given condition is not fulfilled.
Definition: GaudiCommonImp.h:224
GaudiCommon::fullTESLocation
const std::string fullTESLocation(const std::string &location, const bool useRootInTES) const
Returns the full correct event location given the rootInTes settings.
Definition: GaudiCommonImp.h:25
template<class PBASE>
template<class TYPE , class TYPE2 >

Gaudi::Utils::GetData<TYPE>::return_type GaudiCommon< PBASE >::getOrCreate | ( | IDataProviderSvc * | svc,
|  | const std::string & | location,
|  | const bool | useRootInTES = `true`
| ) |  | const

Get the existing data object from Gaudi Event Transient store.

Alternatively, create new object and register it in TES and return if object does not exist.

MyHits* hits = getOrCreate<MyHits,MyHits>( evtSvc() , "/Event/MyHits" ) ;

Attention
  The method respects the setting of the job option RootInTES by prepending the value of this to the data location that is passed. The default setting for RootInTES is "" so has no effect. This behavior can be suppressed by passing the argument useRootInTES = false

Exceptions

  GaudiException | for Invalid Data Provider Service
  GaudiException | for invalid/unavailable data

Parameters

  svc | Pointer to data provider service
  location | Location in Gaudi Transient Event Store
  useRootInTES | Flag to turn on(TRUE) off(FALSE) the use of the RootInTES location property

Returns
  A valid pointer to the data object

template<class PBASE >

StatusCode GaudiCommon< PBASE >::Info | ( | const std::string & | msg,
|  | const StatusCode | st = `StatusCode::SUCCESS`,
|  | const size_t | mx = `10`
| ) |  | const

Print the info message and return with the given StatusCode.

Also performs statistical analysis of the info messages and suppression after the defined number of instances.

See also
  MsgStream
  IMessageSvc
  StatusCode
  GaudiCommon::Warning

Parameters

  msg | Info message
  st | StatusCode to return
  mx | Maximum number of printouts for this message

Returns
  The given StatusCode

Definition at line 501 of file GaudiCommon.icpp.

504 {
505 // increase local counter of warnings
506 const size_t num = ++m_infos[msg] ;
507 // If suppressed, just return
508 if ( num > mx ) { return st ; }
509 else if ( UNLIKELY(num == mx) ) // issue one-time suppression message
510 { return Print ( "The INFO message is suppressed : '" +
511 msg + "'" , st , MSG::INFO ) ; }
512 // return message
513 return Print ( msg , st , MSG::INFO ) ;
514 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
GaudiCommon::m_infos
Counter m_infos
counter of infos
Definition: GaudiCommon.h:743
GaudiCommon::Print
StatusCode Print(const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const
Print the message and return with the given StatusCode.
Definition: GaudiCommon.icpp:521
MSG::INFO
Definition: IMessageSvc.h:19
template<class PBASE >

void GaudiCommon< PBASE >::initGaudiCommonConstructor | ( | const IInterface * | parent = `0` | ) |
| private

Constructor initializations.

< flag to use the special "efficiency" format

Definition at line 64 of file GaudiCommon.icpp.

65 {
66 // initialise data members
67
68 // the header row for counters printout
69 m_header = " | Counter | # | sum | mean/eff^* | rms/err^* | min | max |" ;
70 // format for regular statistical printout rows
71 m_format1 = " | %|-48.48s|%|50t||%|10d| |%|11.7g| |%|#11.5g| |%|#11.5g| |%|#12.5g| |%|#12.5g| |" ;
72 // format for "efficiency" statistical printout rows
73 m_format2 = " |*%|-48.48s|%|50t||%|10d| |%|11.5g| |(%|#9.6g| +- %|-#9.6g|)%%| ------- | ------- |" ;
74 // flag to use the special "efficiency" format
75 m_useEffFormat = true ;
76
77 // job options
78 // print error counters at finalization ?
79 this->declareProperty
80 ( "ErrorsPrint" , m_errorsPrint ,
81 "Print the statistics of errors/warnings/exceptions")
82 -> declareUpdateHandler
83 ( &GaudiCommon<PBASE>::printErrorHandler, this ) ;
84 // print properties at initialization?
85 this->declareProperty
86 ( "PropertiesPrint" , m_propsPrint ,
87 "Print the properties of the component ")
88 -> declareUpdateHandler
89 ( &GaudiCommon<PBASE>::printPropsHandler, this ) ;
90 // print statistical counters at finalization ?
91 this->declareProperty
92 ( "StatPrint" , m_statPrint ,
93 "Print the table of counters" )
94 -> declareUpdateHandler
95 ( &GaudiCommon<PBASE>::printStatHandler, this ) ;
96 // insert the actual C++ type of the algorithm or tool in the messages?
97 this->declareProperty
98 ( "TypePrint" , m_typePrint ,
99 "Add the actal C++ component type into the messages" ) ;
100 // context
101 this->declareProperty ( "Context" , m_context ) ;
102 // root in TES
103 this->declareProperty ( "RootInTES" , m_rootInTES ) ;
104
105
106 // the header row for counters printout
107 this->declareProperty
108 ( "StatTableHeader" , m_header ,
109 "The header row for the output Stat-table" ) ;
110 // format for regular statistical printout rows
111 this->declareProperty
112 ( "RegularRowFormat" , m_format1 ,
113 "The format for the regular row in the output Stat-table" ) ;
114 // format for "efficiency" statistical printout rows
115 this->declareProperty
116 ( "EfficiencyRowFormat" , m_format2 ,
117 "The format for the regular row in the output Stat-table" ) ;
118 // flag to use the special "efficiency" format
119 this->declareProperty
120 ( "UseEfficiencyRowFormat" , m_useEffFormat ,
121 "Use the special format for printout of efficiency counters" ) ;
122
123
124 //declare the list of simple counters to write.
125 this->declareProperty(
126 "CounterList",
127 m_counterList=std::vector<std::string>(1,".*"),
128 "RegEx list, of simple integer counters for CounterSummary.");
129 //declare the list of stat entities to write.
130 this->declareProperty(
131 "StatEntityList",
132 m_statEntityList=std::vector<std::string>(0),
133 "RegEx list, of StatEntity counters for CounterSummary.");
134
135 // setup context from parent if available
136 if ( parent )
137 {
138 if ( const GaudiAlgorithm* gAlg = dynamic_cast<const GaudiAlgorithm*>(parent) )
139 {
140 m_context = gAlg->context();
141 m_rootInTES = gAlg->rootInTES();
142 }
143 else if ( const GaudiTool* gTool = dynamic_cast<const GaudiTool*> (parent) )
144 {
145 m_context = gTool->context();
146 m_rootInTES = gTool->rootInTES();
147 }
148 }
149
150 // Get the job option service
151 SmartIF<IJobOptionsSvc> jos(PBASE::service("JobOptionsSvc"));
152 if (!jos.isValid()) Exception("Cannot get JobOptionsSvc");
153
154 // Get the "Context" option if in the file...
155 const auto myList = jos->getProperties( this->name() );
156 if ( myList )
157 {
158 // Iterate over the list to set the options
159 for ( const auto& iter : *myList )
160 {
161 const StringProperty* sp = dynamic_cast<const StringProperty*>(iter);
162 if ( sp )
163 {
164 if ( iter->name().compare("Context") == 0 ) {
165 m_context = sp->value();
166 } else if ( iter->name().compare("RootInTES") == 0 ) {
167 m_rootInTES = sp->value();
168 }
169 }
170 }
171 }
172
173 }
SmartIF< IJobOptionsSvc >
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
GaudiCommon::m_typePrint
bool m_typePrint
insert the actual C++ type of the algorithm in the messages?
Definition: GaudiCommon.h:753
boost::spirit
Definition: iter_pos.hpp:13
SimpleProperty< std::string >
GaudiCommon::m_useEffFormat
bool m_useEffFormat
flag to use the special "efficiency" format
Definition: GaudiCommon.h:773
GaudiCommon::m_format1
std::string m_format1
format for regular statistical printout rows
Definition: GaudiCommon.h:769
GaudiCommon::m_rootInTES
std::string m_rootInTES
The rootInTES string.
Definition: GaudiCommon.h:764
GaudiAlgorithm
The useful base class for data processing algorithms.
Definition: GaudiAlgorithm.h:93
GaudiCommon::m_statEntityList
std::vector< std::string > m_statEntityList
Definition: GaudiCommon.h:119
GaudiCommon::m_header
std::string m_header
the header row
Definition: GaudiCommon.h:767
PropertyWithValue::value
const TYPE & value() const
explicit conversion
Definition: Property.h:341
GaudiCommon::m_statPrint
bool m_statPrint
print counters at finalization ?
Definition: GaudiCommon.h:757
GaudiCommon::m_format2
std::string m_format2
format for "efficiency" statistical printout rows
Definition: GaudiCommon.h:771
std::vector< std::string >
GaudiCommon::m_counterList
std::vector< std::string > m_counterList
list of counters to declare. Set by property CounterList. This can be a regular expression.
Definition: GaudiCommon.h:117
GaudiTool
The useful base class for tools.
Definition: GaudiTool.h:98
GaudiCommon::m_errorsPrint
bool m_errorsPrint
print warning and error counters at finalization ?
Definition: GaudiCommon.h:759
GaudiCommon
Implements the common functionality between GaudiTools and GaudiAlgorithms.
Definition: GaudiCommon.h:73
GaudiCommon::m_context
std::string m_context
The context string.
Definition: GaudiCommon.h:762
GaudiCommon::m_propsPrint
bool m_propsPrint
print properties at initialization?
Definition: GaudiCommon.h:755
GaudiCommon::Exception
void Exception(const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Create and (re)-throw a given GaudiException.
Definition: GaudiCommon.icpp:554
template<class PBASE >

StatusCode GaudiCommon< PBASE >::initialize | ( |  | ) |
| override

standard initialization method

Returns
  status code

Definition at line 186 of file GaudiCommon.icpp.

187 {
188
189 // initialize base class
190 const StatusCode sc = PBASE::initialize();
191 if ( sc.isFailure() )
192 { return Error ( "Failed to initialise base class PBASE", sc ) ; }
193
194
195 // some debug printout
196 if ( this->msgLevel(MSG::DEBUG) )
197 {
198 this->debug() << "Initialize base class GaudiCommon<" << System::typeinfoName(typeid(PBASE)) << ">" << endmsg;
199 if ( !context().empty() )
200 this->debug() << "Created with context = '" << context() << "'" << endmsg;
201 }
202
203 // Check rootInTES ends with a /
204 if ( !m_rootInTES.empty() &&
205 m_rootInTES.substr(m_rootInTES.size()-1) != "/" ) m_rootInTES += "/";
206
207 //Set up the CounterSummarySvc May need to be changed
208 m_counterSummarySvc = this->svcLoc()->service("CounterSummarySvc",false);
209 if (this->msgLevel(MSG::DEBUG))
210 {
211 if (!m_counterSummarySvc)
212 this->debug() << "could not locate CounterSummarySvc, no counter summary will be made" << endmsg;
213 else this->debug() << "found CounterSummarySvc OK" << endmsg;
214 }
215
216 // properties will be printed if asked for or in "MSG::DEBUG" mode
217 if ( propsPrint() ) { printProps(MSG::ALWAYS); }
218 else if ( this->msgLevel(MSG::DEBUG) ) { printProps(MSG::DEBUG); }
219
220 //update DataHandles to point to full TES location
221
222 //get root of DataManager
223 SmartIF<IDataManagerSvc> dataMgrSvc(PBASE::evtSvc());
224 std::string rootName(dataMgrSvc->rootName());
225 if ("" != rootName && '/' != rootName[rootName.size() - 1]) {
226 rootName = rootName + "/";
227 }
228
229
230 auto fixLocation = [this, rootName] (const std::string & location) -> std::string {
231 std::string result = fullTESLocation(location, UseRootInTES);
232 //check whether we have an absolute path if yes return it - else prepend DataManager Root
233 result = (result[0] == '/' ? result : rootName + result);
234
235 if (result != location && this->msgLevel(MSG::DEBUG))
236 this->debug() << "Changing " << location << " to " << result << endmsg;
237
238 return result;
239 };
240
241
242 class DHHFixer : public IDataHandleVisitor {
243 public:
244 DHHFixer(std::function<std::string (const std::string&)> f): m_f(f) {}
245 virtual void visit(const IDataHandleHolder* idhh) {
246 if (idhh == 0) return;
247
248 std::string r;
249 for (auto h : idhh->inputHandles()) {
250 r = m_f(h->objKey());
251 if (r != h->objKey())
252 h->updateKey( r );
253 }
254 for (auto h : idhh->outputHandles()) {
255 r = m_f(h->objKey());
256 if (r != h->objKey())
257 h->updateKey( r );
258 }
259 }
260 private:
261 std::function<std::string (const std::string&)> m_f;
262 };
263
264 this->m_updateDataHandles.reset(new DHHFixer(fixLocation));
265
266 return sc;
267 }
SmartIF< IDataManagerSvc >
std::string::empty
T empty(T...args)
AnalysisTest.initialize
def initialize()
Definition: AnalysisTest.py:12
IDataHandleHolder::inputHandles
virtual std::vector< Gaudi::DataHandle * > inputHandles() const =0
std::function
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
GaudiCommon::Error
StatusCode Error(const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
Print the error message and return with the given StatusCode.
Definition: GaudiCommon.icpp:459
MSG::DEBUG
Definition: IMessageSvc.h:18
GaudiCommon::context
const std::string & context() const
Returns the "context" string. Used to identify different processing states.
Definition: GaudiCommon.h:712
merge_files.sc
int sc
Definition: merge_files.py:167
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
std::string
STL class.
IDataHandleHolder
Definition: IDataHandleHolder.h:17
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiCommon::m_rootInTES
std::string m_rootInTES
The rootInTES string.
Definition: GaudiCommon.h:764
GaudiCommon::propsPrint
bool propsPrint() const
Print properties at initialization ?
Definition: GaudiCommon.h:519
GaudiCommon::UseRootInTES
static const bool UseRootInTES
Simple definition to be used with the new useRootInTES argument get and put methods...
Definition: GaudiCommon.h:99
HiveAlgSequencer.h
tuple h
Definition: HiveAlgSequencer.py:24
GaudiCommon::m_counterSummarySvc
SmartIF< ICounterSummarySvc > m_counterSummarySvc
a pointer to the CounterSummarySvc
Definition: GaudiCommon.h:115
IDataHandleVisitor
Definition: IDataHandleHolder.h:38
std::string::size
T size(T...args)
IDataHandleHolder::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const =0
std::string::substr
T substr(T...args)
GaudiCommon::fullTESLocation
const std::string fullTESLocation(const std::string &location, const bool useRootInTES) const
Returns the full correct event location given the rootInTes settings.
Definition: GaudiCommonImp.h:25
GaudiCommon::printProps
long printProps(const MSG::Level level=MSG::ALWAYS) const
perform the actual printout of properties
Definition: GaudiCommon.icpp:661
MSG::ALWAYS
Definition: IMessageSvc.h:23
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
template<class PBASE>

GaudiCommon& GaudiCommon< PBASE >::operator= | ( | const GaudiCommon< PBASE > & |  | ) |
| private delete

template<class PBASE >

StatusCode GaudiCommon< PBASE >::Print | ( | const std::string & | msg,
|  | const StatusCode | st = `StatusCode::SUCCESS`,
|  | const MSG::Level | lev = `MSG::INFO`
| ) |  | const

Print the message and return with the given StatusCode.

See also
  MsgStream
  IMessageSvc
  StatusCode

Parameters

  msg | Message to print
  st | StatusCode to return
  lev | Printout level for the given message

Returns
  The given StatusCode

Definition at line 521 of file GaudiCommon.icpp.

524 {
525 // perform printout ?
526 if ( !this->msgLevel( lvl ) ) { return st ; } // RETURN
527
528 // use the predefined stream
529 MsgStream& str = this->msgStream( lvl ) ;
530 if ( typePrint() ) { str << System::typeinfoName(typeid(*this)) << ":: " ; }
531
532 // print the message
533 str << msg ;
534
535 // test status code
536 if ( st.isSuccess() ) { }
537 else if ( StatusCode::FAILURE != st.getCode() )
538 { str << " StatusCode=" << st.getCode() ; }
539 else
540 { str << " StatusCode=FAILURE" ; }
541
542 // perform print operation
543 str << endmsg ;
544
545 // return
546 return st;
547 }
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
StatusCode::getCode
unsigned long getCode() const
Get the status code by value.
Definition: StatusCode.h:93
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
StatusCode::FAILURE
Definition: StatusCode.h:29
GaudiCommon::typePrint
bool typePrint() const
Insert the actual C++ type of the algorithm/tool in the messages ?
Definition: GaudiCommon.h:517
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
template<class PBASE >

void GaudiCommon< PBASE >::printErrorHandler | ( | Property & |  | ) |
| private

handler for "ErrorPrint" property

Definition at line 719 of file GaudiCommon.icpp.

720 {
721 // no action if not yet initialized
722 if ( this -> FSMState() < Gaudi::StateMachine::INITIALIZED ) { return ; }
723 if ( this -> errorsPrint() ) { this -> printErrors () ; }
724 }
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
GaudiCommon::errorsPrint
bool errorsPrint() const
Print error counters at finalization ?
Definition: GaudiCommon.h:523
GaudiCommon::printErrors
long printErrors(const MSG::Level level=MSG::ALWAYS) const
perform the actual printout of error counters
Definition: GaudiCommon.icpp:628
template<class PBASE >

long GaudiCommon< PBASE >::printErrors | ( | const MSG::Level | level = `MSG::ALWAYS` | ) | const

perform the actual printout of error counters

Parameters

  level | The message level to print at

Returns
  number of error counters

Definition at line 628 of file GaudiCommon.icpp.

629 {
630 // format for printout
631 boost::format ftm ( " #%|-10s| = %|.8s| %|23t| Message = '%s'" );
632
633 auto print = [&](const Counter& c, const std::string& label) {
634 for (const auto& i : c ) {
635 this->msgStream(level)
636 << ( ftm % label % i.second % i.first )
637 << endmsg;
638 }
639 };
640
641 print( m_exceptions, "EXCEPTIONS" );
642 print( m_errors, "ERRORS" );
643 print( m_warnings, "WARNINGS" );
644 print( m_infos, "INFOS" );
645
646 // return total number of errors+warnings+exceptions
647 return
648 m_exceptions .size () +
649 m_errors .size () +
650 m_warnings .size () +
651 m_infos .size () ;
652 }
GaudiCommon::m_warnings
Counter m_warnings
counter of warnings
Definition: GaudiCommon.h:741
GaudiCommon::m_exceptions
Counter m_exceptions
Counter of exceptions.
Definition: GaudiCommon.h:745
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
GaudiCommon::Counter
std::map< std::string, unsigned int > Counter
the actual type error/warning counter
Definition: GaudiCommon.h:106
gaudirun.c
tuple c
Definition: gaudirun.py:391
std::string
STL class.
GaudiCommon::m_errors
Counter m_errors
Counter of errors.
Definition: GaudiCommon.h:739
GaudiCommon::m_infos
Counter m_infos
counter of infos
Definition: GaudiCommon.h:743
std::map::size
T size(T...args)
print
void print(string text)
Definition: mergesort.cpp:33
gaudirun.level
level
Definition: gaudirun.py:261
ana.i
list i
Definition: ana.py:128
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
template<class PBASE >

long GaudiCommon< PBASE >::printProps | ( | const MSG::Level | level = `MSG::ALWAYS` | ) | const

perform the actual printout of properties

perform the printout of properties

Parameters

  level | The message level to print at

Returns
  number of properties
  number of error counters

Definition at line 661 of file GaudiCommon.icpp.

662 {
663
664 // print ALL properties
665 MsgStream& msg = this->msgStream ( level );
666 const auto& properties = this->getProperties() ;
667 msg << "List of ALL properties of "
668 << System::typeinfoName( typeid( *this ) ) << "/" << this->name()
669 << " #properties = " << properties.size() << endmsg ;
670 for ( const auto& property : reverse(properties) )
671 {
672 msg << "Property ['Name': Value] = " << *property << endmsg ;
673 }
674 return properties.size() ;
675 }
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
reverse
reverse_wrapper< T > reverse(T &&iterable)
Definition: reverse.h:30
gaudiComponentHelp.properties
tuple properties
Definition: gaudiComponentHelp.py:37
gaudirun.level
level
Definition: gaudirun.py:261
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
template<class PBASE >

void GaudiCommon< PBASE >::printPropsHandler | ( | Property & |  | ) |
| private

handler for "PropertiesPrint" property

Definition at line 729 of file GaudiCommon.icpp.

730 {
731 // no action if not yet initialized
732 if ( this -> FSMState() < Gaudi::StateMachine::INITIALIZED ) { return ; }
733 if ( this -> propsPrint() ) { this -> printProps ( MSG::ALWAYS ) ; }
734 }
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
GaudiCommon::propsPrint
bool propsPrint() const
Print properties at initialization ?
Definition: GaudiCommon.h:519
GaudiCommon::printProps
long printProps(const MSG::Level level=MSG::ALWAYS) const
perform the actual printout of properties
Definition: GaudiCommon.icpp:661
MSG::ALWAYS
Definition: IMessageSvc.h:23
template<class PBASE >

long GaudiCommon< PBASE >::printStat | ( | const MSG::Level | level = `MSG::ALWAYS` | ) | const

perform the actual printout of statistical counters

Parameters

  level | The message level to print at

Returns
  number of active statistical counters

Definition at line 598 of file GaudiCommon.icpp.

599 {
600 // print statistics
601 if ( counters().empty() ) { return 0 ; }
602 MsgStream& msg = this->msgStream ( level ) ;
603 //
604 msg << "Number of counters : " << counters().size() ;
605 //
606 if ( !counters().empty() ) { msg << std::endl << m_header ; }
607 //
608 for ( const auto& entry : counters() )
609 {
610 msg << std::endl
611 << Gaudi::Utils::formatAsTableRow
612 ( entry.first ,
613 entry.second ,
614 m_useEffFormat ,
615 m_format1 , m_format2 );
616 }
617 //
618 msg << endmsg ;
619 //
620 return counters().size() ;
621 }
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
std::endl
T endl(T...args)
GaudiCommon::counters
const Statistics & counters() const
accessor to all counters
Definition: GaudiCommon.h:494
Gaudi::Utils::formatAsTableRow
GAUDI_API std::string formatAsTableRow(const StatEntity &counter, const bool flag, const std::string &format1=" |%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |", const std::string &format2="*|%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |")
print the counter in a form of the table row
Definition: StatEntity.cpp:299
GaudiCommon::m_useEffFormat
bool m_useEffFormat
flag to use the special "efficiency" format
Definition: GaudiCommon.h:773
GaudiCommon::m_format1
std::string m_format1
format for regular statistical printout rows
Definition: GaudiCommon.h:769
GaudiCommon::m_header
std::string m_header
the header row
Definition: GaudiCommon.h:767
std::map::size
T size(T...args)
GaudiCommon::m_format2
std::string m_format2
format for "efficiency" statistical printout rows
Definition: GaudiCommon.h:771
gaudirun.level
level
Definition: gaudirun.py:261
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
template<class PBASE >

void GaudiCommon< PBASE >::printStatHandler | ( | Property & |  | ) |
| private

handler for "StatPrint" property

Definition at line 739 of file GaudiCommon.icpp.

740 {
741 // no action if not yet initialized
742 if ( this -> FSMState() < Gaudi::StateMachine::INITIALIZED ) { return ; }
743 if ( this -> statPrint() ) { this -> printStat ( MSG::ALWAYS ) ; }
744 }
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
GaudiCommon::statPrint
bool statPrint() const
Print statistical counters at finalization ?
Definition: GaudiCommon.h:521
GaudiCommon::printStat
long printStat(const MSG::Level level=MSG::ALWAYS) const
perform the actual printout of statistical counters
Definition: GaudiCommon.icpp:598
MSG::ALWAYS
Definition: IMessageSvc.h:23
template<class PBASE>

bool GaudiCommon< PBASE >::propsPrint | ( |  | ) | const
| inline

Print properties at initialization ?

Definition at line 519 of file GaudiCommon.h.

519 { return m_propsPrint ; }
GaudiCommon::m_propsPrint
bool m_propsPrint
print properties at initialization?
Definition: GaudiCommon.h:755
template<class PBASE >

DataObject * GaudiCommon< PBASE >::put | ( | IDataProviderSvc * | svc,
|  | DataObject * | object,
|  | const std::string & | location,
|  | const bool | useRootInTES = `true`
| ) |  | const

Register a data object or container into Gaudi Event Transient Store.

See also
  IDataProviderSvc

Attention
  The method respects the setting of the job option RootInTES by prepending the value of this to the data location that is passed. The default setting for RootInTES is "" so has no effect. This behavior can be suppressed by passing the argument useRootInTES = false

Parameters

  svc | Pointer to data provider service
  object | Data object or container to be registered
  location | Location in Gaudi Event Transient Store ("/Event" could be omitted )
  useRootInTES | Flag to turn on(TRUE) off(FALSE) the use of the RootInTES location property

Exceptions

  GaudiException | for invalid event data service
  GaudiException | for invalid object
  GaudiException | for error result from event data service

Returns
  StatusCode

Return values

  StatusCode::SUCCESS | Data was successfully placed in the TES.
  StatusCode::FAILURE | Failed to store data in the TES.

Definition at line 686 of file GaudiCommon.icpp.

690 {
691 // check arguments
692 Assert ( svc , "put():: Invalid 'service'!" ) ;
693 Assert ( object , "put():: Invalid 'Object'!" ) ;
694 Assert ( !location.empty() , "put():: Invalid 'address' = '' " ) ;
695 // final data location
696 const std::string & fullLocation = fullTESLocation( location, useRootInTES );
697 // register the object!
698 const StatusCode status = '/' == fullLocation[0] ?
699 svc -> registerObject( fullLocation , object ) :
700 svc -> registerObject( "/Event/" + fullLocation , object ) ;
701 // check the result!
702 if ( status.isFailure() )
703 { Exception ( "put():: could not register '" +
704 System::typeinfoName( typeid( *object ) ) +
705 "' at address '" + fullLocation + "'" , status ) ; }
706 if ( this->msgLevel( MSG::DEBUG ) )
707 { Print( "The object of type '" +
708 System::typeinfoName( typeid( *object ) ) +
709 "' is registered in TS at address '"
710 + fullLocation + "'" , status , MSG::DEBUG ).ignore() ; }
711 return object;
712 }
std::string::empty
T empty(T...args)
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
MSG::DEBUG
Definition: IMessageSvc.h:18
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
std::string
STL class.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiCommon::Print
StatusCode Print(const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const
Print the message and return with the given StatusCode.
Definition: GaudiCommon.icpp:521
GaudiCommon::Assert
void Assert(const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Assertion - throw exception if the given condition is not fulfilled.
Definition: GaudiCommonImp.h:224
GaudiCommon::fullTESLocation
const std::string fullTESLocation(const std::string &location, const bool useRootInTES) const
Returns the full correct event location given the rootInTes settings.
Definition: GaudiCommonImp.h:25
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:108
GaudiCommon::Exception
void Exception(const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Create and (re)-throw a given GaudiException.
Definition: GaudiCommon.icpp:554
template<class PBASE>
template<class CallerClass >

void GaudiCommon< PBASE >::registerCondition | ( | const std::string & | condition,
|  | StatusCode(CallerClass::*)() | mf = `nullptr`
| ) |  |
| inline

register the current instance to the UpdateManagerSvc as a consumer for a condition.

Parameters

  condition | the path inside the Transient Detector Store to the condition object.
  mf | optional pointer to the member function to call when the condition object is updated. If the pointer is omitted the user must explicitly provide the class name to the method. StatusCode MyAlg::initialize(){ // ... registerCondition("/dd/Conditions/Readout/MyDet/MyCond",&MyAlg::i_CallBack); registerCondition<MyAlg>("/dd/Conditions/Readout/MyDet/MyOtherCond"); // ... return StatusCode.SUCCESS; }

Definition at line 557 of file GaudiCommon.h.

557 {
558 updMgrSvc()->registerCondition(dynamic_cast<CallerClass*>(this),condition,mf);
559 }
GaudiCommon::updMgrSvc
IUpdateManagerSvc * updMgrSvc() const
Short-cut to locate the Update Manager Service.
Definition: GaudiCommonImp.h:214
IUpdateManagerSvc::registerCondition
void registerCondition(CallerClass *instance, const std::string &condition="", typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=nullptr)
Register an object (algorithm instance) to the service.
Definition: IUpdateManagerSvc.h:182
template<class PBASE>
template<class CallerClass , class CondType >

void GaudiCommon< PBASE >::registerCondition | ( | const std::string & | condition,
|  | CondType *& | condPtrDest,
|  | StatusCode(CallerClass::*)() | mf = `NULL`
| ) |  |
| inline

register the current instance to the UpdateManagerSvc as a consumer for a condition.

This version of the method allow the user to specify where to put a copy of the pointer to the condition object.

Parameters

  condition | the path inside the Transient Detector Store to the condition object.
  condPtrDest | pointer to fill with the location of the condition object. Note: the pointer can be safely used only in the execute method or in the member function triggered by the update.
  mf | optional pointer to the member function to call when the condition object is updated. If the pointer is omitted the user must explicitly provide the class name to the method. class MyAlg: public GaudiAlgorithm { // ... public: virtual StatusCode i_CallBack(); private: Condition *m_MyCond; SpecialCondition *m_MyOtherCond; // ... }; StatusCode MyAlg::initialize(){ // ... registerCondition("/dd/Conditions/Readout/MyDet/MyCond",m_MyCond,&MyAlg::i_CallBack); registerCondition<MyAlg>("/dd/Conditions/Readout/MyDet/MyOtherCond",m_MyOtherCond); // ... return StatusCode.SUCCESS; }

Definition at line 591 of file GaudiCommon.h.

592 {
593 updMgrSvc()->registerCondition(dynamic_cast<CallerClass*>(this),condition,mf,condPtrDest);
594 }
GaudiCommon::updMgrSvc
IUpdateManagerSvc * updMgrSvc() const
Short-cut to locate the Update Manager Service.
Definition: GaudiCommonImp.h:214
IUpdateManagerSvc::registerCondition
void registerCondition(CallerClass *instance, const std::string &condition="", typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=nullptr)
Register an object (algorithm instance) to the service.
Definition: IUpdateManagerSvc.h:182
template<class PBASE>
template<class CallerClass >

void GaudiCommon< PBASE >::registerCondition | ( | char * | condition,
|  | StatusCode(CallerClass::*)() | mf = `NULL`
| ) |  |
| inline

just to avoid conflicts with the version using a pointer to a template class.

Definition at line 597 of file GaudiCommon.h.

597 {
598 updMgrSvc()->registerCondition(dynamic_cast<CallerClass*>(this),std::string(condition),mf);
599 }
GaudiCommon::updMgrSvc
IUpdateManagerSvc * updMgrSvc() const
Short-cut to locate the Update Manager Service.
Definition: GaudiCommonImp.h:214
std::string
STL class.
IUpdateManagerSvc::registerCondition
void registerCondition(CallerClass *instance, const std::string &condition="", typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=nullptr)
Register an object (algorithm instance) to the service.
Definition: IUpdateManagerSvc.h:182
template<class PBASE>
template<class CallerClass , class TargetClass >

void GaudiCommon< PBASE >::registerCondition | ( | TargetClass * | condition,
|  | StatusCode(CallerClass::*)() | mf = `NULL`
| ) |  |
| inline

register the current instance to the UpdateManagerSvc as a consumer for a condition.

Parameters

  condition | the path inside the Transient Detector Store to the condition object.
  mf | optional pointer to the member function to call when the condition object is updated. If the pointer is omitted the user must explicitly provide the class name to the method. StatusCode MyAlg::initialize(){ // ... registerCondition("/dd/Conditions/Readout/MyDet/MyCond",&MyAlg::i_CallBack); registerCondition<MyAlg>("/dd/Conditions/Readout/MyDet/MyOtherCond"); // ... return StatusCode.SUCCESS; }

Definition at line 616 of file GaudiCommon.h.

616 {
617 updMgrSvc()->registerCondition(dynamic_cast<CallerClass*>(this),condition,mf);
618 }
GaudiCommon::updMgrSvc
IUpdateManagerSvc * updMgrSvc() const
Short-cut to locate the Update Manager Service.
Definition: GaudiCommonImp.h:214
IUpdateManagerSvc::registerCondition
void registerCondition(CallerClass *instance, const std::string &condition="", typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=nullptr)
Register an object (algorithm instance) to the service.
Definition: IUpdateManagerSvc.h:182
template<class PBASE >

StatusCode GaudiCommon< PBASE >::release | ( | const IInterface * | interface | ) | const

Manual forced (and 'safe') release of the active tool or service.

IMyTool* mytool = tool<IMyTool>( .... ) ;
mytool->spendCPUtime() ;
release ( mytool ) ;
IMySvc* msvc = svc<IMySvc>( .... ) ;
msvc->spendCPUtime() ;
release ( msvc ) ;

Parameters

  interface | Interface pointer to the interface to be released

Returns
  StatusCode

Return values

  StatusCode::SUCCESS | Tool or service was successfully released
  StatusCode::FAILURE | Error releasing too or service

Definition at line 365 of file GaudiCommon.icpp.

366 {
367 if ( !interface )
368 { return Error ( "release(IInterface):: IInterface* points to NULL!" ) ; }
369 // dispatch between tools and services
370 const IAlgTool* algTool = dynamic_cast<const IAlgTool*>( interface ) ;
371 // perform the actual release
372 return algTool ? releaseTool( algTool ) : releaseSvc( interface ) ;
373 }
GaudiCommon::releaseSvc
StatusCode releaseSvc(const IInterface *svc) const
manual forced (and 'safe') release of the service
Definition: GaudiCommon.icpp:416
GaudiCommon::Error
StatusCode Error(const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
Print the error message and return with the given StatusCode.
Definition: GaudiCommon.icpp:459
GaudiCommon::releaseTool
StatusCode releaseTool(const IAlgTool *tool) const
manual forced (and 'safe') release of the tool
Definition: GaudiCommon.icpp:380
IAlgTool
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
template<class PBASE >

StatusCode GaudiCommon< PBASE >::releaseSvc | ( | const IInterface * | svc | ) | const
| protected

manual forced (and 'safe') release of the service

Definition at line 416 of file GaudiCommon.icpp.

417 {
418 if( !Svc ) return Error ( "releaseSvc(IInterface):: IInterface* points to NULL!" ) ;
419 SmartIF<IService> svc{const_cast<IInterface*>(Svc)};
420 if (!svc) return Warning( "releaseSvc(IInterface):: IInterface* is not a service" );
421 auto it = std::lower_bound( std::begin(m_services), std::end(m_services), svc, GaudiCommon_details::svc_lt );
422 if (it == m_services.end() || !GaudiCommon_details::svc_eq(*it,svc)) {
423 return Warning( "releaseSvc(IInterface):: IInterface* is not active" );
424 }
425 if ( this->msgLevel(MSG::DEBUG) ) {
426 this->debug() << "Releasing service '" << (*it)->name() << "'" << endmsg;
427 }
428 m_services.erase(it);
429 return StatusCode::SUCCESS;
430 }
SmartIF< IService >
GaudiCommon_details::svc_eq
constexpr const struct GaudiCommon_details::svc_eq_t svc_eq
GaudiCommon::m_services
Services m_services
List of active services.
Definition: GaudiCommon.h:736
GaudiCommon::Error
StatusCode Error(const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
Print the error message and return with the given StatusCode.
Definition: GaudiCommon.icpp:459
MSG::DEBUG
Definition: IMessageSvc.h:18
std::end
T end(T...args)
std::lower_bound
T lower_bound(T...args)
GaudiCommon_details::svc_lt
constexpr const struct GaudiCommon_details::svc_lt_t svc_lt
StatusCode::SUCCESS
Definition: StatusCode.h:30
IInterface
Definition of the basic interface.
Definition: IInterface.h:234
std::vector::erase
T erase(T...args)
GaudiCommon::Warning
StatusCode Warning(const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
Print the warning message and return with the given StatusCode.
Definition: GaudiCommon.icpp:480
std::begin
T begin(T...args)
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
template<class PBASE >

StatusCode GaudiCommon< PBASE >::releaseTool | ( | const IAlgTool * | tool | ) | const
| protected

manual forced (and 'safe') release of the tool

Definition at line 380 of file GaudiCommon.icpp.

381 {
382 if( !algTool )
383 { return Error ( "releaseTool(IAlgTool):: IAlgTool* points to NULL!" ) ; }
384 if( !this->toolSvc() )
385 { return Error ( "releaseTool(IAlgTool):: IToolSvc* points to NULL!" ) ; }
386 // find a tool in the list of active tools
387 auto it = std::find(m_managedTools.begin(), m_managedTools.end(), algTool);
388 if (m_managedTools.end() == it)
389 { return Warning("releaseTool(IAlgTool):: IAlgTool* is not active" ) ; }
390 // get the tool
391 IAlgTool* t = *it ;
392 // cache name
393 const std::string name = t->name();
394 if ( this->msgLevel(MSG::DEBUG) )
395 { this->debug() << "Releasing tool '" << name << "'" << endmsg; }
396 // remove the tool from the lists
397 PBASE::deregisterTool(t);
398 m_managedTools.erase(it);
399 // release tool
400 if ( this->msgLevel(MSG::DEBUG) ) {
401 this->debug() << "The tool '" << t->name() << "' of type '"
402 << System::typeinfoName(typeid(*t))
403 << "' is released" << endmsg;
404 }
405 const StatusCode sc = this->toolSvc()->releaseTool(t) ;
406 return sc.isSuccess() ?
407 sc :
408 Warning( "releaseTool(IAlgTool):: error from IToolSvc releasing "+name , sc ) ;
409 }
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
GaudiCommon::Error
StatusCode Error(const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
Print the error message and return with the given StatusCode.
Definition: GaudiCommon.icpp:459
MSG::DEBUG
Definition: IMessageSvc.h:18
std::vector::end
T end(T...args)
merge_files.sc
int sc
Definition: merge_files.py:167
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.
std::string
STL class.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
std::vector::erase
T erase(T...args)
GaudiCommon::Warning
StatusCode Warning(const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
Print the warning message and return with the given StatusCode.
Definition: GaudiCommon.icpp:480
std::find
T find(T...args)
std::vector::begin
T begin(T...args)
IAlgTool
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
GaudiCommon::m_managedTools
AlgTools m_managedTools
List of active tools.
Definition: GaudiCommon.h:734
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
template<class PBASE>

const std::string& GaudiCommon< PBASE >::rootInTES | ( |  | ) | const
| inline

Returns the "rootInTES" string.

Used as the directory root in the TES for which all data access refers to (both saving and retrieving).

Definition at line 716 of file GaudiCommon.h.

716 { return m_rootInTES; }
GaudiCommon::m_rootInTES
std::string m_rootInTES
The rootInTES string.
Definition: GaudiCommon.h:764
template<class PBASE>

StatusCode GaudiCommon< PBASE >::runUpdate | ( |  | ) |
| inline

asks the UpdateManagerSvc to perform an update of the instance (if needed) without waiting the next BeginEvent incident.

It is useful if the instance can be instantiated after a BeginEvent incident, and used before the next one (for example with tools).

StatusCode MyTool::initialize(){
// ...
return runUpdate();
}

Definition at line 630 of file GaudiCommon.h.

630 { return updMgrSvc()->update(this); }
GaudiCommon::updMgrSvc
IUpdateManagerSvc * updMgrSvc() const
Short-cut to locate the Update Manager Service.
Definition: GaudiCommonImp.h:214
IUpdateManagerSvc::update
StatusCode update(CallerClass *instance)
Update the given instance.
Definition: IUpdateManagerSvc.h:245
template<class PBASE>

const Services& GaudiCommon< PBASE >::services | ( |  | ) | const
| inline

get the list of aquired services

Definition at line 698 of file GaudiCommon.h.

698 { return m_services ; } // get all services
GaudiCommon::m_services
Services m_services
List of active services.
Definition: GaudiCommon.h:736
template<class PBASE>

bool GaudiCommon< PBASE >::statPrint | ( |  | ) | const
| inline

Print statistical counters at finalization ?

Definition at line 521 of file GaudiCommon.h.

521 { return m_statPrint ; }
GaudiCommon::m_statPrint
bool m_statPrint
print counters at finalization ?
Definition: GaudiCommon.h:757
template<class PBASE >
template<class SERVICE >

SmartIF< SERVICE > GaudiCommon< PBASE >::svc | ( | const std::string & | name,
|  | const bool | create = `true`
| ) |  | const
| inline

A useful method for the easy location of services.

IMyService* mySvc = svc<IMyService>( "MyServiceType" );

Attention
  The services located with this method will be released automatically

See also
  IService
  ISevcLocator
  Service

Exceptions

  GaudiException | for error in Algorithms::service
  GaudiException | for invalid service

Parameters

  name | service type name
  create | Flag for creation of non-existing services

Returns
  A pointer to the service

Definition at line 181 of file GaudiCommonImp.h.

183 {
184 Assert ( this->svcLoc(), "ISvcLocator* points to NULL!" );
185 SmartIF<SERVICE> s;
186 // check if we already have this service
187 auto it = std::lower_bound( std::begin(m_services), std::end(m_services), name, GaudiCommon_details::svc_lt );
188 if ( it != std::end(m_services) && GaudiCommon_details::svc_eq(*it,name) ) {
189 // Try to get the requested interface
190 s = *it;
191 // check the results
192 if ( !s ) {
193 Exception ("svc():: Could not retrieve Svc '" + name + "'", StatusCode::FAILURE);
194 }
195 } else {
196 auto baseSvc = this->svcLoc()->service(name, create);
197 // Try to get the requested interface
198 s = baseSvc;
199 // check the results
200 if ( !baseSvc || !s ) {
201 Exception ("svc():: Could not retrieve Svc '" + name + "'", StatusCode::FAILURE);
202 }
203 // add the tool into list of known tools, to be properly released
204 addToServiceList(baseSvc);
205 }
206 // return *VALID* located service
207 return s;
208 }
SmartIF
Small smart pointer class with automatic reference counting for IInterface.
Definition: IConverter.h:14
GaudiCommon::addToServiceList
void addToServiceList(SmartIF< IService > svc) const
Add the given service to the list of acquired services.
Definition: GaudiCommon.icpp:438
GaudiCommon_details::svc_eq
constexpr const struct GaudiCommon_details::svc_eq_t svc_eq
GaudiCommon::m_services
Services m_services
List of active services.
Definition: GaudiCommon.h:736
std::end
T end(T...args)
std::lower_bound
T lower_bound(T...args)
GaudiCommon_details::svc_lt
constexpr const struct GaudiCommon_details::svc_lt_t svc_lt
StatusCode::FAILURE
Definition: StatusCode.h:29
std::begin
T begin(T...args)
GaudiCommon::Assert
void Assert(const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Assertion - throw exception if the given condition is not fulfilled.
Definition: GaudiCommonImp.h:224
gaudirun.s
string s
Definition: gaudirun.py:245
GaudiCommon::Exception
void Exception(const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Create and (re)-throw a given GaudiException.
Definition: GaudiCommon.icpp:554
template<class PBASE >
template<class TOOL >

TOOL * GaudiCommon< PBASE >::tool | ( | const std::string & | type,
|  | const std::string & | name,
|  | const IInterface * | parent = `0`,
|  | bool | create = `true`
| ) |  | const
| inline

Useful method for the easy location of tools.

IMyTool* myTool =
tool<IMyTool>( "MyToolType", "MyToolName", this );

Attention
  The tools located with this method will be released automatically

See also
  IToolSvc
  IAlgTool

Exceptions

  GaudiException | for invalid Tool Service
  GaudiException | for error from Tool Service
  GaudiException | for invalid tool

Parameters

  type | Tool type
  name | Tool name
  parent | Tool parent
  create | Flag for creation of nonexisting tools

Returns
  A pointer to the tool

Definition at line 129 of file GaudiCommonImp.h.

133 {
134 // for empty names delegate to another method
135 if ( name.empty() ) return tool<TOOL>( type , parent , create ) ;
136 Assert( this->toolSvc(), "tool():: IToolSvc* points to NULL!" ) ;
137 // get the tool from Tool Service
138 TOOL* Tool = nullptr ;
139 const StatusCode sc =
140 this->toolSvc()->retrieveTool ( type , name , Tool , parent , create ) ;
141 if ( sc.isFailure() )
142 { Exception("tool():: Could not retrieve Tool '" + type + "'/'" + name + "'", sc ) ; }
143 if ( !Tool )
144 { Exception("tool():: Could not retrieve Tool '" + type + "'/'" + name + "'" ) ; }
145 // insert tool into list of tools
146 PBASE::registerTool(Tool);
147 m_managedTools.push_back(Tool);
148 // return *VALID* located tool
149 return Tool ;
150 }
std::string::empty
T empty(T...args)
merge_files.sc
int sc
Definition: merge_files.py:167
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
std::vector::push_back
T push_back(T...args)
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiCommon::Assert
void Assert(const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Assertion - throw exception if the given condition is not fulfilled.
Definition: GaudiCommonImp.h:224
GaudiCommon::m_managedTools
AlgTools m_managedTools
List of active tools.
Definition: GaudiCommon.h:734
GaudiCommon::Exception
void Exception(const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Create and (re)-throw a given GaudiException.
Definition: GaudiCommon.icpp:554
template<class PBASE >
template<class TOOL >

TOOL * GaudiCommon< PBASE >::tool | ( | const std::string & | type,
|  | const IInterface * | parent = `0`,
|  | bool | create = `true`
| ) |  | const
| inline

A useful method for the easy location of tools.

IMyTool* myTool = tool<IMyTool>( "PublicToolType" );

Attention
  The tools located with this method will be released automatically

See also
  IToolSvc
  IAlgTool

Exceptions

  GaudiException | for invalid Tool Service
  GaudiException | for error from Tool Service
  GaudiException | for invalid tool

Parameters

  type | Tool type, could be of "Type/Name" format
  parent | Tool parent
  create | Flag for creation of non-existing tools

Returns
  A pointer to the tool

Definition at line 156 of file GaudiCommonImp.h.

159 {
160 // check the environment
161 Assert ( PBASE::toolSvc(), "IToolSvc* points to NULL!" );
162 // retrieve the tool from Tool Service
163 TOOL* Tool = nullptr ;
164 const StatusCode sc =
165 this->toolSvc() -> retrieveTool ( type, Tool, parent , create );
166 if ( sc.isFailure() )
167 { Exception("tool():: Could not retrieve Tool '" + type + "'", sc ) ; }
168 if ( !Tool )
169 { Exception("tool():: Could not retrieve Tool '" + type + "'" ) ; }
170 // add the tool into the list of known tools to be properly released
171 PBASE::registerTool(Tool);
172 m_managedTools.push_back(Tool);
173 // return *VALID* located tool
174 return Tool ;
175 }
merge_files.sc
int sc
Definition: merge_files.py:167
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
std::vector::push_back
T push_back(T...args)
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiCommon::Assert
void Assert(const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Assertion - throw exception if the given condition is not fulfilled.
Definition: GaudiCommonImp.h:224
GaudiCommon::m_managedTools
AlgTools m_managedTools
List of active tools.
Definition: GaudiCommon.h:734
GaudiCommon::Exception
void Exception(const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
Create and (re)-throw a given GaudiException.
Definition: GaudiCommon.icpp:554
template<class PBASE>

bool GaudiCommon< PBASE >::typePrint | ( |  | ) | const
| inline

Insert the actual C++ type of the algorithm/tool in the messages ?

Definition at line 517 of file GaudiCommon.h.

517 { return m_typePrint ; }
GaudiCommon::m_typePrint
bool m_typePrint
insert the actual C++ type of the algorithm in the messages?
Definition: GaudiCommon.h:753
template<class PBASE >

IUpdateManagerSvc * GaudiCommon< PBASE >::updMgrSvc | ( |  | ) | const
| inline

Short-cut to locate the Update Manager Service.

Definition at line 214 of file GaudiCommonImp.h.

215 {
216 if ( !m_updMgrSvc )
217 { m_updMgrSvc = svc<IUpdateManagerSvc>("UpdateManagerSvc",true); }
218 return m_updMgrSvc ;
219 }
GaudiCommon::m_updMgrSvc
IUpdateManagerSvc * m_updMgrSvc
Pointer to the Update Manager Service instance.
Definition: GaudiCommon.h:750
template<class PBASE >

StatusCode GaudiCommon< PBASE >::Warning | ( | const std::string & | msg,
|  | const StatusCode | st = `StatusCode::FAILURE`,
|  | const size_t | mx = `10`
| ) |  | const

Print the warning message and return with the given StatusCode.

Also performs statistical analysis of the warning messages and suppression after the defined number of error instances.

if( a < 0 ) { return Warning("a is negative!") ;}
if( b < 0 ) { return Warning("b is illegal!" , StatusCode(25) );
if( c < 0 )
{ return Warning("c is negative" , StatusCode(35) , 50 );

See also
  MsgStream
  IMessageSvc
  StatusCode

Parameters

  msg | Warning message
  st | StatusCode to return
  mx | Maximum number of printouts for this message

Returns
  The given StatusCode

Definition at line 480 of file GaudiCommon.icpp.

483 {
484 // increase local counter of warnings
485 const size_t num = ++m_warnings[msg] ;
486 // If suppressed, just return
487 if ( num > mx ) { return st ; }
488 else if ( UNLIKELY(num == mx) ) // issue one-time suppression message
489 { return Print ( "The WARNING message is suppressed : '" +
490 msg + "'" , st , MSG::WARNING ) ; }
491 // return message
492 return Print ( msg , st , MSG::WARNING ) ;
493 }
GaudiCommon::m_warnings
Counter m_warnings
counter of warnings
Definition: GaudiCommon.h:741
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
GaudiCommon::Print
StatusCode Print(const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const
Print the message and return with the given StatusCode.
Definition: GaudiCommon.icpp:521
MSG::WARNING
Definition: IMessageSvc.h:20

## Member Data Documentation

template<class PBASE>

const bool GaudiCommon< PBASE >::IgnoreRootInTES = false
| static protected

Simple definition to be used with the new useRootInTES argument get<TYPE> and put methods.

If used with cause the RootInTES option to be IGNORED.

Useful to aid with code readability. e.g.

// Get data, ignoring the setting of rootInTES()
MyData * data = get<MyData>( "/Event/MyData", IgnoreRootInTES );

Definition at line 87 of file GaudiCommon.h.

template<class PBASE>

std::string GaudiCommon< PBASE >::m_context
| private

The context string.

Definition at line 762 of file GaudiCommon.h.

template<class PBASE>

std::vector<std::string> GaudiCommon< PBASE >::m_counterList = std::vector<std::string>(1,".*")
| protected

list of counters to declare. Set by property CounterList. This can be a regular expression.

Definition at line 117 of file GaudiCommon.h.

template<class PBASE>

Statistics GaudiCommon< PBASE >::m_counters
| mutable private

General counters.

Definition at line 747 of file GaudiCommon.h.

template<class PBASE>

SmartIF<ICounterSummarySvc> GaudiCommon< PBASE >::m_counterSummarySvc
| protected

a pointer to the CounterSummarySvc

Definition at line 115 of file GaudiCommon.h.

template<class PBASE>

Counter GaudiCommon< PBASE >::m_errors
| mutable private

Counter of errors.

Definition at line 739 of file GaudiCommon.h.

template<class PBASE>

bool GaudiCommon< PBASE >::m_errorsPrint = true
| private

print warning and error counters at finalization ?

Definition at line 759 of file GaudiCommon.h.

template<class PBASE>

Counter GaudiCommon< PBASE >::m_exceptions
| mutable private

Counter of exceptions.

Definition at line 745 of file GaudiCommon.h.

template<class PBASE>

std::string GaudiCommon< PBASE >::m_format1
| private

format for regular statistical printout rows

Definition at line 769 of file GaudiCommon.h.

template<class PBASE>

std::string GaudiCommon< PBASE >::m_format2
| private

format for "efficiency" statistical printout rows

Definition at line 771 of file GaudiCommon.h.

template<class PBASE>

std::string GaudiCommon< PBASE >::m_header
| private

the header row

Definition at line 767 of file GaudiCommon.h.

template<class PBASE>

Counter GaudiCommon< PBASE >::m_infos
| mutable private

counter of infos

Definition at line 743 of file GaudiCommon.h.

template<class PBASE>

AlgTools GaudiCommon< PBASE >::m_managedTools
| mutable private

List of active tools.

Definition at line 734 of file GaudiCommon.h.

template<class PBASE>

bool GaudiCommon< PBASE >::m_propsPrint = false
| private

print properties at initialization?

Definition at line 755 of file GaudiCommon.h.

template<class PBASE>

std::string GaudiCommon< PBASE >::m_rootInTES
| private

The rootInTES string.

Definition at line 764 of file GaudiCommon.h.

template<class PBASE>

Services GaudiCommon< PBASE >::m_services
| mutable private

List of active services.

Definition at line 736 of file GaudiCommon.h.

template<class PBASE>

std::vector<std::string> GaudiCommon< PBASE >::m_statEntityList = std::vector<std::string>(0)
| protected

Definition at line 119 of file GaudiCommon.h.

template<class PBASE>

bool GaudiCommon< PBASE >::m_statPrint = true
| private

print counters at finalization ?

Definition at line 757 of file GaudiCommon.h.

template<class PBASE>

bool GaudiCommon< PBASE >::m_typePrint = true
| private

insert the actual C++ type of the algorithm in the messages?

Definition at line 753 of file GaudiCommon.h.

template<class PBASE>

IUpdateManagerSvc* GaudiCommon< PBASE >::m_updMgrSvc = nullptr
| mutable private

Pointer to the Update Manager Service instance.

Definition at line 750 of file GaudiCommon.h.

template<class PBASE>

bool GaudiCommon< PBASE >::m_useEffFormat
| private

flag to use the special "efficiency" format

Definition at line 773 of file GaudiCommon.h.

template<class PBASE>

Counter GaudiCommon< PBASE >::m_warnings
| mutable private

counter of warnings

Definition at line 741 of file GaudiCommon.h.

template<class PBASE>

const bool GaudiCommon< PBASE >::UseRootInTES = true
| static protected

Simple definition to be used with the new useRootInTES argument get<TYPE> and put methods.

If used with cause the RootInTES option to be USED

Useful to aid with code readability. e.g.

// Get data, using the setting of rootInTES()
MyData * data = get<MyData>( "/Event/MyData", UseRootInTES );
// note the default setting is true, so this is equivalent to
MyData * data = get<MyData>( "/Event/MyData" );

Definition at line 99 of file GaudiCommon.h.

The documentation for this class was generated from the following files:

- GaudiAlg/GaudiAlg/GaudiCommon.h
- GaudiAlg/GaudiAlg/GaudiCommonImp.h
- GaudiAlg/src/lib/GaudiCommon.icpp