|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef TRIGCOSTANALYSIS_TRIGCOSTALYSIS_H
6 #define TRIGCOSTANALYSIS_TRIGCOSTALYSIS_H 1
16 #include "Gaudi/Parsers/Factory.h"
17 #include "GaudiKernel/ITHistSvc.h"
22 #include <unordered_map>
82 "Use a single time range rather than splitting by LB" };
85 "Name for single time range" };
87 Gaudi::Property<std::string>
m_additionalHashMap {
this,
"AdditionalHashMap",
"TrigCostRootAnalysis/hashes2string_29042021.txt",
88 "Used to load strings corresponding to algorithms which are not explicitly scheduled by chains. To be updated periodically." };
91 "Used to load strings corresponding to algorithms which are not explicitly scheduled by chains." };
94 "Length of each variable length Time Range in LB" };
97 "Maximum number of allowed time ranges" };
100 "Monitor individual algorithms by instance name" };
103 "Monitor individual algorithms by instance class type name" };
106 "Monitor global event properties" };
109 "Monitor algorithm occupancy load of individual threads in an MT execution environment" };
112 "Monitor Read-Out System" };
115 "Monitor individual chains by instance name" };
118 "Monitor algorithms associated with chains by instance name" };
121 "Monitor individual sequences by name" };
124 "Apply Enhanced Bias weights" };
127 "Maximum number of full event summaries which will be dumped" };
130 "Save a full record of one in every N events, up to MaxFullEventDumps." };
133 "Base events weight, other weights may be multiplied on top of this one." };
135 Gaudi::Property<std::map<std::string, std::vector<uint32_t>>>
m_rosToRob {
136 this,
"ROSToROBMap", {},
"ROS to ROB mapping" };
139 "Trigger cost payload container for algorithms" };
142 "Trigger ROS cost payload container for algorithms" };
145 "TrigComposite collections with additional cost metadata" };
151 "Enhanced bias weighting tool."};
153 ToolHandle<TrigCompositeUtils::AlgToChainTool>
m_algToChainTool{
this,
"AlgToChainTool",
"",
154 "Tool to retrieve chains for algorithm."};
192 float getWeight(
const EventContext& context);
225 #endif // TRIGCOSTANALYSIS_TRIGCOSTALYSIS_H
virtual StatusCode finalize() final
Currently a noop for this algorithm.
Gaudi::Property< std::string > m_additionalHashMap
ServiceHandle< ITHistSvc > m_histSvc
virtual StatusCode execute() final
Monitor event, unless max range limit reached and event outside of all ranges.
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_costDataKey
std::atomic< size_t > m_fullEventDumps
Counter to keep track of how many events have been full-dumped.
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_rosDataKey
std::set< std::string > m_storeIdentifiers
Identifiers of object stores, needed to cache STORE string-hash values.
std::atomic< size_t > m_maxViewsNumber
What is the maximum number of View instances we've so far cached string hashes to cover?
void writeMetadata()
Write to outpute tree (if any) the metadata needed downstream.
virtual StatusCode initialize() final
Retrieve tools and initialise read handles.
Gaudi::Property< size_t > m_maxFullEventDumps
uint32_t getOnlineSlot(const xAOD::TrigCompositeContainer *costCollection) const
Return the slot used to process the event online.
Gaudi::Property< bool > m_doMonitorROS
Gaudi::Property< bool > m_doMonitorChain
TH1 * bookGetPointer(TH1 *hist, const std::string &tDir="") const
Public method forwarded to this class' AthHistogramAlgorithm::bookGetPointer base.
Gaudi::Property< uint64_t > m_fullEventDumpProbability
std::unordered_map< uint32_t, std::string > m_algTypeMap
Cache of algorithm's type, read from configuration data.
ToolHandle< TrigCompositeUtils::AlgToChainTool > m_algToChainTool
TrigCostAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
Construct TrigCostAnalysis.
StatusCode checkUpdateMaxView(const size_t max)
High watermark for pre-cached string hashes for the SLOT category.
bool const RAWDATA *ch2 const
Property holding a SG store/key/clid from which a ReadHandle is made.
Gaudi::Property< bool > m_useEBWeights
ToolHandle< IEnhancedBiasWeighter > m_enhancedBiasTool
Gaudi::Property< float > m_baseEventWeight
virtual ~TrigCostAnalysis()=default
Default destructor.
std::mutex m_addHostnameMutex
Mutex to update set below.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< bool > m_singleTimeRange
CostROSData m_costROSData
Cached CostROSData class with details needed for ROS monitoring.
TTree * m_metadataTree
Used to write out some metadata needed by post-processing (e.g.
Gaudi::Property< std::vector< std::string > > m_additionalHashList
Gaudi::Property< bool > m_doMonitorThreadOccupancy
Gaudi::Property< bool > m_doMonitorGlobal
StatusCode registerMonitors(MonitoredRange *range)
Populate a newly minted Range object with all configured Monitors.
std::unordered_map< std::string, std::unique_ptr< MonitoredRange > > m_monitoredRanges
Owned storage of Ranges.
Caches and propagates event data to be used by monitoring algorithms.
Gaudi::Property< bool > m_doMonitorSequence
Gaudi::Property< bool > m_doMonitorAlgorithm
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_metadataDataKey
Athena algorithm used to process Trigger cost monitoring data in Run 3 and above. Outputs histograms.
Gaudi::Property< bool > m_doMonitorChainAlgorithm
virtual StatusCode start()
Retrieve menu handle.
SG::ReadHandleKey< TrigConf::HLTMenu > m_HLTMenuKey
Gaudi::Property< size_t > m_TimeRangeLengthLB
Container which represents a time range and holds a collection of Monitors which monitor this range.
Gaudi::Property< std::string > m_singleTimeRangeName
Gaudi::Property< bool > m_doMonitorAlgorithmClass
float getWeight(const EventContext &context)
Compute global event weight to correct for online prescales.
Gaudi::Property< size_t > m_maxTimeRange
Gaudi::Property< std::map< std::string, std::vector< uint32_t > > > m_rosToRob
StatusCode getRange(const EventContext &context, MonitoredRange *&range)
Return or construct and return a Range for the Context.
Caches and propagates event data to be used by monitoring algorithms.
std::set< std::string > m_hostnames ATLAS_THREAD_SAFE
Save unique hostnames for the run.
StatusCode dumpEvent(const EventContext &context) const
Dump event algorithm execution data in ASCII format.
bool checkDoFullEventDump(const EventContext &context, const CostData &costData)
Check if event dumping should be performed for the current event.