ATLAS Offline Software
MuonDQAHistMap.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Package : MuonDQAUtils - MuonDQAHistMap
7 // Author: N. Benekos(MPI) - M. Woudstra(University of Massachusetts), J. Griffiths(University of Washington)
8 // August. 2007
9 //
10 // DESCRIPTION:
11 // Subject: Offline Muon Data Quality --> returns maps of HistLists
13 
14 #ifndef MuonDQAHistMap_H
15 #define MuonDQAHistMap_H
16 
17 
18 #include "TH1.h"
19 #include "TH2.h"
20 
21 #include <vector>
22 #include <map>
23 
25 
27  public:
28  void clear() {
29  m_H1s.clear();
30  m_H2s.clear();
31  }
32  void addHist( TH1* p ) {
33  m_H1s.push_back(p);
34  }
35  void addHist( TH2* p ) {
36  m_H2s.push_back(p);
37  }
38  TH1* getH1( const std::string& hist_name ) const {
39  std::vector<TH1*>::const_iterator it = m_H1s.begin(),
40  itEnd = m_H1s.end();
41  for ( ; it != itEnd; ++it ) {
42  if ( (*it)->GetName() == hist_name ) {
43  return *it;
44  }
45  }
46  return 0;
47  }
48  TH2* getH2( const std::string& hist_name ) const {
49  std::vector<TH2*>::const_iterator it = m_H2s.begin(),
50  itEnd = m_H2s.end();
51  for ( ; it != itEnd; ++it ) {
52  if ( (*it)->GetName() == hist_name ) {
53  return *it;
54  }
55  }
56  return 0;
57  }
58 
59  private:
60  std::vector<TH1*> m_H1s;
61  std::vector<TH2*> m_H2s;
62 };
63 
64 
66  public:
67  void clear() {
68  m_data.clear();
69  }
70 
71  void addList( const std::string& station_name, const MuonDQAHistList& lst ) {
73  }
74 
77  it = m_data.find( station_name );
78  if ( it != m_data.end() ) {
79  return it->second;
80  } else {
82  return m_data[station_name];
83  }
84  }
85 
86  void addList( const int& station_idInt, const MuonDQAHistList& lst ) {
87  m_data_int[station_idInt] = lst;
88  }
89 
90  MuonDQAHistList& getList( int station_idInt) {
92  it = m_data_int.find( station_idInt );
93  if ( it != m_data_int.end() ) {
94  return it->second;
95  } else {
96  m_data_int[station_idInt] = MuonDQAHistList();
97  return m_data_int[station_idInt];
98  }
99  }
100 
101  private:
102  std::map< std::string, MuonDQAHistList > m_data;
103  std::map< int, MuonDQAHistList > m_data_int;
104 };
105 
106 #endif
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
MuonDQAHistMap::m_data
std::map< std::string, MuonDQAHistList > m_data
Definition: MuonDQAHistMap.h:102
MuonDQAHistList::getH2
TH2 * getH2(const std::string &hist_name) const
Definition: MuonDQAHistMap.h:48
MuonDQAHistMap
Definition: MuonDQAHistMap.h:65
skel.it
it
Definition: skel.GENtoEVGEN.py:407
MuonDQAHistList::addHist
void addHist(TH1 *p)
Definition: MuonDQAHistMap.h:32
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
MuonDQAHistMap::m_data_int
std::map< int, MuonDQAHistList > m_data_int
Definition: MuonDQAHistMap.h:103
python.getProblemFolderFromLogs.lst
lst
Definition: getProblemFolderFromLogs.py:44
MuonDQAHistList::clear
void clear()
Definition: MuonDQAHistMap.h:28
MuonDQAHistMap::getList
MuonDQAHistList & getList(std::string station_name)
Definition: MuonDQAHistMap.h:75
MuonDQAHistList
Definition: MuonDQAHistMap.h:26
MuonDQAHistMap::addList
void addList(const int &station_idInt, const MuonDQAHistList &lst)
Definition: MuonDQAHistMap.h:86
MuonDQAHistMap::getList
MuonDQAHistList & getList(int station_idInt)
Definition: MuonDQAHistMap.h:90
MuonDQAHistList::getH1
TH1 * getH1(const std::string &hist_name) const
Definition: MuonDQAHistMap.h:38
MuonDQAHistMap::clear
void clear()
Definition: MuonDQAHistMap.h:67
MuonDQAHistList::addHist
void addHist(TH2 *p)
Definition: MuonDQAHistMap.h:35
createCablingJSON.station_name
string station_name
Simple script to generate a BIS78 cabling map as used for the Monte Carlo processing.
Definition: createCablingJSON.py:13
MuonDQAHistMap::addList
void addList(const std::string &station_name, const MuonDQAHistList &lst)
Definition: MuonDQAHistMap.h:71
MuonDQAHistList::m_H2s
std::vector< TH2 * > m_H2s
Definition: MuonDQAHistMap.h:61
MuonDQAHistList::m_H1s
std::vector< TH1 * > m_H1s
Definition: MuonDQAHistMap.h:60