ATLAS Offline Software
Loading...
Searching...
No Matches
TrigCostAnalysis Class Reference

Athena algorithm used to process Trigger cost monitoring data in Run 3 and above. More...

#include <TrigCostAnalysis.h>

Inheritance diagram for TrigCostAnalysis:

Public Member Functions

 TrigCostAnalysis (const std::string &name, ISvcLocator *pSvcLocator)
 Construct TrigCostAnalysis.
virtual ~TrigCostAnalysis ()=default
 Default destructor.
virtual StatusCode initialize () final
 Retrieve tools and initialise read handles.
virtual StatusCode start ()
 Retrieve menu handle.
virtual StatusCode execute () final
 Monitor event, unless max range limit reached and event outside of all ranges.
virtual StatusCode finalize () final
 Currently a noop for this algorithm.
TH1 * bookGetPointer (TH1 *hist, const std::string &tDir="") const
 Public method forwarded to this class' AthHistogramAlgorithm::bookGetPointer base.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Public Attributes

ServiceHandle< ITHistSvc > m_histSvc { this, "THistSvc", "THistSvc/THistSvc", "Histogramming svc" }
Gaudi::Property< bool > m_singleTimeRange
Gaudi::Property< std::string > m_singleTimeRangeName
Gaudi::Property< std::string > m_additionalHashMap
Gaudi::Property< std::vector< std::string > > m_additionalHashList
Gaudi::Property< size_t > m_TimeRangeLengthLB
Gaudi::Property< size_t > m_maxTimeRange
Gaudi::Property< bool > m_doMonitorAlgorithm
Gaudi::Property< bool > m_doMonitorAlgorithmClass
Gaudi::Property< bool > m_doMonitorGlobal
Gaudi::Property< bool > m_doMonitorThreadOccupancy
Gaudi::Property< bool > m_doMonitorROS
Gaudi::Property< bool > m_doMonitorChain
Gaudi::Property< bool > m_doMonitorChainAlgorithm
Gaudi::Property< bool > m_doMonitorSequence
Gaudi::Property< bool > m_useEBWeights
Gaudi::Property< size_t > m_maxFullEventDumps
Gaudi::Property< uint64_t > m_fullEventDumpProbability
Gaudi::Property< float > m_baseEventWeight
Gaudi::Property< std::map< std::string, std::vector< uint32_t > > > m_rosToRob
Gaudi::Property< std::set< std::string > > m_excludeAlgsFromChain
SG::ReadHandleKey< xAOD::TrigCompositeContainerm_costDataKey
SG::ReadHandleKey< xAOD::TrigCompositeContainerm_rosDataKey
SG::ReadHandleKey< xAOD::TrigCompositeContainerm_metadataDataKey
SG::ReadHandleKey< TrigConf::HLTMenum_HLTMenuKey
ToolHandle< IEnhancedBiasWeighterm_enhancedBiasTool
ToolHandle< TrigCompositeUtils::AlgToChainToolm_algToChainTool

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool checkDoFullEventDump (const EventContext &context, const CostData &costData)
 Check if event dumping should be performed for the current event.
StatusCode getRange (const EventContext &context, MonitoredRange *&range)
 Return or construct and return a Range for the Context.
StatusCode dumpEvent (const EventContext &context) const
 Dump event algorithm execution data in ASCII format.
StatusCode registerMonitors (MonitoredRange *range)
 Populate a newly minted Range object with all configured Monitors.
float getWeight (const EventContext &context)
 Compute global event weight to correct for online prescales.
uint32_t getOnlineSlot (const xAOD::TrigCompositeContainer *costCollection) const
 Return the slot used to process the event online.
StatusCode checkUpdateMaxView (const size_t max)
 High watermark for pre-cached string hashes for the SLOT category.
void writeMetadata ()
 Write to outpute tree (if any) the metadata needed downstream.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::unordered_map< std::string, std::unique_ptr< MonitoredRange > > m_monitoredRanges
 Owned storage of Ranges.
std::unordered_map< uint32_t, std::string > m_algTypeMap
 Cache of algorithm's type, read from configuration data.
std::set< std::string > m_storeIdentifiers
 Identifiers of object stores, needed to cache STORE string-hash values.
TTree * m_metadataTree
 Used to write out some metadata needed by post-processing (e.g.
std::atomic< size_t > m_fullEventDumps
 Counter to keep track of how many events have been full-dumped.
std::atomic< size_t > m_maxViewsNumber
 What is the maximum number of View instances we've so far cached string hashes to cover?
std::mutex m_addHostnameMutex
 Mutex to update set below.
std::set< std::string > m_hostnames ATLAS_THREAD_SAFE
 Save unique hostnames for the run.
CostROSData m_costROSData
 Cached CostROSData class with details needed for ROS monitoring.
DataObjIDColl m_extendedExtraObjects
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Athena algorithm used to process Trigger cost monitoring data in Run 3 and above.

Outputs histograms.

Algorithm to read relevant trigger cost data from the event store and trigger configuration data from the config service, identify the time Range that the event falls into, and dispatches monitoring to the correct time range. Time ranges, their monitors, and their monitor's counters are all instantiated on-demand.

Definition at line 36 of file TrigCostAnalysis.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrigCostAnalysis()

TrigCostAnalysis::TrigCostAnalysis ( const std::string & name,
ISvcLocator * pSvcLocator )

Construct TrigCostAnalysis.

Parameters
[in]nameAthena algorithm's name.
[in]pSvcLocatorFramework service pointer.

Definition at line 26 of file TrigCostAnalysis.cxx.

26 :
27 AthAlgorithm(name, pSvcLocator),
28 m_metadataTree(nullptr),
31}
AthAlgorithm()
Default constructor:
std::atomic< size_t > m_maxViewsNumber
What is the maximum number of View instances we've so far cached string hashes to cover?
TTree * m_metadataTree
Used to write out some metadata needed by post-processing (e.g.
std::atomic< size_t > m_fullEventDumps
Counter to keep track of how many events have been full-dumped.

◆ ~TrigCostAnalysis()

virtual TrigCostAnalysis::~TrigCostAnalysis ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ bookGetPointer()

TH1 * TrigCostAnalysis::bookGetPointer ( TH1 * hist,
const std::string & tDir = "" ) const

Public method forwarded to this class' AthHistogramAlgorithm::bookGetPointer base.

Parameters
[in]histBare pointer to histogram. Ownership transferred to THistSvc.
[in]tDirHistogram name & directory.
Returns
Cached pointer to histogram. Used to fill histogram without having to perform THishSvc lookup.

Definition at line 171 of file TrigCostAnalysis.cxx.

171 {
172 std::string histName(hist->GetName());
173 std::string bookingString = "/COSTSTREAM/" + tDir + "/" + histName;
174
175 if (!((m_histSvc->regHist(bookingString, hist)).isSuccess())) {
176 ATH_MSG_WARNING( "Problem registering histogram with name " << histName);
177 return nullptr;
178 }
179
180 return hist;
181}
#define ATH_MSG_WARNING(x)
ServiceHandle< ITHistSvc > m_histSvc

◆ checkDoFullEventDump()

bool TrigCostAnalysis::checkDoFullEventDump ( const EventContext & context,
const CostData & costData )
private

Check if event dumping should be performed for the current event.

Parameters
[in]contextEvent context.
[in]costDataWe only dump the master-slot (slot:0) as these events cary payload data for all slots / all threads.
Returns
True, if the event should be dumped.

Definition at line 305 of file TrigCostAnalysis.cxx.

305 {
306 if (costData.isMasterSlot()
308 and context.eventID().event_number() % m_fullEventDumpProbability == 0)
309 {
311 return true;
312 }
313 return false;
314}
bool isMasterSlot() const
Definition CostData.cxx:107
Gaudi::Property< size_t > m_maxFullEventDumps
Gaudi::Property< uint64_t > m_fullEventDumpProbability

◆ checkUpdateMaxView()

StatusCode TrigCostAnalysis::checkUpdateMaxView ( const size_t max)
private

High watermark for pre-cached string hashes for the SLOT category.

Corresponding to SG and View IProxyDict names.

Parameters
[in]maxPre-compute string hashes for View or Slot multiplicities up to this number.

Definition at line 138 of file TrigCostAnalysis.cxx.

138 {
139 if (max <= m_maxViewsNumber) {
140 return StatusCode::SUCCESS;
141 }
142 const size_t current = m_maxViewsNumber;
144 ATH_MSG_DEBUG("Extending maximum View instances from " << current << " to " << max);
145 for (size_t viewID = current; viewID <= m_maxViewsNumber; ++ viewID) {
146 // Allow for this many individual View instances
147 for (const std::string& store : m_storeIdentifiers) {
148 std::stringstream ss;
149 ss << store << "_view_" << viewID;
150 TrigConf::HLTUtils::string2hash(ss.str(), "STORE");
151 }
152 // And this many global Slots. Though, in general, it will be the Views which are driving this.
153 std::stringstream ss;
154 ss << viewID << "_StoreGateSvc_Impl";
155 TrigConf::HLTUtils::string2hash(ss.str(), "STORE");
156 }
157 return StatusCode::SUCCESS;
158}
#define ATH_MSG_DEBUG(x)
static Double_t ss
#define max(a, b)
Definition cfImp.cxx:41
static HLTHash string2hash(const std::string &, const std::string &category="TE")
hash function translating TE names into identifiers
std::set< std::string > m_storeIdentifiers
Identifiers of object stores, needed to cache STORE string-hash values.
TestStore store
Definition TestStore.cxx:23

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ dumpEvent()

StatusCode TrigCostAnalysis::dumpEvent ( const EventContext & context) const
private

Dump event algorithm execution data in ASCII format.

Parameters
[in]contextEvent context.

Definition at line 422 of file TrigCostAnalysis.cxx.

422 {
424 SG::ReadHandle<xAOD::TrigCompositeContainer> costDataHandle(m_costDataKey, context);
425
426 std::stringstream ss;
427 size_t algID = 0;
428
429 for ( const xAOD::TrigComposite* tc : *costDataHandle ) {
430 const uint64_t start = tc->getDetail<uint64_t>("start"); // in mus
431 const uint64_t stop = tc->getDetail<uint64_t>("stop"); // in mus
432 const uint32_t slot = tc->getDetail<uint32_t>("slot");
433 const uint64_t start_ms_round = std::llround( start * 1e-3 ); // in ms
434 const uint64_t stop_ms_round = std::llround( stop * 1e-3 ); // in ms
435 const uint32_t threadID = tc->getDetail<uint32_t>("thread");
436
437 ss << "{id:" << algID++;
438 ss << ", group:" << threadID;
439 ss << ", className:'slot" << slot << "'";
440 ss << ", content:'" << TrigConf::HLTUtils::hash2string( tc->getDetail<TrigConf::HLTHash>("alg"), "ALG");
441 ss << "<br>" << TrigConf::HLTUtils::hash2string( tc->getDetail<TrigConf::HLTHash>("store"), "STORE") << "'";
442 ss << ", duration:" << (stop - start); // For tooltip display: in mus
443 ss << ", start:" << start_ms_round; // in ms
444 if (stop_ms_round > start_ms_round) {
445 ss << ", end:" << stop_ms_round;
446 } else {
447 ss << ", type:'point'";
448 }
449 ss << "}," << std::endl;
450 }
451
452 ATH_MSG_DEBUG("Full Event Summary for event " << context.eventID().event_number());
453 ATH_MSG_DEBUG(ss.str());
454 // TODO Persist this
455
456 return StatusCode::SUCCESS;
457}
static Double_t tc
static const std::string hash2string(HLTHash, const std::string &category="TE")
hash function translating identifiers into names (via internal dictionary)
virtual StatusCode start()
Retrieve menu handle.
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_costDataKey
TrigComposite_v1 TrigComposite
Declare the latest version of the class.
setEventNumber uint32_t

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TrigCostAnalysis::execute ( )
finalvirtual

Monitor event, unless max range limit reached and event outside of all ranges.

Definition at line 184 of file TrigCostAnalysis.cxx.

184 {
185 const EventContext& context = Gaudi::Hive::currentContext();
186
187 MonitoredRange* range = nullptr;
188 ATH_CHECK(getRange(context, range));
189
190 if (!range) {
191
192 ATH_MSG_DEBUG("Not monitoring event");
193 return StatusCode::SUCCESS;
194
195 }
196
197 ATH_MSG_DEBUG("Monitoring event " << context.eventID().event_number() << " in LB " << context.eventID().lumi_block() << " in range " << range->getName());
198
199 SG::ReadHandle<xAOD::TrigCompositeContainer> costDataHandle(m_costDataKey, context);
200 ATH_CHECK( costDataHandle.isValid() );
201
202 SG::ReadHandle<xAOD::TrigCompositeContainer> rosDataHandle(m_rosDataKey, context);
203 ATH_CHECK( rosDataHandle.isValid() );
204
205
206 if (!m_metadataDataKey.empty()){
207 SG::ReadHandle<xAOD::TrigCompositeContainer> metadataDataHandle(m_metadataDataKey, context);
208 if (metadataDataHandle.isValid()){
209 for (const xAOD::TrigComposite* tc : *metadataDataHandle) {
210 try {
211 std::lock_guard<std::mutex> lock(m_addHostnameMutex);
212 m_hostnames.insert(tc->getDetail<std::string>("hostname"));
213 } catch ( const std::exception& ) {
214 ATH_MSG_WARNING("Missing HLT_RuntimeMetadata EDM hostname for event " << context.eventID().event_number());
215 }
216
217 }
218 }
219 else {
220 ATH_MSG_DEBUG("Not valid HLT_RuntimeMetadata handle for the event " << context.eventID().event_number());
221 }
222 }
223
224 // Save indexes of algorithm in costDataHandle
225 std::map<std::string, std::set<size_t>> chainToAlgIdx;
226 std::map<std::string, std::set<size_t>> chainToUniqAlgs; // List for unique algorithms for each chain
227 std::map<std::string, std::map<int16_t, std::set<size_t>>> seqToAlgIdx; // Map of algorithms split in views
228 std::map<std::string, std::set<std::string>> algToChain;
229 m_algToChainTool->cacheSGKeys(context);
230 ATH_CHECK( m_algToChainTool->getChainsForAllAlgs(context, algToChain) );
231
232 // Retrieve active sequences and algorithms
233 std::map<std::string, std::string> algToSeq;
234 ATH_CHECK(m_algToChainTool->getAllActiveSequences(context, algToSeq));
235
236 for (const xAOD::TrigComposite* tc : *costDataHandle) {
237 const uint32_t nameHash = tc->getDetail<TrigConf::HLTHash>("alg");
238 const std::string algName = TrigConf::HLTUtils::hash2string(nameHash, "ALG");
239
240 size_t i = 0;
241 if(m_excludeAlgsFromChain.find(algName) != m_excludeAlgsFromChain.end()) continue;
242
243 for (const std::string& chain : algToChain[algName]){
244 chainToAlgIdx[chain].insert(tc->index());
245 ++i;
246 }
247
248 if (i == 1){
249 ATH_MSG_DEBUG("Algorithm " << algName << " executed uniquely for " << *algToChain[algName].begin() << " chain");
250 chainToUniqAlgs[*algToChain[algName].begin()].insert(tc->index());
251 }
252
253 if (algToSeq.count(algName)){
254 const int16_t view = tc->getDetail<int16_t>("view");
255 seqToAlgIdx[algToSeq[algName]][view].insert(tc->index());
256 }
257 }
258
259 const std::set<TrigCompositeUtils::DecisionID> seededChains = m_algToChainTool->retrieveActiveChains(context, "HLTNav_L1");
260 std::vector<TrigCompositeUtils::AlgToChainTool::ChainInfo> seededChainsInfo;
261
262 // Skip empty events, where only cost chain was active
263 bool skipMonitoringThisEvent = false;
264 if ((seededChains.size() == 1 && seededChains.count(TrigConf::HLTUtils::string2hash("HLT_noalg_CostMonDS_L1All")))
265 || (seededChains.size() == 2 && seededChains.count(TrigConf::HLTUtils::string2hash("HLT_noalg_CostMonDS_L1All")) && seededChains.count(TrigConf::HLTUtils::string2hash("HLT_noalg_L1All"))) ){
266 skipMonitoringThisEvent = true;
267 }
268
269 for (auto id : seededChains){
270 TrigCompositeUtils::AlgToChainTool::ChainInfo chainInfo;
271 ATH_CHECK(m_algToChainTool->getChainInfo(context, id, chainInfo));
272 seededChainsInfo.push_back(std::move(chainInfo));
273 }
274
275 const uint32_t onlineSlot = getOnlineSlot( costDataHandle.get() );
276 CostData costData;
277 ATH_CHECK( costData.set(costDataHandle.get(), rosDataHandle.get(), onlineSlot) );
279 costData.setChainToAlgMap(chainToAlgIdx);
280 costData.setChainToUniqAlgMap(chainToUniqAlgs);
281 costData.setSequencersMap(seqToAlgIdx);
282 costData.setSeededChains(seededChainsInfo);
283 costData.setLb( context.eventID().lumi_block() );
284 costData.setTypeMap( m_algTypeMap );
285 if (!m_enhancedBiasTool.name().empty() && !m_enhancedBiasTool->isMC()) {
286 double liveTime = m_enhancedBiasTool->getEBLiveTime(context);
287 bool liveTimeIsPerEvent = true;
288 if (liveTime == 0.0) { // Note: This comes from a direct "return 0.", hence no delta
289 liveTime = m_enhancedBiasTool->getLBLength(context);
290 liveTimeIsPerEvent = false;
291 }
292 costData.setLivetime( liveTime, liveTimeIsPerEvent );
293 }
294
295 ATH_CHECK( range->newEvent( costData, getWeight(context), skipMonitoringThisEvent ) );
296
297 if (checkDoFullEventDump(context, costData)) {
298 ATH_CHECK( dumpEvent(context) );
299 }
300
301 return StatusCode::SUCCESS;
302}
#define ATH_CHECK
Evaluate an expression and check for errors.
void setLb(uint32_t lb)
Setter of effective P1 walltime represented by the current event.
Definition CostData.cxx:53
void setSequencersMap(const std::map< std::string, std::map< int16_t, std::set< size_t > > > &seqToAlg)
Set the sequence to alg idx map.
Definition CostData.cxx:142
void setCostROSData(const CostROSData &costROSData)
Set ROS to ROB map.
Definition CostData.cxx:49
void setTypeMap(const std::unordered_map< uint32_t, std::string > &typeMap)
Set internal type map pointer.
Definition CostData.cxx:130
void setChainToAlgMap(const std::map< std::string, std::set< size_t > > &algToChains)
Set the alg name to chains map.
Definition CostData.cxx:134
void setSeededChains(const std::vector< TrigCompositeUtils::AlgToChainTool::ChainInfo > &seededChains)
Set the seeded chains set.
Definition CostData.cxx:163
void setLivetime(float time, bool liveTimeIsPerEvent)
Setter of effective P1 walltime represented by the current event, or the current lumi block.
Definition CostData.cxx:61
void setChainToUniqAlgMap(const std::map< std::string, std::set< size_t > > &algToChains)
Set the chain to its unique alg names map.
Definition CostData.cxx:138
StatusCode set(const xAOD::TrigCompositeContainer *costCollection, const xAOD::TrigCompositeContainer *rosCollection, uint32_t onlineSlot)
Cache the cost and ros collections, after formally requesting it from storegate.
Definition CostData.cxx:20
uint32_t getOnlineSlot(const xAOD::TrigCompositeContainer *costCollection) const
Return the slot used to process the event online.
Gaudi::Property< std::set< std::string > > m_excludeAlgsFromChain
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_metadataDataKey
ToolHandle< IEnhancedBiasWeighter > m_enhancedBiasTool
std::mutex m_addHostnameMutex
Mutex to update set below.
StatusCode getRange(const EventContext &context, MonitoredRange *&range)
Return or construct and return a Range for the Context.
std::unordered_map< uint32_t, std::string > m_algTypeMap
Cache of algorithm's type, read from configuration data.
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_rosDataKey
CostROSData m_costROSData
Cached CostROSData class with details needed for ROS monitoring.
ToolHandle< TrigCompositeUtils::AlgToChainTool > m_algToChainTool
StatusCode dumpEvent(const EventContext &context) const
Dump event algorithm execution data in ASCII format.
float getWeight(const EventContext &context)
Compute global event weight to correct for online prescales.
bool checkDoFullEventDump(const EventContext &context, const CostData &costData)
Check if event dumping should be performed for the current event.
const std::string & algName(ID id)
Converts a JetAlgorithmType::ID into a string.
setScaleOne setStatusOne setSaturated int16_t

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

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.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode TrigCostAnalysis::finalize ( )
finalvirtual

Currently a noop for this algorithm.

Definition at line 460 of file TrigCostAnalysis.cxx.

460 {
461 ATH_MSG_VERBOSE("In finalize()");
462
464 return StatusCode::SUCCESS;
465}
#define ATH_MSG_VERBOSE(x)
void writeMetadata()
Write to outpute tree (if any) the metadata needed downstream.

◆ getOnlineSlot()

uint32_t TrigCostAnalysis::getOnlineSlot ( const xAOD::TrigCompositeContainer * costCollection) const
private

Return the slot used to process the event online.

Parameters
[in]costCollectionCost data.
Returns
Oneline slot number..

Definition at line 402 of file TrigCostAnalysis.cxx.

402 {
403 // Online, Slot 0 can be configured as the master-slot. In this mode, events in Slot 0
404 // hoover up data about algorithm executions in other slots too.
405 // This all-slots data stored in the master slot is exploited by dumpEvent, and some specialist monitors.
406 // Other monitors will want to avoid it for fear of double-counting
407 if (costCollection->size() == 0) {
408 return 0;
409 }
410 const uint32_t initialSlot = costCollection->at(0)->getDetail<uint32_t>("slot");
411 for ( const xAOD::TrigComposite* tc : *costCollection ) {
412 const uint32_t algSlot = tc->getDetail<uint32_t>("slot");
413 if (algSlot == 0 or algSlot != initialSlot) {
414 return 0; // If we see a zero, or two different slot numbers, then we're in the master slot
415 }
416 }
417 // If we saw exclusivly one non-zero slot, then we're in that slot
418 return initialSlot;
419}
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.

◆ getRange()

StatusCode TrigCostAnalysis::getRange ( const EventContext & context,
MonitoredRange *& range )
private

Return or construct and return a Range for the Context.

Might return nullptr range.

Parameters
[in]contextEvent context.
[out]rangeReference to a mutable range ptr. Will be set to point to the Range. If range does not exist it will be created unless the maximum number of ranges has been reached. If this happens, range will be set to nullptr.

Definition at line 362 of file TrigCostAnalysis.cxx.

362 {
363 std::string rangeName;
364 range = nullptr;
365 constexpr bool includeEndOfLB = false;
366
367 if (m_singleTimeRange) {
368 rangeName = m_singleTimeRangeName;
369 } else {
370 const EventIDBase::number_type lumiBlock = context.eventID().lumi_block();
371 const size_t lumiBlockRangeStart = lumiBlock - (lumiBlock % m_TimeRangeLengthLB);
372 const size_t lumiBlockRangeStop = lumiBlockRangeStart + m_TimeRangeLengthLB - 1;
373 std::stringstream ss;
374 ss << "LumiBlock_" << std::setfill('0') << std::setw(5) << lumiBlockRangeStart;
375 if (includeEndOfLB && lumiBlockRangeStop != lumiBlockRangeStart) {
376 ss << "_" << lumiBlockRangeStop;
377 }
378 rangeName = ss.str();
379 }
380
381 std::unordered_map<std::string, std::unique_ptr<MonitoredRange>>::iterator it;
382 it = m_monitoredRanges.find(rangeName);
383
384 // If we don't have a MonitoredRange with this name, try and make one.
385 if (it == m_monitoredRanges.end()) {
386 if (m_monitoredRanges.size() < m_maxTimeRange) {
387 auto result = m_monitoredRanges.insert(
388 std::make_pair(rangeName, std::make_unique<MonitoredRange>(rangeName, this))
389 );
390 it = result.first; // Returns pair. First: map iterator. Second: insertion boolean
391 ATH_CHECK(registerMonitors( it->second.get() ));
392 } else {
393 range = nullptr; // Not monitoring any more ranges
394 return StatusCode::SUCCESS;
395 }
396 }
397
398 range = it->second.get(); // Pointer to MonitoredRange
399 return StatusCode::SUCCESS;
400}
std::unordered_map< std::string, std::unique_ptr< MonitoredRange > > m_monitoredRanges
Owned storage of Ranges.
Gaudi::Property< bool > m_singleTimeRange
Gaudi::Property< size_t > m_maxTimeRange
StatusCode registerMonitors(MonitoredRange *range)
Populate a newly minted Range object with all configured Monitors.
Gaudi::Property< size_t > m_TimeRangeLengthLB
Gaudi::Property< std::string > m_singleTimeRangeName
setTeId lumiBlock

◆ getWeight()

float TrigCostAnalysis::getWeight ( const EventContext & context)
private

Compute global event weight to correct for online prescales.

Parameters
[in]contextEvent context.
Returns
Global event weight.

Definition at line 160 of file TrigCostAnalysis.cxx.

160 {
161 // TODO Prescale of CostMon chain for P1
162 double ebWeight = 1.0;
163 if (m_useEBWeights) {
164 ebWeight = m_enhancedBiasTool->getEBWeight(context);
165 ATH_MSG_DEBUG("EB Weight is " << ebWeight);
166 }
167 return m_baseEventWeight * ebWeight;
168}
Gaudi::Property< bool > m_useEBWeights
Gaudi::Property< float > m_baseEventWeight

◆ initialize()

StatusCode TrigCostAnalysis::initialize ( )
finalvirtual

Retrieve tools and initialise read handles.

Definition at line 34 of file TrigCostAnalysis.cxx.

34 {
35 ATH_MSG_VERBOSE("In initialize()");
36
37 ATH_MSG_DEBUG("Reading from " << m_costDataKey.key() << ", " << m_HLTMenuKey.key());
38 ATH_CHECK( m_costDataKey.initialize() );
39 ATH_CHECK( m_rosDataKey.initialize() );
40 ATH_CHECK( m_HLTMenuKey.initialize() );
41
43
44
45 if (!m_enhancedBiasTool.name().empty()) {
46 ATH_CHECK( m_enhancedBiasTool.retrieve() );
47 } else {
48 ATH_MSG_DEBUG("No EnhancedBiasTool. Not doing additional weighting.");
49 if (m_useEBWeights) {
50 ATH_MSG_FATAL("Configured to use Enhanced Bias weights. Must supply weighting tool.");
51 return StatusCode::FAILURE;
52 }
53 }
54
56
57 if (not m_additionalHashMap.empty()) {
58 std::string hashFile = PathResolverFindCalibFile( m_additionalHashMap );
59 if (hashFile.empty()) {
60 ATH_MSG_WARNING("Could not retrieve " << m_additionalHashMap << ", won't load additional hash maps.");
61 } else {
63 }
64 }
65
66 m_costROSData.initialize(m_rosToRob);
67
68 ATH_CHECK( m_histSvc->regTree("/COSTSTREAM/metadata", std::make_unique<TTree>("metadata", "metadata")) );
69 ATH_CHECK( m_histSvc->getTree("/COSTSTREAM/metadata", m_metadataTree) );
70
71 return StatusCode::SUCCESS;
72}
#define ATH_MSG_FATAL(x)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
static void file2hashes(const std::string &fileName="hashes2string.txt")
debugging output of internal dictionary
Gaudi::Property< std::string > m_additionalHashMap
Gaudi::Property< std::map< std::string, std::vector< uint32_t > > > m_rosToRob
SG::ReadHandleKey< TrigConf::HLTMenu > m_HLTMenuKey

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ msg()

MsgStream & AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

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.

◆ registerMonitors()

StatusCode TrigCostAnalysis::registerMonitors ( MonitoredRange * range)
private

Populate a newly minted Range object with all configured Monitors.

Parameters
[in]rangeMutable ptr to new Range object which is to be populated.

Definition at line 317 of file TrigCostAnalysis.cxx.

317 {
318 ATH_CHECK(range != nullptr);
320 ATH_CHECK( range->addMonitor(std::make_unique<MonitorAlgorithm>("Algorithm_HLT", range)) );
321 ATH_MSG_DEBUG("Registering Algorithm_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size());
322 }
324 ATH_CHECK( range->addMonitor(std::make_unique<MonitorAlgorithmClass>("Algorithm_Class_HLT", range)) );
325 ATH_MSG_DEBUG("Registering Algorithm_Class_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size());
326 }
327 if (m_doMonitorGlobal) {
328 ATH_CHECK( range->addMonitor(std::make_unique<MonitorGlobal>("Global_HLT", range)) );
329 ATH_MSG_DEBUG("Registering Global_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size());
330 }
332 ATH_CHECK( range->addMonitor(std::make_unique<MonitorThreadOccupancy>("Thread_Occupancy_HLT", range)) );
333 ATH_MSG_DEBUG("Registering Thread_Occupancy_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size());
334 }
335 if (m_doMonitorROS) {
336 ATH_CHECK( range->addMonitor(std::make_unique<MonitorROS>("ROS_HLT", range)) );
337 ATH_MSG_DEBUG("Registering ROS_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size());
338 }
339 if (m_doMonitorChain) {
340 ATH_CHECK( range->addMonitor(std::make_unique<MonitorChain>("Chain_HLT", range)) );
341 ATH_MSG_DEBUG("Registering Chain_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size());
342 }
344 ATH_CHECK( range->addMonitor(std::make_unique<MonitorChainAlgorithm>("Chain_Algorithm_HLT", range)) );
345 ATH_MSG_DEBUG("Registering Chain_Algorihtm_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size());
346 }
348 ATH_CHECK( range->addMonitor(std::make_unique<MonitorSequence>("Sequence_HLT", range)) );
349 ATH_MSG_DEBUG("Registering Sequence_HLT Monitor for range " << range->getName() << ". Size:" << range->getMonitors().size());
350 }
351 // if (m_do...) {}
352
353 // Set the verbosity for the monitors
354 for (const std::unique_ptr<MonitorBase>& monitor : range->getMonitors()){
355 monitor->msg().setLevel(msg().level());
356 }
357
358 return StatusCode::SUCCESS;
359}
MsgStream & msg() const
Gaudi::Property< bool > m_doMonitorAlgorithm
Gaudi::Property< bool > m_doMonitorChainAlgorithm
Gaudi::Property< bool > m_doMonitorROS
Gaudi::Property< bool > m_doMonitorSequence
Gaudi::Property< bool > m_doMonitorThreadOccupancy
Gaudi::Property< bool > m_doMonitorGlobal
Gaudi::Property< bool > m_doMonitorChain
Gaudi::Property< bool > m_doMonitorAlgorithmClass

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ start()

StatusCode TrigCostAnalysis::start ( )
virtual

Retrieve menu handle.

Definition at line 74 of file TrigCostAnalysis.cxx.

74 {
75 SG::ReadHandle<TrigConf::HLTMenu> hltMenuHandle = SG::makeHandle( m_HLTMenuKey );
76 ATH_CHECK( hltMenuHandle.isValid() );
77 ATH_MSG_INFO("Configuring from " << m_HLTMenuKey << " with " << hltMenuHandle->size() << " chains");
78 using boost::property_tree::ptree;
79
80 // Populate the reverse-hashing dictionary with all ALG NAMES.
81 // Obtain a mapping from NAME to TYPE from the configuration JSON
82 m_storeIdentifiers.clear();
83 const ptree& menuData = hltMenuHandle->data();
84 for (const auto& sequencer : menuData.get_child("sequencers")) {
85 ATH_MSG_VERBOSE("Found Sequencer:" << sequencer.first);
86 for (const auto& alg : sequencer.second) {
87 // Data stored in Gaudi format of "AlgClassType/AlgInstanceName"
88 size_t breakPoint = alg.second.data().find('/');
89 std::string algType = alg.second.data().substr(0, breakPoint);
90 std::string algName = alg.second.data().substr(breakPoint+1, alg.second.data().size());
91 std::replace(algType.begin(), algType.end(), ':', '_');
92 std::replace(algName.begin(), algName.end(), ':', '_');
93 m_algTypeMap[ TrigConf::HLTUtils::string2hash(algName, "ALG") ] = algType;
94 ATH_MSG_VERBOSE("AlgType:" << algType << ", AlgName:" << algName );
95 if (algType.find("EventViewCreatorAlgorithm") != std::string::npos) {
96 ATH_MSG_VERBOSE(algType << " is identified as a ViewCreator");
97 m_storeIdentifiers.insert(std::move(algName));
98 }
99 }
100 }
101
102 // Call TrigConf::HLTUtils::string2hash(chain.name()) for all the chains to cache the hash to name mapping
103 std::vector<TrigConf::Chain> chains;
104 ATH_CHECK( m_algToChainTool->getAllChains(chains));
105 for (const TrigConf::Chain& chain : chains) {
106 HLT::Identifier(chain.name());
108
109 // Populate legs' names
110 const size_t legsSize {chain.legMultiplicities().size()};
111 for (size_t counter = 0; legsSize > 1 && counter < legsSize; ++counter){
112 HLT::Identifier l = TrigCompositeUtils::createLegName(chain.namehash(), counter);
114 }
115 }
116
117 // Save identifiers and classes for additional HLTJobOptions map
118 if (not m_additionalHashList.empty()){
119 for (const std::string& entry : m_additionalHashList){
120 size_t breakPoint = entry.find('/');
121 if (breakPoint != std::string::npos){
122 std::string algType = entry.substr(0, breakPoint);
123 const std::string algName = entry.substr(breakPoint+1, entry.size());
124 std::replace(algType.begin(), algType.end(), ':', '_');
125 m_algTypeMap[ TrigConf::HLTUtils::string2hash(algName, "ALG") ] = std::move(algType);
126 } else {
128 }
129 }
130 }
131
132 // As an initial guess, 25 should be a good uper maximum for the number of expected View instances.
134 return StatusCode::SUCCESS;
135}
#define ATH_MSG_INFO(x)
boost::property_tree::ptree ptree
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Gaudi::Property< std::vector< std::string > > m_additionalHashList
StatusCode checkUpdateMaxView(const size_t max)
High watermark for pre-cached string hashes for the SLOT category.
l
Printing final latex table to .tex output file.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
HLT::Identifier createLegName(const HLT::Identifier &chainIdentifier, size_t counter)
Generate the HLT::Identifier which corresponds to a specific leg of a given chain.

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
#define ATH_MSG_ERROR(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

◆ writeMetadata()

void TrigCostAnalysis::writeMetadata ( )
private

Write to outpute tree (if any) the metadata needed downstream.

Definition at line 468 of file TrigCostAnalysis.cxx.

468 {
469 if (!m_metadataTree) {
470 return;
471 }
472
473 auto runNumber = m_enhancedBiasTool->getRunNumber();
474 m_metadataTree->Branch("runNumber", &runNumber);
475
476 std::string hostnamesList = "";
477 if (m_hostnames.size() > 1){
478 ATH_MSG_DEBUG("Found many hostnames for this run");
479 for (const auto& name : m_hostnames) hostnamesList += name + ",";
480 hostnamesList.pop_back();
481 } else if (m_hostnames.size() == 1) {
482 hostnamesList = *m_hostnames.begin();
483 }
484 m_metadataTree->Branch("hostname", &hostnamesList);
485
486 SG::ReadHandle<TrigConf::HLTMenu> hltMenuHandle = SG::makeHandle( m_HLTMenuKey );
487 std::string menuStr;
488 if ( hltMenuHandle.isValid() ){
489 std::stringstream ss;
490 boost::property_tree::json_parser::write_json(ss, hltMenuHandle->data());
491 menuStr = ss.str();
492 m_metadataTree->Branch("HLTMenu", &menuStr);
493 }
494
495 bool ChainMonitor = m_doMonitorChain;
496 bool ChainAlgorithmMonitor = m_doMonitorChainAlgorithm;
497 bool AlgorithmMonitor = m_doMonitorAlgorithm;
498 bool AlgorithmClassMonitor = m_doMonitorAlgorithmClass;
499 bool ROSMonitor = m_doMonitorROS;
500 bool GlobalsMonitor = m_doMonitorGlobal;
501 bool ThreadMonitor = m_doMonitorThreadOccupancy;
502
503 m_metadataTree->Branch("ChainMonitor", &ChainMonitor);
504 m_metadataTree->Branch("ChainAlgorithmMonitor", &ChainAlgorithmMonitor);
505 m_metadataTree->Branch("AlgorithmMonitor", &AlgorithmMonitor);
506 m_metadataTree->Branch("AlgorithmClassMonitor", &AlgorithmClassMonitor);
507 m_metadataTree->Branch("ROSMonitor", &ROSMonitor);
508 m_metadataTree->Branch("GlobalsMonitor", &GlobalsMonitor);
509 m_metadataTree->Branch("ThreadMonitor", &ThreadMonitor);
510
511 float BaseEventWeight = m_baseEventWeight;
512 std::string AdditionalHashMap = m_additionalHashMap;
513 bool DoEBWeighting = m_useEBWeights;
514
515 m_metadataTree->Branch("AdditionalHashMap", &AdditionalHashMap);
516 m_metadataTree->Branch("DoEBWeighting", &DoEBWeighting);
517 m_metadataTree->Branch("BaseEventWeight", &BaseEventWeight);
518
519 std::string atlasProject = std::getenv("AtlasProject");
520 std::string atlasVersion = std::getenv("AtlasVersion");
521 m_metadataTree->Branch("AtlasProject", &atlasProject);
522 m_metadataTree->Branch("AtlasVersion", &atlasVersion);
523
524
525 std::string processedRanges;
527 processedRanges = m_singleTimeRangeName;
528 }
529 else {
530 std::stringstream ss;
531 for(const auto& rangePair : m_monitoredRanges){
532 ss << rangePair.first << ": ";
533 std::string lbrange = rangePair.first.substr(strlen("LumiBlock_"));
534 ss << " Lumiblocks " << std::stoi(lbrange) << " to " << std::stoi(lbrange) + m_TimeRangeLengthLB << ", ";
535 }
536 processedRanges = ss.str();
537 ATH_MSG_INFO("Processed ranges: " << processedRanges);
538 }
539
540 m_metadataTree->Branch("ProcessedRanges", &processedRanges);
541
542 m_metadataTree->Fill();
543}

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::set<std::string> m_hostnames TrigCostAnalysis::ATLAS_THREAD_SAFE
mutableprivate

Save unique hostnames for the run.

Definition at line 223 of file TrigCostAnalysis.h.

◆ m_addHostnameMutex

std::mutex TrigCostAnalysis::m_addHostnameMutex
private

Mutex to update set below.

Definition at line 222 of file TrigCostAnalysis.h.

◆ m_additionalHashList

Gaudi::Property<std::vector<std::string> > TrigCostAnalysis::m_additionalHashList
Initial value:
{ this, "AdditionalHashList", {},
"Used to load strings corresponding to algorithms which are not explicitly scheduled by chains." }

Definition at line 90 of file TrigCostAnalysis.h.

90 { this, "AdditionalHashList", {},
91 "Used to load strings corresponding to algorithms which are not explicitly scheduled by chains." };

◆ m_additionalHashMap

Gaudi::Property<std::string> TrigCostAnalysis::m_additionalHashMap
Initial value:
{ this, "AdditionalHashMap", "TrigCostRootAnalysis/hashes2string_29042021.txt",
"Used to load strings corresponding to algorithms which are not explicitly scheduled by chains. To be updated periodically." }

Definition at line 87 of file TrigCostAnalysis.h.

87 { 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." };

◆ m_algToChainTool

ToolHandle<TrigCompositeUtils::AlgToChainTool> TrigCostAnalysis::m_algToChainTool
Initial value:
{this, "AlgToChainTool", "",
"Tool to retrieve chains for algorithm."}

Definition at line 156 of file TrigCostAnalysis.h.

156 {this, "AlgToChainTool", "",
157 "Tool to retrieve chains for algorithm."};

◆ m_algTypeMap

std::unordered_map<uint32_t, std::string > TrigCostAnalysis::m_algTypeMap
private

Cache of algorithm's type, read from configuration data.

Definition at line 216 of file TrigCostAnalysis.h.

◆ m_baseEventWeight

Gaudi::Property<float> TrigCostAnalysis::m_baseEventWeight
Initial value:
{ this, "BaseEventWeight", true,
"Base events weight, other weights may be multiplied on top of this one." }

Definition at line 132 of file TrigCostAnalysis.h.

132 { this, "BaseEventWeight", true,
133 "Base events weight, other weights may be multiplied on top of this one." };

◆ m_costDataKey

SG::ReadHandleKey<xAOD::TrigCompositeContainer> TrigCostAnalysis::m_costDataKey
Initial value:
{ this, "CostReadHandleKey", "HLT_TrigCostContainer",
"Trigger cost payload container for algorithms" }

Definition at line 141 of file TrigCostAnalysis.h.

141 { this, "CostReadHandleKey", "HLT_TrigCostContainer",
142 "Trigger cost payload container for algorithms" };

◆ m_costROSData

CostROSData TrigCostAnalysis::m_costROSData
private

Cached CostROSData class with details needed for ROS monitoring.

Definition at line 225 of file TrigCostAnalysis.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doMonitorAlgorithm

Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorAlgorithm
Initial value:
{ this, "DoMonitorAlgs", true,
"Monitor individual algorithms by instance name" }

Definition at line 99 of file TrigCostAnalysis.h.

99 { this, "DoMonitorAlgs", true,
100 "Monitor individual algorithms by instance name" };

◆ m_doMonitorAlgorithmClass

Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorAlgorithmClass
Initial value:
{ this, "DoMonitorAlgClass", true,
"Monitor individual algorithms by instance class type name" }

Definition at line 102 of file TrigCostAnalysis.h.

102 { this, "DoMonitorAlgClass", true,
103 "Monitor individual algorithms by instance class type name" };

◆ m_doMonitorChain

Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorChain
Initial value:
{ this, "DoMonitorChain", true,
"Monitor individual chains by instance name" }

Definition at line 114 of file TrigCostAnalysis.h.

114 { this, "DoMonitorChain", true,
115 "Monitor individual chains by instance name" };

◆ m_doMonitorChainAlgorithm

Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorChainAlgorithm
Initial value:
{ this, "DoMonitorChainAlgorithm", false,
"Monitor algorithms associated with chains by instance name" }

Definition at line 117 of file TrigCostAnalysis.h.

117 { this, "DoMonitorChainAlgorithm", false,
118 "Monitor algorithms associated with chains by instance name" };

◆ m_doMonitorGlobal

Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorGlobal
Initial value:
{ this, "DoMonitorGlobal", true,
"Monitor global event properties" }

Definition at line 105 of file TrigCostAnalysis.h.

105 { this, "DoMonitorGlobal", true,
106 "Monitor global event properties" };

◆ m_doMonitorROS

Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorROS
Initial value:
{ this, "DoMonitorROS", true,
"Monitor Read-Out System" }

Definition at line 111 of file TrigCostAnalysis.h.

111 { this, "DoMonitorROS", true,
112 "Monitor Read-Out System" };

◆ m_doMonitorSequence

Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorSequence
Initial value:
{ this, "DoMonitorSequence", true,
"Monitor individual sequences by name" }

Definition at line 120 of file TrigCostAnalysis.h.

120 { this, "DoMonitorSequence", true,
121 "Monitor individual sequences by name" };

◆ m_doMonitorThreadOccupancy

Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorThreadOccupancy
Initial value:
{ this, "DoMonitorThreadOccupancy", true,
"Monitor algorithm occupancy load of individual threads in an MT execution environment" }

Definition at line 108 of file TrigCostAnalysis.h.

108 { this, "DoMonitorThreadOccupancy", true,
109 "Monitor algorithm occupancy load of individual threads in an MT execution environment" };

◆ m_enhancedBiasTool

ToolHandle<IEnhancedBiasWeighter> TrigCostAnalysis::m_enhancedBiasTool
Initial value:
{this, "EnhancedBiasTool", "",
"Enhanced bias weighting tool."}

Definition at line 153 of file TrigCostAnalysis.h.

153 {this, "EnhancedBiasTool", "",
154 "Enhanced bias weighting tool."};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_excludeAlgsFromChain

Gaudi::Property<std::set<std::string> > TrigCostAnalysis::m_excludeAlgsFromChain
Initial value:
{
this, "ExcludeAlgsFromChainTime", {}, "Algorithms to exclude from chain time calculation"}

Definition at line 138 of file TrigCostAnalysis.h.

138 {
139 this, "ExcludeAlgsFromChainTime", {}, "Algorithms to exclude from chain time calculation"};

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_fullEventDumpProbability

Gaudi::Property<uint64_t> TrigCostAnalysis::m_fullEventDumpProbability
Initial value:
{ this, "FullEventDumpProbability", 10,
"Save a full record of one in every N events, up to MaxFullEventDumps." }

Definition at line 129 of file TrigCostAnalysis.h.

129 { this, "FullEventDumpProbability", 10,
130 "Save a full record of one in every N events, up to MaxFullEventDumps." };

◆ m_fullEventDumps

std::atomic<size_t> TrigCostAnalysis::m_fullEventDumps
mutableprivate

Counter to keep track of how many events have been full-dumped.

Definition at line 220 of file TrigCostAnalysis.h.

◆ m_histSvc

ServiceHandle<ITHistSvc> TrigCostAnalysis::m_histSvc { this, "THistSvc", "THistSvc/THistSvc", "Histogramming svc" }

Definition at line 79 of file TrigCostAnalysis.h.

79{ this, "THistSvc", "THistSvc/THistSvc", "Histogramming svc" };

◆ m_HLTMenuKey

SG::ReadHandleKey<TrigConf::HLTMenu> TrigCostAnalysis::m_HLTMenuKey
Initial value:
{this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu",
"HLT Menu"}

Definition at line 150 of file TrigCostAnalysis.h.

150 {this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu",
151 "HLT Menu"};

◆ m_maxFullEventDumps

Gaudi::Property<size_t> TrigCostAnalysis::m_maxFullEventDumps
Initial value:
{ this, "MaxFullEventDumps", 10,
"Maximum number of full event summaries which will be dumped" }

Definition at line 126 of file TrigCostAnalysis.h.

126 { this, "MaxFullEventDumps", 10,
127 "Maximum number of full event summaries which will be dumped" };

◆ m_maxTimeRange

Gaudi::Property<size_t> TrigCostAnalysis::m_maxTimeRange
Initial value:
{ this, "MaxTimeRanges", 5,
"Maximum number of allowed time ranges" }

Definition at line 96 of file TrigCostAnalysis.h.

96 { this, "MaxTimeRanges", 5,
97 "Maximum number of allowed time ranges" };

◆ m_maxViewsNumber

std::atomic<size_t> TrigCostAnalysis::m_maxViewsNumber
mutableprivate

What is the maximum number of View instances we've so far cached string hashes to cover?

Definition at line 221 of file TrigCostAnalysis.h.

◆ m_metadataDataKey

SG::ReadHandleKey<xAOD::TrigCompositeContainer> TrigCostAnalysis::m_metadataDataKey
Initial value:
{ this, "CostMetadataWriteHandleKey", "HLT_RuntimeMetadata",
"TrigComposite collections with additional cost metadata" }

Definition at line 147 of file TrigCostAnalysis.h.

147 { this, "CostMetadataWriteHandleKey", "HLT_RuntimeMetadata",
148 "TrigComposite collections with additional cost metadata" };

◆ m_metadataTree

TTree* TrigCostAnalysis::m_metadataTree
private

Used to write out some metadata needed by post-processing (e.g.

bunchgroup, lumi)

Definition at line 218 of file TrigCostAnalysis.h.

◆ m_monitoredRanges

std::unordered_map<std::string, std::unique_ptr<MonitoredRange> > TrigCostAnalysis::m_monitoredRanges
private

Owned storage of Ranges.

Keyed on Range name.

Definition at line 215 of file TrigCostAnalysis.h.

◆ m_rosDataKey

SG::ReadHandleKey<xAOD::TrigCompositeContainer> TrigCostAnalysis::m_rosDataKey
Initial value:
{ this, "CostROSReadHandleKey", "HLT_TrigCostROSContainer",
"Trigger ROS cost payload container for algorithms" }

Definition at line 144 of file TrigCostAnalysis.h.

144 { this, "CostROSReadHandleKey", "HLT_TrigCostROSContainer",
145 "Trigger ROS cost payload container for algorithms" };

◆ m_rosToRob

Gaudi::Property<std::map<std::string, std::vector<uint32_t> > > TrigCostAnalysis::m_rosToRob
Initial value:
{
this, "ROSToROBMap", {}, "ROS to ROB mapping" }

Definition at line 135 of file TrigCostAnalysis.h.

135 {
136 this, "ROSToROBMap", {}, "ROS to ROB mapping" };

◆ m_singleTimeRange

Gaudi::Property<bool> TrigCostAnalysis::m_singleTimeRange
Initial value:
{ this, "UseSingleTimeRange", false,
"Use a single time range rather than splitting by LB" }

Definition at line 81 of file TrigCostAnalysis.h.

81 { this, "UseSingleTimeRange", false,
82 "Use a single time range rather than splitting by LB" };

◆ m_singleTimeRangeName

Gaudi::Property<std::string> TrigCostAnalysis::m_singleTimeRangeName
Initial value:
{ this, "SingleTimeRangeName", "All",
"Name for single time range" }

Definition at line 84 of file TrigCostAnalysis.h.

84 { this, "SingleTimeRangeName", "All",
85 "Name for single time range" };

◆ m_storeIdentifiers

std::set<std::string> TrigCostAnalysis::m_storeIdentifiers
private

Identifiers of object stores, needed to cache STORE string-hash values.

Definition at line 217 of file TrigCostAnalysis.h.

◆ m_TimeRangeLengthLB

Gaudi::Property<size_t> TrigCostAnalysis::m_TimeRangeLengthLB
Initial value:
{ this, "TimeRangeLengthLB", 50,
"Length of each variable length Time Range in LB" }

Definition at line 93 of file TrigCostAnalysis.h.

93 { this, "TimeRangeLengthLB", 50,
94 "Length of each variable length Time Range in LB" };

◆ m_useEBWeights

Gaudi::Property<bool> TrigCostAnalysis::m_useEBWeights
Initial value:
{ this, "UseEBWeights", true,
"Apply Enhanced Bias weights" }

Definition at line 123 of file TrigCostAnalysis.h.

123 { this, "UseEBWeights", true,
124 "Apply Enhanced Bias weights" };

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: