ATLAS Offline Software
Loading...
Searching...
No Matches
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
60 StatusCode postProcess(float weight);
61
62 std::unordered_map<uint32_t, std::string> m_threadToCounterMap;
64};
65
66#endif // TRIGCOSTANALYSIS_MONITORTHREADOCCUPANCY_H
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
Caches and propagates event data to be used by monitoring algorithms.
Definition CostData.h:26
MonitorBase()=delete
Forbid default constructor.
MonitorThreadOccupancy()=delete
Forbid default constructor.
virtual ~MonitorThreadOccupancy()=default
Default destructor.
StatusCode postProcess(float weight)
Get the global start and stop timestamps over all threads and sync these to the individual threads.
MonitorThreadOccupancy(const MonitorThreadOccupancy &)=delete
Forbid copy.
virtual std::unique_ptr< CounterBase > newCounter(const std::string &name) override
Concrete counter instantiation.
std::unordered_map< uint32_t, std::string > m_threadToCounterMap
Map thread's hash ID to a counting numeral embedded in a string.
MonitorThreadOccupancy & operator=(const MonitorThreadOccupancy &)=delete
Forbid assignment.
virtual StatusCode newEvent(const CostData &data, const float weight=1.) override
Concrete dispatch method.
size_t m_threadCounter
Count how many unique thread ID we have seen.
Container which represents a time range and holds a collection of Monitors which monitor this range.