ATLAS Offline Software
Loading...
Searching...
No Matches
LArSamplesMon/LArSamplesMon/ClassCounts.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
9
10#ifndef LArSamples_ClassCounts_H
11#define LArSamples_ClassCounts_H
12
13#include "TString.h"
14#include <map>
16
17namespace LArSamples {
18
20
21 public:
22
24 ClassCounts(const TString& name);
25
26 virtual ~ClassCounts();
27
28 const TString& className() const { return m_className; }
29 static std::map<TString, int>& counts();
30
33
34 static void incrementInstanceCount(const TString& name) { counts()[name]++; }
35 static void decrementInstanceCount(const TString& name) { counts()[name]--; }
36
37 int instanceCount() const { return instanceCount(className()); }
38 static int instanceCount(const TString& name) { return m_counts ? (*m_counts)[name] : 0; }
39
40 static void printCountsTable();
41
42 private:
43
44 TString m_className;
45 static std::map<TString, int>* m_counts;
46 };
47}
48#endif
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
static std::map< TString, int > & counts()
static void decrementInstanceCount(const TString &name)
static std::map< TString, int > * m_counts
static void incrementInstanceCount(const TString &name)
static int instanceCount(const TString &name)
static std::map< TString, int > & counts()
ClassCounts(const TString &name)
Constructor.
static void printCountsTable()