Loading [MathJax]/jax/input/TeX/config.js
 |
ATLAS Offline Software
|
An Algorithm that manages a set of modules, each inheriting from ManagedMonitorToolBase, by setting common configuration variables and organizing the output data.
More...
#include <AthenaMonManager.h>
|
enum | Environment_t {
user = 0,
noOutput,
online,
tier0,
tier0Raw,
tier0ESD,
AOD,
altprod
} |
| An enumeration of the different types of running environment the monitoring application may be in. More...
|
|
enum | DataType_t {
userDefined = 0,
monteCarlo,
collisions,
cosmics,
heavyIonCollisions
} |
| An enumeration of the different types of data the monitoring application may be running over. More...
|
|
|
| AthenaMonManager (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~AthenaMonManager () |
|
bool | forkedProcess () |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute () |
|
virtual StatusCode | start () |
|
virtual StatusCode | stop () |
|
virtual StatusCode | finalize () |
|
virtual std::string | fileKey () const |
|
virtual void | passOwnership (TObject *h, const std::string &key) |
| Pass ownership of a TObject to this manager so that it will be deleted appropriately. More...
|
|
virtual void | writeAndDelete (const std::string &key) |
| If the TObject is owned by this manager, its Write() method is called and it is deleted. More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
An Algorithm that manages a set of modules, each inheriting from ManagedMonitorToolBase, by setting common configuration variables and organizing the output data.
It provides all the functionality and behaviour of AthenaMon.
- Author
- Michael Wilson, CERN, January 2007
Definition at line 34 of file AthenaMonManager.h.
◆ StoreGateSvc_t
◆ DataType_t
An enumeration of the different types of data the monitoring application may be running over.
This can be used to select which histograms to produce, e.g., to prevent the production of colliding-beam histograms when running on cosmic-ray data. Strings of the same names may be given as jobOptions.
Enumerator |
---|
userDefined | |
monteCarlo | |
collisions | |
cosmics | |
heavyIonCollisions | |
Definition at line 58 of file AthenaMonManager.h.
◆ Environment_t
An enumeration of the different types of running environment the monitoring application may be in.
The running environment may be used to select which histograms are produced, and where they are located in the output. For example, the output paths of the histograms are different for the "user", "online" and the various offline flags. The 'tier0Raw' and 'tier0ESD' are used to select sets of histograms for production either during the RAW --> ESD transform or during the ESD --> AOD transform (but not both!) Strings of the same names may be given as jobOptions.
Enumerator |
---|
user | |
noOutput | |
online | |
tier0 | |
tier0Raw | |
tier0ESD | |
AOD | |
altprod | |
Definition at line 49 of file AthenaMonManager.h.
◆ AthenaMonManager()
AthenaMonManager::AthenaMonManager |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~AthenaMonManager()
AthenaMonManager::~AthenaMonManager |
( |
| ) |
|
|
virtual |
◆ dataType()
Returns the data type that the monitoring application is running over to help ManagedMonitorToolBase objects determine which histograms to produce.
Definition at line 313 of file AthenaMonManager.cxx.
316 return Imp::s_dataType;
◆ dataTypeStringToEnum()
Converts a string to a DataType_t of the same name.
Definition at line 266 of file AthenaMonManager.cxx.
269 std::string lcstr( strToLower(
str) );
271 if( lcstr ==
"userdefined" )
273 else if( lcstr ==
"montecarlo" )
275 else if( lcstr ==
"collisions" )
277 else if( lcstr ==
"cosmics" )
279 else if( lcstr ==
"heavyioncollisions" )
285 MsgStream
log(
ms,
"AthenaMonManager::dataTypeStringToEnum()" );
286 log << MSG::WARNING <<
"Unknown AthenaMonManager::DataType_t \""
287 <<
str <<
"\", returning \"userDefined\"" <<
endmsg;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ environment()
◆ envStringToEnum()
Converts a string to an Environment_t of the same name.
static method (shared by all AthenaMonManager instances during run-time)
Definition at line 230 of file AthenaMonManager.cxx.
233 std::string lcstr( strToLower(
str) );
235 if( lcstr ==
"user" )
237 else if( lcstr ==
"nooutput" )
239 else if( lcstr ==
"online" )
241 else if( lcstr ==
"tier0" )
243 else if( lcstr ==
"tier0raw" )
245 else if( lcstr ==
"tier0esd" )
247 else if( lcstr ==
"aod" )
249 else if( lcstr ==
"altprod" )
255 MsgStream
log(
ms,
"AthenaMonManager::envStringToEnum()" );
256 log << MSG::WARNING <<
"Unknown AthenaMonManager::Environment_t \""
257 <<
str <<
"\", returning \"user\"" <<
endmsg;
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode AthenaMonManager::execute |
( |
| ) |
|
|
virtual |
Definition at line 467 of file AthenaMonManager.cxx.
471 pid_t currPID=getpid();
479 Imp::HistLeakChecker
lc(
m_d);
486 if (
name() ==
"HLTMonManager") {
487 ATH_MSG_DEBUG(
"HLTMonManager is obtaining the TrigNavigationThinningSvc lock in slot "
488 << Gaudi::Hive::currentContext().slot() <<
" for event " << Gaudi::Hive::currentContext().eventID().event_number() );
496 ToolHandle<IMonitorToolBase>&
tool = *
i;
501 if(
tool->preSelector() ) {
505 if( !
sc.isSuccess() ) {
506 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"IMonitorToolBase::fillHists() unsuccessful" <<
endmsg;
514 tb->m_bench_algexec_fillHists += bench_tmp;
526 ToolHandle<IMonitorToolBase>&
tool = *
i;
532 sc =
tool->checkHists(
false);
536 tb->m_bench_algexec_checkHists += bench_tmp;
538 if( !
sc.isSuccess() ) {
539 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"IMonitorToolBase::checkHists() unsuccessful" <<
endmsg;
550 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ fileKey()
std::string AthenaMonManager::fileKey |
( |
| ) |
const |
|
virtual |
◆ fillNumber()
unsigned int AthenaMonManager::fillNumber |
( |
| ) |
|
|
static |
◆ finalize()
StatusCode AthenaMonManager::finalize |
( |
| ) |
|
|
virtual |
◆ forkedProcess()
bool AthenaMonManager::forkedProcess |
( |
| ) |
|
◆ getLBsHigStat()
unsigned int AthenaMonManager::getLBsHigStat |
( |
| ) |
|
|
static |
◆ getLBsLowStat()
unsigned int AthenaMonManager::getLBsLowStat |
( |
| ) |
|
|
static |
◆ getLBsMedStat()
unsigned int AthenaMonManager::getLBsMedStat |
( |
| ) |
|
|
static |
◆ initialize()
StatusCode AthenaMonManager::initialize |
( |
| ) |
|
|
virtual |
Definition at line 359 of file AthenaMonManager.cxx.
362 Imp::HistLeakChecker
lc(
m_d);
378 #if 0 // The two branches of the conditional are identical.
414 Imp::s_runLBOverridden =
true;
416 msg(
MSG::DEBUG) <<
" --> using run = " << Imp::s_run <<
", lumiBlock = " << Imp::s_lumiBlock <<
endmsg;
419 msg(
MSG::DEBUG) <<
" --> using run = " << Imp::s_run <<
", lumiBlock = " << Imp::s_lumiBlock <<
endmsg;
432 const std::string
client =
name() + std::string(
"Properties");
447 ToolHandle<IMonitorToolBase>&
tool = *
i;
456 tb->m_bench_alginit_retrieve = bench_tmp;
462 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ lumiBlockNumber()
unsigned int AthenaMonManager::lumiBlockNumber |
( |
| ) |
|
|
static |
Definition at line 327 of file AthenaMonManager.cxx.
330 if (Imp::s_runLBOverridden) {
331 return Imp::s_lumiBlock;
333 return Gaudi::Hive::currentContext().eventID().lumi_block();
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ passOwnership()
void AthenaMonManager::passOwnership |
( |
TObject * |
h, |
|
|
const std::string & |
key |
|
) |
| |
|
virtual |
Pass ownership of a TObject to this manager so that it will be deleted appropriately.
Definition at line 654 of file AthenaMonManager.cxx.
657 Imp::ObjMap_t::value_type valToInsert(
key,
h );
◆ renounce()
◆ renounceArray()
◆ runNumber()
unsigned int AthenaMonManager::runNumber |
( |
| ) |
|
|
static |
Definition at line 339 of file AthenaMonManager.cxx.
342 if (Imp::s_runLBOverridden) {
345 return Gaudi::Hive::currentContext().eventID().run_number();
◆ start()
StatusCode AthenaMonManager::start |
( |
| ) |
|
|
virtual |
Definition at line 610 of file AthenaMonManager.cxx.
613 Imp::HistLeakChecker
lc(
m_d);
620 ToolHandle<IMonitorToolBase>&
tool = *
i;
629 tb->m_bench_algexec_bookHists += bench_tmp;
631 if( !
sc.isSuccess() ) {
632 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"IMonitorToolBase::bookHists() unsuccessful" <<
endmsg;
641 return StatusCode::SUCCESS;
◆ stop()
StatusCode AthenaMonManager::stop |
( |
| ) |
|
|
virtual |
Definition at line 562 of file AthenaMonManager.cxx.
565 Imp::HistLeakChecker
lc(
m_d);
572 ToolHandle<IMonitorToolBase>&
tool = *
i;
576 if( !
sc.isSuccess() ) {
577 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"IMonitorToolBase::runStat() unsuccessful" <<
endmsg;
582 tb->m_bench_algfin_finalHists.startMeasurement();
585 tb->m_bench_algfin_finalHists.finishMeasurement();
586 if( !
sc.isSuccess() ) {
587 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"IMonitorToolBase::finalHists() unsuccessful" <<
endmsg;
590 tb->m_bench_algfin_checkHists.startMeasurement();
591 sc =
tool->checkHists(
true);
593 tb->m_bench_algfin_checkHists.finishMeasurement();
594 if( !
sc.isSuccess() ) {
595 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"IMonitorToolBase::checkHists() unsuccessful" <<
endmsg;
602 msg(
MSG::DEBUG) <<
" --> Done calling IMonitorToolBase::finalHists() and IMonitorToolBase::checkHists()" <<
endmsg;
605 return StatusCode::SUCCESS;
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ writeAndDelete()
void AthenaMonManager::writeAndDelete |
( |
const std::string & |
key | ) |
|
|
virtual |
If the TObject is owned by this manager, its Write() method is called and it is deleted.
Definition at line 663 of file AthenaMonManager.cxx.
671 TObject* o =
i->second;
672 TH1*
h =
dynamic_cast<TH1*
>( o );
678 bool doRecursiveReferenceDelete = gROOT->MustClean();
679 gROOT->SetMustClean(
false);
680 TDirectory*
dir =
h->GetDirectory();
688 if( !
sc.isSuccess() ) {
689 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"AthenaMonManager::WriteAndDeleteHist(): Failure to deReg( TObject* )" <<
endmsg;
692 gROOT->SetMustClean(doRecursiveReferenceDelete);
◆ m_d
Imp* AthenaMonManager::m_d |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_monTools
◆ m_THistSvc
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
static Environment_t envStringToEnum(const std::string &str)
Converts a string to an Environment_t of the same name.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
SmartIF< ISGAudSvc > m_sgAudSvc
static std::atomic< bool > s_staticDataAreInit
static std::atomic< ISvcLocator * > s_svcLocator
void toolAudStart(const T &tool)
virtual void setOwner(IDataHandleHolder *o)=0
std::string m_environmentProp
std::string m_dataTypeProp
unsigned int m_LBsLowStatProp
virtual StatusCode sysInitialize() override
Override sysInitialize.
static DataType_t dataTypeStringToEnum(const std::string &str)
Converts a string to a DataType_t of the same name.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
static std::mutex s_mutex
::StatusCode StatusCode
StatusCode definition for legacy code.
bool m_manualDataTypeSetupProp
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
ToolHandleArray< IMonitorToolBase > m_monTools
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
unsigned int m_LBsMedStatProp
static const MSG::Level s_resourceMonThreshold
std::string m_fileKeyProp
ToolBench * getToolBench(IMonitorToolBase *t)
DataObjIDColl m_extendedExtraObjects
unsigned int m_lumiBlockProp
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
unsigned int m_LBsHigStatProp
AthAlgorithm()
Default constructor:
ServiceHandle< ITHistSvc > m_THistSvc
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>