![]() |
ATLAS Offline Software
|
Concrete implimentation of Counter to monitor all properties of a given Chain instance. More...
#include <CounterChain.h>
Public Member Functions | |
| CounterChain ()=delete | |
| Forbid default constructor. More... | |
| CounterChain (const std::string &name, const MonitorBase *parent) | |
| Construct counter. More... | |
| CounterChain (const std::string &name, unsigned nRos, const MonitorBase *parent) | |
| Construct counter. More... | |
| virtual | ~CounterChain ()=default |
| Default destructor. More... | |
| CounterChain & | operator= (const CounterChain &)=delete |
| Forbid assignment. More... | |
| CounterChain (const CounterChain &)=delete | |
| Forbid copy. More... | |
| virtual StatusCode | newEvent (const CostData &data, size_t index, const float weight=1.) override |
| Concrete implimentation. More... | |
| const std::string & | getName () const |
| Getter for Counter's name. More... | |
| const MonitorBase * | getParent () const |
| Return cached non-owning const ptr to this Counter's parent Monitor. More... | |
| bool | variableExists (const std::string &name) const |
| Check if a variable of a given name exists. More... | |
| Variable & | getVariable (const std::string &name) |
| Returns a mutable reference to a named Variable. More... | |
| StatusCode | fill (const std::string &name, float value, float weight=1.0) |
| Fill (for per-Call) or accumulate in a buffer (for per-Event) a quantity histogrammed by a named Variable. More... | |
| StatusCode | fill (const std::string &name, float xvalue, float yvalue, float weight) |
| Fill (for per-Call) or accumulate in a buffer (for per-Event) a quantity histogrammed by a named Variable. More... | |
| StatusCode | increment (const std::string &name, float weight=1.0) |
| Convenience function. More... | |
| StatusCode | setDenominator (const std::string &name, float value) |
| Optional for per-Event Variables. More... | |
| virtual StatusCode | endEvent (float weight=1.0) |
| Called by the framework. More... | |
Protected Member Functions | |
| void | regHistogram (const std::string &name, const std::string &title, const VariableType type=VariableType::kPerCall, const LogType xaxis=kLog, const float min=0.1, const float max=1000000., const size_t bins=70) |
| Book a histogram for this Counter, to be filled in per-event monitoring. More... | |
| void | regHistogram (const std::string &name, const std::string &title, const VariableType type, const LogType xaxis, const float xmin, const float xmax, const size_t xbins, const LogType yaxis, const float ymin, const float ymax, const size_t ybins) |
| Book a 2D histogram for this Counter, to be filled in per-event monitoring. More... | |
| void | regTProfile (const std::string &name, const std::string &title, const VariableType type=VariableType::kPerCall, const LogType xaxis=kLog, const float min=0.1, const float max=1000000., const size_t bins=70) |
| Book a TProfile for this Counter, to be filled in per-event monitoring. More... | |
| TH1 * | bookGetPointer (TH1 *hist, const std::string &tDir="") const |
| Appends Counter name (to histogram path) and forwards histogram book request to parent Monitor. More... | |
| float | timeToMilliSec (const uint64_t start, const uint64_t stop) const |
| Helper function. More... | |
Private Attributes | |
| bool | m_isInitialized |
| const std::string | m_name |
| Counter's name. More... | |
| const MonitorBase * | m_parent |
| Counter's parent Monitor. More... | |
| std::unordered_map< std::string, Variable > | m_variables |
| Store of Counter's Variables. More... | |
Concrete implimentation of Counter to monitor all properties of a given Chain instance.
Definition at line 14 of file CounterChain.h.
|
delete |
Forbid default constructor.
| CounterChain::CounterChain | ( | const std::string & | name, |
| const MonitorBase * | parent | ||
| ) |
Construct counter.
| [in] | name | Counter's name |
| [in] | parent | Counter's parent monitor, cached non-owning pointer. |
Definition at line 11 of file CounterChain.cxx.
| CounterChain::CounterChain | ( | const std::string & | name, |
| unsigned | nRos, | ||
| const MonitorBase * | parent | ||
| ) |
Construct counter.
| [in] | name | Counter's name |
| [in] | nRos | Number of possible ROSes |
| [in] | parent | Counter's parent monitor, cached non-owning pointer. |
Definition at line 28 of file CounterChain.cxx.
|
virtualdefault |
Default destructor.
|
delete |
Forbid copy.
|
protectedinherited |
Appends Counter name (to histogram path) and forwards histogram book request to parent Monitor.
| [in] | hist | Bare pointer to histogram. Ownership transferred to THistSvc. |
| [in] | tDir | Histogram name & directory. |
Definition at line 233 of file CounterBase.cxx.
|
virtualinherited |
Called by the framework.
Causes per-Event Variables to fill their histograms with their accumulated data.
Definition at line 225 of file CounterBase.cxx.
|
inherited |
Fill (for per-Call) or accumulate in a buffer (for per-Event) a quantity histogrammed by a named Variable.
| [in] | name | Variable to increment |
| [in] | value | The payload value |
| [in] | weight | Global event weight |
Definition at line 191 of file CounterBase.cxx.
|
inherited |
Fill (for per-Call) or accumulate in a buffer (for per-Event) a quantity histogrammed by a named Variable.
| [in] | name | Variable to increment |
| [in] | xvalue | The payload x-axis value |
| [in] | yvalue | The payload y-axis value |
| [in] | weight | Global event weight |
Definition at line 200 of file CounterBase.cxx.
|
inherited |
Getter for Counter's name.
Definition at line 17 of file CounterBase.cxx.
|
inherited |
Return cached non-owning const ptr to this Counter's parent Monitor.
Definition at line 22 of file CounterBase.cxx.
Returns a mutable reference to a named Variable.
Throws if no such Variable exists. Used when more complicated logic is needed on a Variable than simply using the fill() method.
| [in] | name | Variable to return |
Definition at line 182 of file CounterBase.cxx.
|
inherited |
|
overridevirtual |
Concrete implimentation.
Monitores chain at specified index. Expected to match this instances name().
| [in] | data | Access to event data |
| [in] | index | Index within appropriate event data container which is to be analysed by this Counter |
| [in] | weight | Global event weight |
Implements CounterBase.
Definition at line 38 of file CounterChain.cxx.
|
delete |
Forbid assignment.
|
protectedinherited |
Book a 2D histogram for this Counter, to be filled in per-event monitoring.
| [in] | name | The name of the histogram (and corresponding Variable) |
| [in] | title | ROOT histogram title string in format "title;xaxis;yaxis" |
| [in] | xaxis | Controls if the x-axis should use fixed-width or logarithmic bin boundaries. |
| [in] | xmin | X-axis minimum bound. |
| [in] | xmax | X-axis maximum bound. |
| [in] | xbins | Number of histogram bins. |
| [in] | yaxis | Controls if the y-axis should use fixed-width or logarithmic bin boundaries. |
| [in] | ymin | Y-axis minimum bound. |
| [in] | ymax | Y-axis maximum bound. |
| [in] | ybins | Number of histogram bins. |
Definition at line 109 of file CounterBase.cxx.
|
protectedinherited |
Book a histogram for this Counter, to be filled in per-event monitoring.
| [in] | name | The name of the histogram (and corresponding Variable) |
| [in] | title | ROOT histogram title string in format "title;xaxis;yaxis" |
| [in] | xaxis | Controls if the x-axis should use fixed-width or logarithmic bin boundaries. |
| [in] | min | X-axis minimum bound. |
| [in] | max | X-axis maximum bound. |
| [in] | bins | Number of histogram bins. |
Definition at line 27 of file CounterBase.cxx.
|
protectedinherited |
Book a TProfile for this Counter, to be filled in per-event monitoring.
| [in] | name | The name of the histogram (and corresponding Variable) |
| [in] | title | ROOT histogram title string in format "title;xaxis;yaxis" |
| [in] | xaxis | Controls if the x-axis should use fixed-width or logarithmic bin boundaries. |
| [in] | min | X-axis minimum bound. |
| [in] | max | X-axis maximum bound. |
| [in] | bins | Number of histogram bins. |
Definition at line 68 of file CounterBase.cxx.
|
inherited |
Optional for per-Event Variables.
Sets a denominator to divide the value through by before filling.
| [in] | name | Variable to set the denominator for. |
| [in] | value | The denominator |
Definition at line 210 of file CounterBase.cxx.
|
protectedinherited |
Helper function.
Compute the time difference in discreet microseconds and covert to fractional milliseconds.
Definition at line 243 of file CounterBase.cxx.
|
inherited |
Check if a variable of a given name exists.
| [in] | name | Name of Variable. |
Definition at line 178 of file CounterBase.cxx.
|
private |
Definition at line 60 of file CounterChain.h.
|
privateinherited |
Counter's name.
Definition at line 203 of file CounterBase.h.
|
privateinherited |
Counter's parent Monitor.
Cached non-owning const pointer.
Definition at line 204 of file CounterBase.h.
|
privateinherited |
Store of Counter's Variables.
These wrap a histogram pointer. Keyed by name.
Definition at line 205 of file CounterBase.h.
1.8.18