3 #ifndef GAUDIALG_GAUDICOMMON_H
4 #define GAUDIALG_GAUDICOMMON_H 1
36 namespace Gaudi {
namespace Utils {
template <
class TYPE>
struct GetData ; } }
58 template <
class PBASE >
71 static const bool IgnoreRootInTES =
false;
83 static const bool UseRootInTES =
true;
90 typedef std::map<std::string,unsigned int>
Counter ;
138 template <
class TYPE >
141 const std::string& location ,
142 const bool useRootInTES = true )
const ;
146 template <
class TYPE >
149 const std::string& location ,
150 const bool useRootInTES =
true )
const ;
177 template <
class TYPE >
179 const std::string& location ,
180 const bool useRootInTES =
true )
const ;
208 template <
class TYPE ,
class TYPE2 >
211 const std::string& location ,
212 const bool useRootInTES =
true )
const ;
240 const std::string& location ,
241 const bool useRootInTES =
true )
const ;
267 template <
class TOOL >
268 TOOL* tool (
const std::string&
type ,
269 const std::string& name ,
271 bool create =
true )
const ;
294 template <
class TOOL >
295 TOOL* tool (
const std::string&
type ,
297 bool create =
true )
const ;
320 template <
class SERVICE >
322 const bool create =
true )
const ;
350 (
const std::string&
msg ,
352 const size_t mx = 10 )
const ;
377 (
const std::string&
msg ,
379 const size_t mx = 10 )
const ;
396 (
const std::string&
msg ,
398 const size_t mx = 10 )
const ;
411 (
const std::string&
msg ,
424 const std::string& message =
"" ,
436 const char* message ,
447 (
const std::string &
msg ,
460 (
const std::string & msg ,
461 const std::exception & exc ,
472 (
const std::string& msg =
"no message" ,
544 void resetMsgStream()
const;
561 void msgLevelHandler (
Property& theProp );
594 template <
class CallerClass>
596 updMgrSvc()->registerCondition(dynamic_cast<CallerClass*>(
this),condition,mf);
628 template <
class CallerClass,
class CondType>
631 updMgrSvc()->registerCondition(dynamic_cast<CallerClass*>(
this),condition,mf,condPtrDest);
634 template <
class CallerClass>
636 updMgrSvc()->registerCondition(dynamic_cast<CallerClass*>(
this),std::string(condition),mf);
653 template <
class CallerClass,
class TargetClass>
655 updMgrSvc()->registerCondition(dynamic_cast<CallerClass*>(
this),condition,mf);
675 const std::string& name ,
683 {
return i_gcInitialize(); }
692 {
return i_gcFinalize(); }
733 virtual inline unsigned long release() {
return PBASE::release(); }
745 void printErrorHandler (
Property& ) ;
747 void printPropsHandler (
Property& ) ;
749 void printStatHandler (
Property& ) ;
754 inline const std::string &
context()
const {
return m_context; }
758 inline const std::string &
rootInTES()
const {
return m_rootInTES; }
765 const std::string fullTESLocation
766 (
const std::string & location ,
767 const bool useRootInTES )
const ;
772 void addToToolList (
IAlgTool * tool )
const;
776 void initGaudiCommonConstructor(
const IInterface * parent = 0 );
839 #endif // GAUDIALG_GAUDICOMMON_H
MsgStream & warning() const
shortcut for the method msgStream ( MSG::WARNING )
The implementation of inline/templated methods for class GaudiCommon.
Counter m_warnings
counter of warnings
Definition of the MsgStream class used to transmit messages.
Small smart pointer class with automatic reference counting for IInterface.
AlgTools m_tools
List of active tools.
double m_globalTimeOffset
The globalTimeOffset value.
Define general base for Gaudi exception.
MsgStream & info() const
shortcut for the method msgStream ( MSG::INFO )
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Counter m_exceptions
Counter of exceptions.
std::map< std::string, unsigned int > Counter
the actual type error/warning counter
MsgStream & err() const
shortcut for the method msgStream ( MSG::ERROR )
const std::string & rootInTES() const
Returns the "rootInTES" string.
std::string m_rootOnTES
The rootOnTES string.
std::vector< IAlgTool * > AlgTools
storage for active tools
void registerCondition(TargetClass *condition, StatusCode(CallerClass::*mf)()=NULL)
register the current instance to the UpdateManagerSvc as a consumer for a condition.
Services m_services
List of active services.
Statistics m_counters
General counters.
Helper structure for implementation of "get"-functions for GaudiCommon
const std::string & context() const
Returns the "context" string. Used to identify different processing states.
const Statistics & counters() const
accessor to all counters
bool m_typePrint
insert the actual C++ type of the algorithm in the messages?
void registerCondition(char *condition, StatusCode(CallerClass::*mf)()=NULL)
just to avoid conflicts with the version using a pointer to a template class.
Data provider interface definition.
ICounterSummarySvc * m_counterSummarySvc
a pointer to the CounterSummarySvc
const Services & services() const
get the list of aquired services
MsgStream & error() const
shortcut for the method msgStream ( MSG::ERROR )
MSG::Level msgLevel() const
The current message service output level.
virtual ~GaudiCommon()
Destructor.
bool statPrint() const
Print statistical counters at finalization ?
bool m_useEffFormat
flag to use the special "efficiency" format
StatEntity & counter(const std::string &tag) const
accessor to certain counter by name
std::map< std::string, StatEntity > Statistics
the actual type of general counters
Counter m_errors
Counter of errors.
const AlgTools & tools() const
get the list of aquired tools
virtual unsigned long release()
Un-hide IInterface::release (ICC warning #1125)
std::string m_format1
format for regular statistical printout rows
This class is used for returning status codes from appropriate routines.
std::string m_rootInTES
The rootInTES string.
MsgStream & verbose() const
shortcut for the method msgStream ( MSG::VERBOSE )
bool propsPrint() const
Print properties at initialization ?
Definition of the basic interface.
void registerCondition(const std::string &condition, StatusCode(CallerClass::*mf)()=NULL)
register the current instance to the UpdateManagerSvc as a consumer for a condition.
Counter m_infos
counter of infos
MsgStream & msg() const
shortcut for the method msgStream ( MSG::INFO )
bool errorsPrint() const
Print error counters at finalization ?
MsgStream & debug() const
shortcut for the method msgStream ( MSG::DEBUG )
Interface class to the Update Manager service.
StatusCode runUpdate()
asks the UpdateManagerSvc to perform an update of the instance (if needed) without waiting the next B...
std::vector< std::string > m_statEntityList
MSG::Level m_msgLevel
The message level.
std::string m_header
the header row
MsgStream & always() const
shortcut for the method msgStream ( MSG::ALWAYS )
bool typePrint() const
Insert the actual C++ type of the algorithm/tool in the messages ?
Base class from which all concrete algorithm classes should be derived.
bool m_statPrint
print counters at finalization ?
Property base class allowing Property* collections to be "homogeneous".
std::string m_format2
format for "efficiency" statistical printout rows
MsgStream * m_msgStream
The predefined message stream.
IUpdateManagerSvc * m_updMgrSvc
Pointer to the Update Manager Service instance.
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.
Common class providing an architecture-independent hash map.
std::vector< std::string > m_counterList
list of counters to declare. Set by property CounterList. This can be a regular expression.
bool m_errorsPrint
print warning and error counters at finalization ?
Implements the common functionality between GaudiTools and GaudiAlgorithms.
MsgStream & fatal() const
shortcut for the method msgStream ( MSG::FATAL )
double globalTimeOffset() const
Returns the "globalTimeOffset" double.
The basic counter used for Monitoring purposes.
This is a number of static methods for bootstrapping the Gaudi framework.
std::string m_context
The context string.
bool msgLevel(const MSG::Level level) const
Test the output level.
A DataObject is the base class of any identifiable object on any data store.
GaudiUtils::HashMap< std::string, SmartIF< IService > > Services
storage for active services
Simple service interface to collect counters to persist in a summary file.
bool m_propsPrint
print properties at initialization?