ATLAS Offline Software
MonitorThreadOccupancy.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGCOSTANALYSIS_MONITORTHREADOCCUPANCY_H
6 #define TRIGCOSTANALYSIS_MONITORTHREADOCCUPANCY_H 1
7 
8 #include "../MonitorBase.h"
9 
15  public:
20 
26  MonitorThreadOccupancy(const std::string& name, const MonitoredRange* parent);
27 
31  virtual ~MonitorThreadOccupancy() = default;
32 
37 
42 
48  virtual StatusCode newEvent(const CostData& data, const float weight = 1.) override;
49 
55  virtual std::unique_ptr<CounterBase> newCounter(const std::string& name) override;
56 
61 
62  std::unordered_map<uint32_t, std::string> m_threadToCounterMap;
63  size_t m_threadCounter;
64 };
65 
66 #endif // TRIGCOSTANALYSIS_MONITORTHREADOCCUPANCY_H
MonitorThreadOccupancy::MonitorThreadOccupancy
MonitorThreadOccupancy()=delete
Forbid default constructor.
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
MonitorThreadOccupancy::newEvent
virtual StatusCode newEvent(const CostData &data, const float weight=1.) override
Concrete dispatch method.
Definition: MonitorThreadOccupancy.cxx:14
MonitorThreadOccupancy::MonitorThreadOccupancy
MonitorThreadOccupancy(const MonitorThreadOccupancy &)=delete
Forbid copy.
MonitorThreadOccupancy::m_threadToCounterMap
std::unordered_map< uint32_t, std::string > m_threadToCounterMap
Map thread's hash ID to a counting numeral embedded in a string.
Definition: MonitorThreadOccupancy.h:62
MonitorThreadOccupancy::postProcess
StatusCode postProcess(float weight)
Get the global start and stop timestamps over all threads and sync these to the individual threads.
Definition: MonitorThreadOccupancy.cxx:52
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MonitorThreadOccupancy::operator=
MonitorThreadOccupancy & operator=(const MonitorThreadOccupancy &)=delete
Forbid assignment.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MonitorBase
Forward declare.
Definition: Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.h:33
MonitoredRange
Container which represents a time range and holds a collection of Monitors which monitor this range.
Definition: MonitoredRange.h:29
MonitorThreadOccupancy
Concrete implementation of Monitor to monitor utilisation of individual threads in a MT job.
Definition: MonitorThreadOccupancy.h:14
MonitorThreadOccupancy::newCounter
virtual std::unique_ptr< CounterBase > newCounter(const std::string &name) override
Concrete counter instantiation.
Definition: MonitorThreadOccupancy.cxx:69
CostData
Caches and propagates event data to be used by monitoring algorithms.
Definition: CostData.h:26
MonitorThreadOccupancy::~MonitorThreadOccupancy
virtual ~MonitorThreadOccupancy()=default
Default destructor.
MonitorThreadOccupancy::m_threadCounter
size_t m_threadCounter
Count how many unique thread ID we have seen.
Definition: MonitorThreadOccupancy.h:63