ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetMonitoring
InDetPerformanceMonitoring
src
EventAnalysis.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
InDetPerformanceMonitoring/EventAnalysis.h
"
6
#include "GaudiKernel/ITHistSvc.h"
7
#include "GaudiKernel/ServiceHandle.h"
8
#include "TH1.h"
9
#include "TH2.h"
10
#include "TProfile.h"
11
#include "TProfile2D.h"
12
13
14
namespace
{
15
template
<
class
HistoArrayType>
16
void
registerHistogramType
17
(ITHistSvc& histSvc,
18
const
HistoArrayType &
h
,
const
std::string &sampleName,
const
std::string & suffix){
19
unsigned
int
u
= 1;
20
const
std::string titleRoot{
"/ESD/"
+
sampleName
+
suffix
};
21
for
(
auto
& thisHisto:
h
){
22
histSvc
.regHist( titleRoot + std::to_string(u), thisHisto.second ).ignore();
23
++
u
;
24
}
25
}
26
}
27
28
//=============================================================================
29
// Constructors & Destructors
30
//=============================================================================
31
32
EventAnalysis::EventAnalysis
()
33
{
34
m_uPassedEvents
= 0;
35
}
36
37
EventAnalysis::~EventAnalysis
()
38
{
39
}
40
41
//=============================================================================
42
// Public Accessors
43
//=============================================================================
44
void
EventAnalysis::Init
()
45
{
46
// This must be called by an inheriting class in order to book
47
// & register histograms.
48
BookHistograms
();
49
Register
();
50
}
51
52
//=============================================================================
53
// Protected Accessors
54
//=============================================================================
55
void
EventAnalysis::BookHistograms
()
56
{
57
// This must be overriden by an inheriting class.
58
}
59
60
//=============================================================================
61
// Private Accessors
62
//=============================================================================
63
void
EventAnalysis::Register
()
64
{
65
ServiceHandle<ITHistSvc>
histSvc (
"THistSvc"
,
"EventAnalysis"
);
66
67
// Register histograms in monitoring tool
68
registerHistogramType(*histSvc,
m_x1DHistograms
,
m_xSampleName
,
"/1dhisto_"
);
69
registerHistogramType(*histSvc,
m_x2DHistograms
,
m_xSampleName
,
"/2dhisto_"
);
70
71
registerHistogramType(*histSvc,
m_x1DProfHistograms
,
m_xSampleName
,
"/1dprof_"
);
72
registerHistogramType(*histSvc,
m_x2DProfHistograms
,
m_xSampleName
,
"/2dprof_"
);
73
}
74
75
76
//=============================================================================
EventAnalysis.h
h
Header file for AthHistogramAlgorithm.
EventAnalysis::m_x2DProfHistograms
std::map< unsigned int, TProfile2D * > m_x2DProfHistograms
Definition
EventAnalysis.h:79
EventAnalysis::m_x2DHistograms
std::map< unsigned int, TH2F * > m_x2DHistograms
Definition
EventAnalysis.h:77
EventAnalysis::~EventAnalysis
virtual ~EventAnalysis()
Definition
EventAnalysis.cxx:37
EventAnalysis::m_x1DHistograms
std::map< unsigned int, TH1F * > m_x1DHistograms
Definition
EventAnalysis.h:76
EventAnalysis::BookHistograms
virtual void BookHistograms()
Definition
EventAnalysis.cxx:55
EventAnalysis::Init
virtual void Init()
Definition
EventAnalysis.cxx:44
EventAnalysis::EventAnalysis
EventAnalysis()
Definition
EventAnalysis.cxx:32
EventAnalysis::m_x1DProfHistograms
std::map< unsigned int, TProfile * > m_x1DProfHistograms
Definition
EventAnalysis.h:78
EventAnalysis::m_uPassedEvents
unsigned int m_uPassedEvents
Definition
EventAnalysis.h:75
EventAnalysis::m_xSampleName
std::string m_xSampleName
Definition
EventAnalysis.h:81
EventAnalysis::Register
void Register()
Definition
EventAnalysis.cxx:63
ServiceHandle
Definition
ClusterMakerTool.h:36
MuonSegmentReaderConfig.histSvc
histSvc
Definition
MuonSegmentReaderConfig.py:96
Trk::u
@ u
Enums for curvilinear frames.
Definition
ParamDefs.h:77
getEFTrackSample.sampleName
sampleName
Definition
getEFTrackSample.py:13
hotSpotInTAG.suffix
str suffix
Definition
hotSpotInTAG.py:185
Generated on
for ATLAS Offline Software by
1.17.0