|
ATLAS Offline Software
|
Go to the documentation of this file.
17 #ifndef ATHMONITORALGORITHM_H
18 #define ATHMONITORALGORITHM_H
97 void fill(
const ToolHandle<GenericMonitoringTool>& groupHandle,
98 std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>&&
variables )
const;
113 void fill(
const ToolHandle<GenericMonitoringTool>& groupHandle,
114 const std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>&
variables )
const {
115 fill(groupHandle, std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>{
variables});
124 template <
typename...
T>
125 void fill(
const ToolHandle<GenericMonitoringTool>& groupHandle,
T&&...
variables )
const {
126 fill(groupHandle, std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>{std::forward<T>(
variables)...});
138 std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>&&
variables )
const;
147 const std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>&
variables )
const {
157 template <
typename...
T>
242 const ToolHandle<GenericMonitoringTool>&
getGroup(
const std::string&
name )
const;
293 virtual float lbAverageLuminosity(
const EventContext& ctx = Gaudi::Hive::currentContext() )
const;
298 virtual float lbLuminosityPerBCID(
const EventContext& ctx = Gaudi::Hive::currentContext() )
const;
303 virtual double lbDuration(
const EventContext& ctx = Gaudi::Hive::currentContext() )
const;
308 virtual float lbAverageLivefraction(
const EventContext& ctx = Gaudi::Hive::currentContext() )
const;
313 virtual float livefractionPerBCID(
const EventContext& ctx = Gaudi::Hive::currentContext() )
const;
318 virtual double lbLumiWeight(
const EventContext& ctx = Gaudi::Hive::currentContext() )
const;
338 ToolHandleArray<GenericMonitoringTool>
m_tools {
this,
"GMTools",{}};
340 PublicToolHandle<Trig::TrigDecisionTool>
m_trigDecTool {
this,
"TrigDecisionTool",
""};
344 {
this,
"LuminosityCondDataKey",
"LuminosityCondData",
"SG Key of LuminosityCondData object"};
346 {
this,
"LBDurationCondDataKey",
"LBDurationCondData",
"SG Key of LBDurationCondData object"};
348 {
this,
"TrigLiveFractionCondDataKey",
"TrigLiveFractionCondData",
"SG Key of TrigLiveFractionCondData object"};
358 Gaudi::Property<std::string>
m_fileKey {
this,
"FileKey",
""};
359 Gaudi::Property<bool>
m_useLumi {
this,
"EnableLumi",
false};
365 typedef std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>
MonVarVec_t;
369 const ToolHandle<GenericMonitoringTool>
m_dummy;
373 "EnforceExpressTriggers",
false,
374 "Requires that matched triggers made the event enter the express stream"};
Property holding a SG store/key/clid from which a ReadHandle is made.
Environment_t environment() const
Accessor functions for the environment.
virtual float livefractionPerBCID(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the live fraction per bunch crossing ID.
Gaudi::Property< std::string > m_dataTypeStr
DataType string pulled from the job option and converted to enum.
DataType_t dataType() const
Accessor functions for the data type.
virtual float lbInteractionsPerCrossing(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate instantaneous number of interactions, i.e.
virtual double lbLumiWeight(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the average integrated luminosity multiplied by the live fraction.
Gaudi::Property< std::string > m_environmentStr
Environment string pulled from the job option and converted to enum.
virtual float lbAverageLuminosity(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1).
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Tool to tell whether a specific trigger is passed.
Gaudi::Property< std::string > m_triggerChainString
Trigger chain string pulled from the job option and parsed into a vector.
std::vector< std::string > m_vTrigChainNames
Vector of trigger chain names parsed from trigger chain string.
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Key for retrieving EventInfo from StoreGate.
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
std::unordered_map< std::string, size_t > m_toolLookupMap
AthMonitorAlgorithm::Environment_t m_environment
Instance of the Environment_t enum.
Gaudi::Property< int > m_detailLevel
Sets the level of detail used in the monitoring.
void fill(const std::string &groupName, const std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &variables) const
Fills a vector of variables to a group by name.
bool trigChainsArePassed(const std::vector< std::string > &vTrigNames) const
Check whether triggers are passed.
const ToolHandle< GenericMonitoringTool > m_dummy
An algorithm that can be simultaneously executed in multiple threads.
virtual float lbLuminosityPerBCID(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the instantaneous luminosity per bunch crossing.
Base class for Athena Monitoring Algorithms.
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, const std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &variables) const
Fills a vector of variables to a group by reference.
Hold live fraction data produced by TrigLiveFractionCondAlg.
ToolHandleArray< IDQFilterTool > m_DQFilterTools
Array of Data Quality filter tools.
DataType_t dataTypeStringToEnum(const std::string &str) const
Convert the data type string from the python configuration to an enum object.
virtual ~AthMonitorAlgorithm()
Destructor.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< float > m_defaultLBDuration
Default duration of one lumi block.
virtual StatusCode fillHistograms(const EventContext &ctx) const =0
adds event to the monitoring histograms
void fill(const std::string &groupName, T &&... variables) const
Fills a variadic list of variables to a group by name.
DataType_t
Specifies what type of input data is being monitored.
virtual StatusCode execute(const EventContext &ctx) const override
Applies filters and trigger requirements.
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
Environment_t
Specifies the processing environment.
Header file to be included by clients of the Monitored infrastructure.
Hold luminosity data produced by LuminosityCondAlg.
AthMonitorAlgorithm::DataType_t m_dataType
Instance of the DataType_t enum.
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
virtual float lbAverageLivefraction(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the average luminosity livefraction.
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, T &&... variables) const
Fills a variadic list of variables to a group by reference.
Hold luminosity block duration data produced from /TRIGGER/LUMI/LBLB.
Gaudi::Property< bool > m_enforceExpressTriggers
virtual float lbAverageInteractionsPerCrossing(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the average mu, i.e.
virtual StatusCode initialize() override
initialize
SG::ReadCondHandleKey< LuminosityCondData > m_lumiDataKey
virtual StatusCode parseList(const std::string &line, std::vector< std::string > &result) const
Parse a string into a vector.
void fill(const std::string &groupName, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by name.
Environment_t envStringToEnum(const std::string &str) const
Convert the environment string from the python configuration to an enum object.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > MonVarVec_t
Gaudi::Property< std::string > m_fileKey
Internal Athena name for file.
SG::ReadCondHandleKey< TrigLiveFractionCondData > m_trigLiveFractionDataKey
virtual double lbDuration(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the duration of the luminosity block (in seconds)
Gaudi::Property< bool > m_useLumi
Allows use of various luminosity functions.
SG::ReadCondHandleKey< LBDurationCondData > m_lbDurationDataKey
const ToolHandle< GenericMonitoringTool > & getGroup(const std::string &name) const
Get a specific monitoring tool from the tool handle array.