ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonDQA
MuonDQAUtils
MuonDQAUtils
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
26
class
MuonDQAHistList
{
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
65
class
MuonDQAHistMap
{
66
public
:
67
void
clear
() {
68
m_data
.clear();
69
}
70
71
void
addList
(
const
std::string& station_name,
const
MuonDQAHistList
& lst ) {
72
m_data
[station_name] = lst;
73
}
74
75
MuonDQAHistList
&
getList
( std::string station_name ) {
76
std::map<std::string,MuonDQAHistList>::iterator it;
77
it =
m_data
.find( station_name );
78
if
( it !=
m_data
.end() ) {
79
return
it->second;
80
}
else
{
81
m_data
[station_name] =
MuonDQAHistList
();
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) {
91
std::map<int, MuonDQAHistList>::iterator it;
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
MuonDQAHistList
Definition
MuonDQAHistMap.h:26
MuonDQAHistList::clear
void clear()
Definition
MuonDQAHistMap.h:28
MuonDQAHistList::m_H2s
std::vector< TH2 * > m_H2s
Definition
MuonDQAHistMap.h:61
MuonDQAHistList::addHist
void addHist(TH1 *p)
Definition
MuonDQAHistMap.h:32
MuonDQAHistList::getH2
TH2 * getH2(const std::string &hist_name) const
Definition
MuonDQAHistMap.h:48
MuonDQAHistList::getH1
TH1 * getH1(const std::string &hist_name) const
Definition
MuonDQAHistMap.h:38
MuonDQAHistList::m_H1s
std::vector< TH1 * > m_H1s
Definition
MuonDQAHistMap.h:60
MuonDQAHistList::addHist
void addHist(TH2 *p)
Definition
MuonDQAHistMap.h:35
MuonDQAHistMap
Definition
MuonDQAHistMap.h:65
MuonDQAHistMap::m_data
std::map< std::string, MuonDQAHistList > m_data
Definition
MuonDQAHistMap.h:102
MuonDQAHistMap::getList
MuonDQAHistList & getList(std::string station_name)
Definition
MuonDQAHistMap.h:75
MuonDQAHistMap::m_data_int
std::map< int, MuonDQAHistList > m_data_int
Definition
MuonDQAHistMap.h:103
MuonDQAHistMap::addList
void addList(const int &station_idInt, const MuonDQAHistList &lst)
Definition
MuonDQAHistMap.h:86
MuonDQAHistMap::addList
void addList(const std::string &station_name, const MuonDQAHistList &lst)
Definition
MuonDQAHistMap.h:71
MuonDQAHistMap::getList
MuonDQAHistList & getList(int station_idInt)
Definition
MuonDQAHistMap.h:90
MuonDQAHistMap::clear
void clear()
Definition
MuonDQAHistMap.h:67
Generated on
for ATLAS Offline Software by
1.17.0