Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
11 #ifndef GAUDIALG_GAUDICOMMON_H
12 #define GAUDIALG_GAUDICOMMON_H 1
94 template <
class PBASE>
108 static const bool IgnoreRootInTES =
false;
120 static const bool UseRootInTES =
true;
174 template <
class TYPE>
176 const bool useRootInTES =
true )
const;
180 template <
class TYPE>
182 const bool useRootInTES =
true )
const;
209 template <
class TYPE>
238 template <
class TYPE,
class TYPE2>
240 const bool useRootInTES =
true )
const;
267 const bool useRootInTES =
true )
const;
270 const bool useRootInTES =
true )
const {
298 template <
class TOOL>
299 TOOL*
tool( std::string_view
type, std::string_view
name,
const IInterface* parent = 0,
bool create =
true )
const;
322 template <
class TOOL>
323 TOOL*
tool( std::string_view
type,
const IInterface* parent = 0,
bool create =
true )
const;
346 template <
class SERVICE>
493 auto lock = std::scoped_lock{ m_countersOwnMutex };
495 auto p = m_countersOwn.find( tag );
496 if ( p == m_countersOwn.end() ) {
497 auto [iter, b] = m_countersOwn.try_emplace(
std::string{ tag } );
532 template <
class CallerClass>
534 updMgrSvc()->registerCondition(
dynamic_cast<CallerClass*
>(
this ), condition, mf );
566 template <
class CallerClass,
class CondType>
569 updMgrSvc()->registerCondition(
dynamic_cast<CallerClass*
>(
this ), condition, mf, condPtrDest );
572 template <
class CallerClass>
574 updMgrSvc()->registerCondition(
dynamic_cast<CallerClass*
>(
this ),
std::string( condition ), mf );
591 template <
class CallerClass,
class TargetClass>
593 updMgrSvc()->registerCondition(
dynamic_cast<CallerClass*
>(
this ), condition, mf );
611 template <
typename U = PBASE,
typename = std::enable_if_t<std::is_base_of_v<Gaudi::Algorithm, PBASE>, U>>
613 initGaudiCommonConstructor();
617 template <
typename U = PBASE,
typename = std::enable_if_t<std::is_base_of_v<AlgTool, PBASE>, U>>
620 initGaudiCommonConstructor( this->parent() );
683 void initGaudiCommonConstructor(
const IInterface* parent =
nullptr );
693 return i !=
c.end() ? ++( i->second ) :
c.emplace(
which, 1 ).first->second;
718 this->m_errorsPrint.value() ) {
722 "print the statistics of errors/warnings/exceptions" };
727 this->m_propsPrint.value() ) {
731 "print the properties of the component" };
732 Gaudi::Property<bool> m_typePrint{
this,
"TypePrint",
true,
"add the actual C++ component type into the messages" };
736 this,
"CounterList", {
".*" },
"RegEx list, of simple integer counters for CounterSummary" };
745 #endif // GAUDIALG_GAUDICOMMON_H
Counter m_warnings
counter of warnings
bool operator()(const SmartIF< IService > &s, const SmartIF< IService > &n) const
std::map< std::string, StatEntity, std::less<> > StatisticsOwn
the actual type of general counters
std::map< std::string, std::reference_wrapper< Gaudi::Accumulators::PrintableCounter >, std::less<> > Statistics
GaudiCommon & operator=(const GaudiCommon &)=delete
StatEntity & counter(std::string_view tag)
const Services & services() const
get the list of aquired services
StatisticsOwn m_countersOwn
General counters.
backward compatible StatEntity class.
Alias for backward compatibility.
get
decorate the vector of properties
Counter m_exceptions
Counter of exceptions.
AlgTools m_managedTools
List of active tools.
constexpr const struct GaudiCommon_details::svc_lt_t svc_lt
GaudiCommon(const GaudiCommon &)=delete
void registerCondition(TargetClass *condition, StatusCode(CallerClass::*mf)()=NULL)
register the current instance to the UpdateManagerSvc as a consumer for a condition.
std::vector< SmartIF< IService > > Services
storage for active services
Counter m_infos
counter of infos
bool operator()(const SmartIF< IService > &s, const SmartIF< IService > &n) const
std::mutex m_countersOwnMutex
The mutex for m_countersOwn.
StatusCode runUpdate()
asks the UpdateManagerSvc to perform an update of the instance (if needed) without waiting the next B...
bool operator()(std::string_view n, const SmartIF< IService > &s) const
bool operator()(std::string_view n, const SmartIF< IService > &s) const
constexpr const struct GaudiCommon_details::svc_eq_t svc_eq
StatusCode initialize() override
static const std::string typeString
Header file for std:chrono::duration-based Counters.
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.
const std::string & context() const
Returns the "context" string. Used to identify different processing states.
static auto increment(Counter &c, std::string_view which)
void registerCondition(char *condition, StatusCode(CallerClass::*mf)()=NULL)
just to avoid conflicts with the version using a pointer to a template class.
constexpr static const auto SUCCESS
StatisticsOwn countersOwn() const
accessor to all owned counters
Services m_services
List of active services.
_GetType< Type >::return_type return_type
the actual return type
GaudiCommon(std::string name, ISvcLocator *pSvcLocator)
Algorithm constructor - the SFINAE constraint below ensures that this is constructor is only defined ...
DataObject * put(IDataProviderSvc *svc, DataObject *object, std::string_view location, const bool useRootInTES=true) const
SmartIF< ICounterSummarySvc > m_counterSummarySvc
a pointer to the CounterSummarySvc
std::map< std::string, unsigned int, std::less<> > Counter
the actual type error/warning counter
StatEntity & counter(std::string_view tag) const
accessor to certain counter by name
GaudiCommon(std::string type, std::string name, const IInterface *ancestor)
Tool constructor - SFINAE-ed to insure this constructor is only defined if PBASE derives from AlgTool...
bool operator()(const SmartIF< IService > &s, std::string_view n) const
Counter m_errors
Counter of errors.
bool operator()(const SmartIF< IService > &s, std::string_view n) const
constexpr static const auto FAILURE
void registerCondition(const std::string &condition, StatusCode(CallerClass::*mf)()=nullptr)
register the current instance to the UpdateManagerSvc as a consumer for a condition.
auto put(const DataObjectHandle< Out1 > &out_handle, Out2 &&out)
std::vector< IAlgTool * > AlgTools
storage for active tools