![]() |
ATLAS Offline Software
|
Athena algorithm used to process Trigger cost monitoring data in Run 3 and above. More...
#include <TrigCostAnalysis.h>
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 (const EventContext &ctx) 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 bool | isClonable () const override |
| Specify if the algorithm is clonable. | |
| virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. | |
| virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. | |
| virtual bool | filterPassed (const EventContext &ctx) const |
| Get filter decision: | |
| virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
| Set filter decision: | |
| 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::TrigCompositeContainer > | m_costDataKey |
| SG::ReadHandleKey< xAOD::TrigCompositeContainer > | m_rosDataKey |
| SG::ReadHandleKey< xAOD::TrigCompositeContainer > | m_metadataDataKey |
| SG::ReadHandleKey< TrigConf::HLTMenu > | m_HLTMenuKey |
| ToolHandle< IEnhancedBiasWeighter > | m_enhancedBiasTool |
| ToolHandle< TrigCompositeUtils::AlgToChainTool > | m_algToChainTool |
Protected Member Functions | |
| virtual bool | isReEntrant () const override final |
| Legacy algorithms are not thread-safe. | |
| 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< StoreGateSvc > | StoreGateSvc_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 |
| Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. | |
| 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 |
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.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
| TrigCostAnalysis::TrigCostAnalysis | ( | const std::string & | name, |
| ISvcLocator * | pSvcLocator ) |
Construct TrigCostAnalysis.
| [in] | name | Athena algorithm's name. |
| [in] | pSvcLocator | Framework service pointer. |
Definition at line 25 of file TrigCostAnalysis.cxx.
|
virtualdefault |
Default destructor.
| TH1 * TrigCostAnalysis::bookGetPointer | ( | TH1 * | hist, |
| const std::string & | tDir = "" ) const |
Public method forwarded to this class' AthHistogramAlgorithm::bookGetPointer base.
| [in] | hist | Bare pointer to histogram. Ownership transferred to THistSvc. |
| [in] | tDir | Histogram name & directory. |
Definition at line 173 of file TrigCostAnalysis.cxx.
|
private |
Check if event dumping should be performed for the current event.
| [in] | context | Event context. |
| [in] | costData | We only dump the master-slot (slot:0) as these events cary payload data for all slots / all threads. |
Definition at line 307 of file TrigCostAnalysis.cxx.
|
private |
High watermark for pre-cached string hashes for the SLOT category.
Corresponding to SG and View IProxyDict names.
| [in] | max | Pre-compute string hashes for View or Slot multiplicities up to this number. |
Definition at line 137 of file TrigCostAnalysis.cxx.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 145 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 95 of file AthCommonDataStore.h.
|
private |
Dump event algorithm execution data in ASCII format.
| [in] | context | Event context. |
Definition at line 430 of file TrigCostAnalysis.cxx.
|
inlineinherited |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 85 of file AthCommonDataStore.h.
|
finalvirtual |
Monitor event, unless max range limit reached and event outside of all ranges.
Implements AthAlgorithm.
Definition at line 186 of file TrigCostAnalysis.cxx.
|
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
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 89 of file AthCommonAlgorithm.cxx.
|
inlinevirtualinherited |
Get filter decision:
Definition at line 93 of file AthCommonAlgorithm.h.
|
finalvirtual |
Currently a noop for this algorithm.
Definition at line 468 of file TrigCostAnalysis.cxx.
|
private |
Return the slot used to process the event online.
| [in] | costCollection | Cost data. |
Definition at line 410 of file TrigCostAnalysis.cxx.
|
private |
Return or construct and return a Range for the Context.
Might return nullptr range.
| [in] | context | Event context. |
| [out] | range | Reference 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 364 of file TrigCostAnalysis.cxx.
|
private |
Compute global event weight to correct for online prescales.
| [in] | context | Event context. |
Definition at line 162 of file TrigCostAnalysis.cxx.
|
finalvirtual |
Retrieve tools and initialise read handles.
Definition at line 33 of file TrigCostAnalysis.cxx.
|
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.
|
inlineoverridevirtualinherited |
Specify if the algorithm is clonable.
Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.
Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.
Definition at line 68 of file AthCommonAlgorithm.h.
|
inlinefinaloverrideprotectedvirtualinherited |
Legacy algorithms are not thread-safe.
Definition at line 47 of file AthAlgorithm.h.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
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.
|
private |
Populate a newly minted Range object with all configured Monitors.
| [in] | range | Mutable ptr to new Range object which is to be populated. |
Definition at line 319 of file TrigCostAnalysis.cxx.
|
inlineprotectedinherited |
Definition at line 380 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 364 of file AthCommonDataStore.h.
|
inlinevirtualinherited |
Set filter decision:
Reimplemented in AthFilterAlgorithm.
Definition at line 99 of file AthCommonAlgorithm.h.
|
virtual |
Retrieve menu handle.
Definition at line 73 of file TrigCostAnalysis.cxx.
|
overridevirtualinherited |
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Reimplemented in AthAnalysisAlgorithm.
Definition at line 80 of file AthCommonAlgorithm.cxx.
|
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< Gaudi::Algorithm > >.
Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.
Definition at line 60 of file AthCommonAlgorithm.cxx.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
inlineinherited |
Definition at line 308 of file AthCommonDataStore.h.
|
private |
Write to outpute tree (if any) the metadata needed downstream.
Definition at line 476 of file TrigCostAnalysis.cxx.
|
mutableprivate |
Save unique hostnames for the run.
Definition at line 223 of file TrigCostAnalysis.h.
|
private |
Mutex to update set below.
Definition at line 222 of file TrigCostAnalysis.h.
| Gaudi::Property<std::vector<std::string> > TrigCostAnalysis::m_additionalHashList |
Definition at line 90 of file TrigCostAnalysis.h.
| Gaudi::Property<std::string> TrigCostAnalysis::m_additionalHashMap |
Definition at line 87 of file TrigCostAnalysis.h.
| ToolHandle<TrigCompositeUtils::AlgToChainTool> TrigCostAnalysis::m_algToChainTool |
Definition at line 156 of file TrigCostAnalysis.h.
|
private |
Cache of algorithm's type, read from configuration data.
Definition at line 216 of file TrigCostAnalysis.h.
| Gaudi::Property<float> TrigCostAnalysis::m_baseEventWeight |
Definition at line 132 of file TrigCostAnalysis.h.
| SG::ReadHandleKey<xAOD::TrigCompositeContainer> TrigCostAnalysis::m_costDataKey |
Definition at line 141 of file TrigCostAnalysis.h.
|
private |
Cached CostROSData class with details needed for ROS monitoring.
Definition at line 225 of file TrigCostAnalysis.h.
|
privateinherited |
Pointer to StoreGate (detector store by default).
Definition at line 393 of file AthCommonDataStore.h.
| Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorAlgorithm |
Definition at line 99 of file TrigCostAnalysis.h.
| Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorAlgorithmClass |
Definition at line 102 of file TrigCostAnalysis.h.
| Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorChain |
Definition at line 114 of file TrigCostAnalysis.h.
| Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorChainAlgorithm |
Definition at line 117 of file TrigCostAnalysis.h.
| Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorGlobal |
Definition at line 105 of file TrigCostAnalysis.h.
| Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorROS |
Definition at line 111 of file TrigCostAnalysis.h.
| Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorSequence |
Definition at line 120 of file TrigCostAnalysis.h.
| Gaudi::Property<bool> TrigCostAnalysis::m_doMonitorThreadOccupancy |
Definition at line 108 of file TrigCostAnalysis.h.
| ToolHandle<IEnhancedBiasWeighter> TrigCostAnalysis::m_enhancedBiasTool |
Definition at line 153 of file TrigCostAnalysis.h.
|
privateinherited |
Pointer to StoreGate (event store by default).
Definition at line 390 of file AthCommonDataStore.h.
| Gaudi::Property<std::set<std::string> > TrigCostAnalysis::m_excludeAlgsFromChain |
Definition at line 138 of file TrigCostAnalysis.h.
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 108 of file AthCommonAlgorithm.h.
| Gaudi::Property<uint64_t> TrigCostAnalysis::m_fullEventDumpProbability |
Definition at line 129 of file TrigCostAnalysis.h.
|
mutableprivate |
Counter to keep track of how many events have been full-dumped.
Definition at line 220 of file TrigCostAnalysis.h.
| ServiceHandle<ITHistSvc> TrigCostAnalysis::m_histSvc { this, "THistSvc", "THistSvc/THistSvc", "Histogramming svc" } |
Definition at line 79 of file TrigCostAnalysis.h.
| SG::ReadHandleKey<TrigConf::HLTMenu> TrigCostAnalysis::m_HLTMenuKey |
Definition at line 150 of file TrigCostAnalysis.h.
| Gaudi::Property<size_t> TrigCostAnalysis::m_maxFullEventDumps |
Definition at line 126 of file TrigCostAnalysis.h.
| Gaudi::Property<size_t> TrigCostAnalysis::m_maxTimeRange |
Definition at line 96 of file TrigCostAnalysis.h.
|
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.
| SG::ReadHandleKey<xAOD::TrigCompositeContainer> TrigCostAnalysis::m_metadataDataKey |
Definition at line 147 of file TrigCostAnalysis.h.
|
private |
Used to write out some metadata needed by post-processing (e.g.
bunchgroup, lumi)
Definition at line 218 of file TrigCostAnalysis.h.
|
private |
| SG::ReadHandleKey<xAOD::TrigCompositeContainer> TrigCostAnalysis::m_rosDataKey |
Definition at line 144 of file TrigCostAnalysis.h.
| Gaudi::Property<std::map<std::string, std::vector<uint32_t> > > TrigCostAnalysis::m_rosToRob |
Definition at line 135 of file TrigCostAnalysis.h.
| Gaudi::Property<bool> TrigCostAnalysis::m_singleTimeRange |
Definition at line 81 of file TrigCostAnalysis.h.
| Gaudi::Property<std::string> TrigCostAnalysis::m_singleTimeRangeName |
Definition at line 84 of file TrigCostAnalysis.h.
|
private |
Identifiers of object stores, needed to cache STORE string-hash values.
Definition at line 217 of file TrigCostAnalysis.h.
| Gaudi::Property<size_t> TrigCostAnalysis::m_TimeRangeLengthLB |
Definition at line 93 of file TrigCostAnalysis.h.
| Gaudi::Property<bool> TrigCostAnalysis::m_useEBWeights |
Definition at line 123 of file TrigCostAnalysis.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.