ATLAS Offline Software
AthenaMonManager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef AthenaMonManager_H
6 #define AthenaMonManager_H
7 
8 #include <map>
9 #include <string>
10 
12 #include "GaudiKernel/StatusCode.h"
13 #include "GaudiKernel/ServiceHandle.h"
14 #include "GaudiKernel/ToolHandle.h"
17 
18 class ISvcLocator;
19 class ITHistSvc;
21 class TObject;
22 class IMonitorToolBase;
23 
35 
36  public:
37 
50 
59 
60  AthenaMonManager( const std::string& name, ISvcLocator* pSvcLocator );
61 
62  virtual ~AthenaMonManager();
63 
68  static Environment_t envStringToEnum( const std::string& str );
69 
73  static DataType_t dataTypeStringToEnum( const std::string& str );
74 
79  static Environment_t environment();
80 
85  static DataType_t dataType();
86 
87  static unsigned int lumiBlockNumber();
88  static unsigned int runNumber();
89  static unsigned int fillNumber();
90 
91  static unsigned int getLBsLowStat();
92  static unsigned int getLBsMedStat();
93  static unsigned int getLBsHigStat();
94 
95  bool forkedProcess();
96 
97  virtual StatusCode initialize();
98  virtual StatusCode execute();
99  virtual StatusCode start();
100  virtual StatusCode stop();
101  virtual StatusCode finalize();
102 
103  virtual std::string fileKey() const;
104 
108  virtual void passOwnership( TObject* h, const std::string& key );
109 
113  virtual void writeAndDelete( const std::string& key );
114 
115  protected:
116  ToolHandleArray<IMonitorToolBase> m_monTools;
117 
119 
120  private:
121  // Use private implementation idiom for more flexible development.
122  class Imp;
124 
125 };
126 
127 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:73
AthenaMonManager::runNumber
static unsigned int runNumber()
Definition: AthenaMonManager.cxx:341
AthenaMonManager::fileKey
virtual std::string fileKey() const
Definition: AthenaMonManager.cxx:648
AthenaMonManager::cosmics
@ cosmics
Definition: AthenaMonManager.h:58
AthenaMonManager::AOD
@ AOD
Definition: AthenaMonManager.h:49
AthenaMonManager::passOwnership
virtual void passOwnership(TObject *h, const std::string &key)
Pass ownership of a TObject to this manager so that it will be deleted appropriately.
Definition: AthenaMonManager.cxx:656
AthenaMonManager::finalize
virtual StatusCode finalize()
Definition: AthenaMonManager.cxx:557
AthenaMonManager::envStringToEnum
static Environment_t envStringToEnum(const std::string &str)
Converts a string to an Environment_t of the same name.
Definition: AthenaMonManager.cxx:232
AthenaMonManager::heavyIonCollisions
@ heavyIonCollisions
Definition: AthenaMonManager.h:58
AthenaMonManager::DataType_t
DataType_t
An enumeration of the different types of data the monitoring application may be running over.
Definition: AthenaMonManager.h:58
AthenaMonManager::m_d
Imp * m_d
Definition: AthenaMonManager.h:122
AthenaMonManager::getLBsLowStat
static unsigned int getLBsLowStat()
Definition: AthenaMonManager.cxx:303
AthenaMonManager::environment
static Environment_t environment()
Returns the running environment of the monitoring application to help ManagedMonitorToolBase objects ...
Definition: AthenaMonManager.cxx:298
AthenaMonManager::fillNumber
static unsigned int fillNumber()
Definition: AthenaMonManager.cxx:353
AthAlgorithm.h
AthenaMonManager::getLBsMedStat
static unsigned int getLBsMedStat()
Definition: AthenaMonManager.cxx:306
AthenaMonManager::tier0ESD
@ tier0ESD
Definition: AthenaMonManager.h:49
AthenaMonManager::dataType
static DataType_t dataType()
Returns the data type that the monitoring application is running over to help ManagedMonitorToolBase ...
Definition: AthenaMonManager.cxx:315
AthenaMonManager::start
virtual StatusCode start()
Definition: AthenaMonManager.cxx:612
AthenaMonManager
An Algorithm that manages a set of modules, each inheriting from ManagedMonitorToolBase,...
Definition: AthenaMonManager.h:34
AthenaMonManager::dataTypeStringToEnum
static DataType_t dataTypeStringToEnum(const std::string &str)
Converts a string to a DataType_t of the same name.
Definition: AthenaMonManager.cxx:268
AthenaMonManager::collisions
@ collisions
Definition: AthenaMonManager.h:58
AthenaMonManager::tier0
@ tier0
Definition: AthenaMonManager.h:49
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthenaMonManager::online
@ online
Definition: AthenaMonManager.h:49
AthenaMonManager::writeAndDelete
virtual void writeAndDelete(const std::string &key)
If the TObject is owned by this manager, its Write() method is called and it is deleted.
Definition: AthenaMonManager.cxx:665
AthenaMonManager::tier0Raw
@ tier0Raw
Definition: AthenaMonManager.h:49
AthenaMonManager::user
@ user
Definition: AthenaMonManager.h:49
AthenaMonManager::m_monTools
ToolHandleArray< IMonitorToolBase > m_monTools
Definition: AthenaMonManager.h:116
AthAlgorithm
Definition: AthAlgorithm.h:47
AthenaMonManager::Environment_t
Environment_t
An enumeration of the different types of running environment the monitoring application may be in.
Definition: AthenaMonManager.h:49
IMonitorToolBase
Definition: IMonitorToolBase.h:25
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AthenaMonManager::getLBsHigStat
static unsigned int getLBsHigStat()
Definition: AthenaMonManager.cxx:309
AthenaMonManager::execute
virtual StatusCode execute()
Definition: AthenaMonManager.cxx:469
AthenaMonManager::stop
virtual StatusCode stop()
Definition: AthenaMonManager.cxx:564
EventInfo.h
AthenaMonManager::AthenaMonManager
AthenaMonManager(const std::string &name, ISvcLocator *pSvcLocator)
Definition: AthenaMonManager.cxx:195
h
AthenaMonManager::forkedProcess
bool forkedProcess()
Definition: AthenaMonManager.cxx:322
AthenaMonManager::altprod
@ altprod
Definition: AthenaMonManager.h:49
str
Definition: BTagTrackIpAccessor.cxx:11
AthenaMonManager::Imp
Definition: AthenaMonManager.cxx:36
AthenaMonManager::lumiBlockNumber
static unsigned int lumiBlockNumber()
Definition: AthenaMonManager.cxx:329
AthenaMonManager::userDefined
@ userDefined
Definition: AthenaMonManager.h:58
AthenaMonManager::~AthenaMonManager
virtual ~AthenaMonManager()
Definition: AthenaMonManager.cxx:221
AthenaMonManager::m_THistSvc
ServiceHandle< ITHistSvc > m_THistSvc
Definition: AthenaMonManager.h:118
AthenaMonManager::noOutput
@ noOutput
Definition: AthenaMonManager.h:49
AthenaMonManager::monteCarlo
@ monteCarlo
Definition: AthenaMonManager.h:58
AthenaMonManager::initialize
virtual StatusCode initialize()
Definition: AthenaMonManager.cxx:361
ServiceHandle< ITHistSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37