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
namespace
{
14
template
<
class
HistoArrayType>
15
void
registerHistogramType
16
(ITHistSvc& histSvc,
17
const
HistoArrayType &
h
,
const
std::string &sampleName,
const
std::string & suffix){
18
unsigned
int
u
= 1;
19
const
std::string titleRoot{
"/ESD/"
+
sampleName
+
suffix
};
20
for
(
auto
& thisHisto:
h
){
21
histSvc
.regHist( titleRoot + std::to_string(u), thisHisto.second ).ignore();
22
++
u
;
23
}
24
}
25
}
26
27
//=============================================================================
28
// Constructors & Destructors
29
//=============================================================================
30
31
EventAnalysis::EventAnalysis
()
32
{
33
m_uPassedEvents
= 0;
34
}
35
36
EventAnalysis::~EventAnalysis
()
37
{
38
}
39
40
//=============================================================================
41
// Public Accessors
42
//=============================================================================
43
void
EventAnalysis::Init
()
44
{
45
// This must be called by an inheriting class in order to book
46
// & register histograms.
47
BookHistograms
();
48
Register
();
49
}
50
51
//=============================================================================
52
// Protected Accessors
53
//=============================================================================
54
void
EventAnalysis::BookHistograms
()
55
{
56
// This must be overriden by an inheriting class.
57
}
58
59
//=============================================================================
60
// Private Accessors
61
//=============================================================================
62
void
EventAnalysis::Register
()
63
{
64
ServiceHandle<ITHistSvc>
histSvc (
"THistSvc"
,
"EventAnalysis"
);
65
66
// Register histograms in monitoring tool
67
registerHistogramType(*histSvc,
m_x1DHistograms
,
m_xSampleName
,
"/1dhisto_"
);
68
registerHistogramType(*histSvc,
m_x2DHistograms
,
m_xSampleName
,
"/2dhisto_"
);
69
70
registerHistogramType(*histSvc,
m_x1DProfHistograms
,
m_xSampleName
,
"/1dprof_"
);
71
registerHistogramType(*histSvc,
m_x2DProfHistograms
,
m_xSampleName
,
"/2dprof_"
);
72
}
73
74
75
//=============================================================================
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:36
EventAnalysis::m_x1DHistograms
std::map< unsigned int, TH1F * > m_x1DHistograms
Definition
EventAnalysis.h:76
EventAnalysis::BookHistograms
virtual void BookHistograms()
Definition
EventAnalysis.cxx:54
EventAnalysis::Init
virtual void Init()
Definition
EventAnalysis.cxx:43
EventAnalysis::EventAnalysis
EventAnalysis()
Definition
EventAnalysis.cxx:31
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:62
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