ATLAS Offline Software
Loading...
Searching...
No Matches
LArCafJobs/LArCafJobs/ClassCounts.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 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>
15
17
18namespace LArSamples {
19
21
22 public:
23
25 ClassCounts(const TString& name);
26
27 virtual ~ClassCounts();
28
29 const TString& className() const { return m_className; }
30 static std::map<TString, int>& counts();
31
34
35 static void incrementInstanceCount(const TString& name) { counts()[name]++; }
36 static void decrementInstanceCount(const TString& name) { counts()[name]--; }
37
38 int instanceCount() const { return instanceCount(className()); }
39 static int instanceCount(const TString& name) { return m_counts ? (*m_counts)[name] : 0; }
40
41 static void printCountsTable();
42
43 private:
44
45 TString m_className;
46 static std::map<TString, int>* m_counts;
47 };
48}
49#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)
ClassCounts(const TString &name)
Constructor.