|
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 314 of file AthenaMonManager.cxx.
317 return Imp::s_dataType;
◆ dataTypeStringToEnum()
Converts a string to a DataType_t of the same name.
Definition at line 267 of file AthenaMonManager.cxx.
270 std::string lcstr( strToLower(
str) );
272 if( lcstr ==
"userdefined" )
274 else if( lcstr ==
"montecarlo" )
276 else if( lcstr ==
"collisions" )
278 else if( lcstr ==
"cosmics" )
280 else if( lcstr ==
"heavyioncollisions" )
286 MsgStream
log(
ms,
"AthenaMonManager::dataTypeStringToEnum()" );
287 log << MSG::WARNING <<
"Unknown AthenaMonManager::DataType_t \""
288 <<
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 231 of file AthenaMonManager.cxx.
234 std::string lcstr( strToLower(
str) );
236 if( lcstr ==
"user" )
238 else if( lcstr ==
"nooutput" )
240 else if( lcstr ==
"online" )
242 else if( lcstr ==
"tier0" )
244 else if( lcstr ==
"tier0raw" )
246 else if( lcstr ==
"tier0esd" )
248 else if( lcstr ==
"aod" )
250 else if( lcstr ==
"altprod" )
256 MsgStream
log(
ms,
"AthenaMonManager::envStringToEnum()" );
257 log << MSG::WARNING <<
"Unknown AthenaMonManager::Environment_t \""
258 <<
str <<
"\", returning \"user\"" <<
endmsg;
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode AthenaMonManager::execute |
( |
| ) |
|
|
virtual |
Definition at line 468 of file AthenaMonManager.cxx.
472 pid_t currPID=getpid();
480 Imp::HistLeakChecker
lc(
m_d);
487 if (
name() ==
"HLTMonManager") {
488 ATH_MSG_DEBUG(
"HLTMonManager is obtaining the TrigNavigationThinningSvc lock in slot "
489 << Gaudi::Hive::currentContext().slot() <<
" for event " << Gaudi::Hive::currentContext().eventID().event_number() );
497 ToolHandle<IMonitorToolBase>&
tool = *
i;
502 if(
tool->preSelector() ) {
506 if( !
sc.isSuccess() ) {
507 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"IMonitorToolBase::fillHists() unsuccessful" <<
endmsg;
515 tb->m_bench_algexec_fillHists += bench_tmp;
527 ToolHandle<IMonitorToolBase>&
tool = *
i;
533 sc =
tool->checkHists(
false);
537 tb->m_bench_algexec_checkHists += bench_tmp;
539 if( !
sc.isSuccess() ) {
540 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"IMonitorToolBase::checkHists() unsuccessful" <<
endmsg;
551 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 360 of file AthenaMonManager.cxx.
363 Imp::HistLeakChecker
lc(
m_d);
379 #if 0 // The two branches of the conditional are identical.
415 Imp::s_runLBOverridden =
true;
417 msg(
MSG::DEBUG) <<
" --> using run = " << Imp::s_run <<
", lumiBlock = " << Imp::s_lumiBlock <<
endmsg;
420 msg(
MSG::DEBUG) <<
" --> using run = " << Imp::s_run <<
", lumiBlock = " << Imp::s_lumiBlock <<
endmsg;
433 const std::string
client =
name() + std::string(
"Properties");
448 ToolHandle<IMonitorToolBase>&
tool = *
i;
457 tb->m_bench_alginit_retrieve = bench_tmp;
463 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 328 of file AthenaMonManager.cxx.
331 if (Imp::s_runLBOverridden) {
332 return Imp::s_lumiBlock;
334 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 655 of file AthenaMonManager.cxx.
658 Imp::ObjMap_t::value_type valToInsert(
key,
h );
◆ renounce()
◆ renounceArray()
◆ runNumber()
unsigned int AthenaMonManager::runNumber |
( |
| ) |
|
|
static |
Definition at line 340 of file AthenaMonManager.cxx.
343 if (Imp::s_runLBOverridden) {
346 return Gaudi::Hive::currentContext().eventID().run_number();
◆ start()
StatusCode AthenaMonManager::start |
( |
| ) |
|
|
virtual |
Definition at line 611 of file AthenaMonManager.cxx.
614 Imp::HistLeakChecker
lc(
m_d);
621 ToolHandle<IMonitorToolBase>&
tool = *
i;
630 tb->m_bench_algexec_bookHists += bench_tmp;
632 if( !
sc.isSuccess() ) {
633 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"IMonitorToolBase::bookHists() unsuccessful" <<
endmsg;
642 return StatusCode::SUCCESS;
◆ stop()
StatusCode AthenaMonManager::stop |
( |
| ) |
|
|
virtual |
Definition at line 563 of file AthenaMonManager.cxx.
566 Imp::HistLeakChecker
lc(
m_d);
573 ToolHandle<IMonitorToolBase>&
tool = *
i;
577 if( !
sc.isSuccess() ) {
578 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"IMonitorToolBase::runStat() unsuccessful" <<
endmsg;
583 tb->m_bench_algfin_finalHists.startMeasurement();
586 tb->m_bench_algfin_finalHists.finishMeasurement();
587 if( !
sc.isSuccess() ) {
588 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"IMonitorToolBase::finalHists() unsuccessful" <<
endmsg;
591 tb->m_bench_algfin_checkHists.startMeasurement();
592 sc =
tool->checkHists(
true);
594 tb->m_bench_algfin_checkHists.finishMeasurement();
595 if( !
sc.isSuccess() ) {
596 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"IMonitorToolBase::checkHists() unsuccessful" <<
endmsg;
603 msg(
MSG::DEBUG) <<
" --> Done calling IMonitorToolBase::finalHists() and IMonitorToolBase::checkHists()" <<
endmsg;
606 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 664 of file AthenaMonManager.cxx.
672 TObject* o =
i->second;
673 TH1*
h =
dynamic_cast<TH1*
>( o );
679 bool doRecursiveReferenceDelete = gROOT->MustClean();
680 gROOT->SetMustClean(
false);
681 TDirectory*
dir =
h->GetDirectory();
689 if( !
sc.isSuccess() ) {
690 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"AthenaMonManager::WriteAndDeleteHist(): Failure to deReg( TObject* )" <<
endmsg;
693 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>