ATLAS Offline Software
InnerDetector
InDetMonitoring
InDetPerformanceMonitoring
InDetPerformanceMonitoring
PerfMonServices.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef IDPERFMON_SERVICES_H
6
#define IDPERFMON_SERVICES_H
7
8
#include "GaudiKernel/INTupleSvc.h"
9
#include "GaudiKernel/ITHistSvc.h"
10
#include "GaudiKernel/Algorithm.h"
11
12
#include "
StoreGate/StoreGateSvc.h
"
13
14
class
PerfMonServices
15
{
16
public
:
17
// Constructors and Destructors.
18
PerfMonServices
();
19
~PerfMonServices
();
20
21
enum
CONTAINERS
22
{
23
MUON_START
= 0,
24
MUID_COLLECTION
=
MUON_START
,
25
STACO_COLLECTION
,
26
MUON_COLLECTION
,
27
MUON_END
,
28
29
ELEC_START
=
MUON_END
,
30
ELECTRON_COLLECTION
=
ELEC_START
,
31
ELEC_END
,
32
33
PHOT_START
=
ELEC_END
,
34
PHOTON_COLLECTION
=
PHOT_START
,
35
PHOT_END
,
36
37
MET_START
=
PHOT_END
,
38
MET_COLLECTION
=
MET_START
,
39
MET_END
,
40
41
TRK_START
=
MET_END
,
42
TRK_COLLECTION
=
TRK_START
,
43
TRK_END
,
44
45
VTX_START
=
TRK_END
,
46
VTX_COLLECTION
=
VTX_START
,
47
VTX_END
,
48
49
NUM_CONTAINERS
=
VTX_END
50
};
51
52
static
const
std::string&
getContainerName
(
CONTAINERS
eContainer ) {
return
s_sContainerNames
[eContainer]; }
53
static
const
std::string&
getAtlfastContainerName
(
CONTAINERS
eContainer ) {
return
s_sAtlfastContainerNames
[eContainer]; }
54
55
template
<
class
T>
static
const
T
*
getContainer
(
CONTAINERS
eContainer ) {
56
const
T
* pxContainer =
nullptr
;
57
const
std::string& sContainerName =
PerfMonServices::getContainerName
( eContainer );
58
SmartIF<StoreGateSvc>
storeGate
{Gaudi::svcLocator()->service(
"StoreGateSvc"
)};
59
if
(
storeGate
) {
60
storeGate
->retrieve( pxContainer , sContainerName ).ignore();
61
}
62
return
pxContainer;
63
}
64
65
template
<
class
T>
T
static
const
GetMax
(
T
a
,
T
b
) {
66
T
result
;
67
result
=
a
>
b
?
a
:
b
;
68
return
result
;
69
}
70
71
protected
:
72
73
private
:
74
// Names of the various object containers.
75
static
const
std::string
s_sContainerNames
[
NUM_CONTAINERS
];
76
static
const
std::string
s_sAtlfastContainerNames
[
NUM_CONTAINERS
];
77
};
78
79
#endif
PerfMonServices::PerfMonServices
PerfMonServices()
Definition:
PerfMonServices.cxx:29
get_generator_info.result
result
Definition:
get_generator_info.py:21
PerfMonServices::getContainerName
static const std::string & getContainerName(CONTAINERS eContainer)
Definition:
PerfMonServices.h:52
PerfMonServices::GetMax
static T const GetMax(T a, T b)
Definition:
PerfMonServices.h:65
PerfMonServices::MET_END
@ MET_END
Definition:
PerfMonServices.h:39
PerfMonServices::VTX_START
@ VTX_START
Definition:
PerfMonServices.h:45
PerfMonServices::MUID_COLLECTION
@ MUID_COLLECTION
Definition:
PerfMonServices.h:24
PerfMonServices::NUM_CONTAINERS
@ NUM_CONTAINERS
Definition:
PerfMonServices.h:49
PerfMonServices::TRK_START
@ TRK_START
Definition:
PerfMonServices.h:41
PerfMonServices::MET_COLLECTION
@ MET_COLLECTION
Definition:
PerfMonServices.h:38
PerfMonServices::~PerfMonServices
~PerfMonServices()
Definition:
PerfMonServices.cxx:33
PerfMonServices::s_sAtlfastContainerNames
static const std::string s_sAtlfastContainerNames[NUM_CONTAINERS]
Definition:
PerfMonServices.h:76
PerfMonServices::TRK_END
@ TRK_END
Definition:
PerfMonServices.h:43
PerfMonServices::ELECTRON_COLLECTION
@ ELECTRON_COLLECTION
Definition:
PerfMonServices.h:30
PerfMonServices::getAtlfastContainerName
static const std::string & getAtlfastContainerName(CONTAINERS eContainer)
Definition:
PerfMonServices.h:53
PerfMonServices::CONTAINERS
CONTAINERS
Definition:
PerfMonServices.h:22
PerfMonServices::PHOT_END
@ PHOT_END
Definition:
PerfMonServices.h:35
PerfMonServices::VTX_COLLECTION
@ VTX_COLLECTION
Definition:
PerfMonServices.h:46
PerfMonServices::TRK_COLLECTION
@ TRK_COLLECTION
Definition:
PerfMonServices.h:42
PerfMonServices
Definition:
PerfMonServices.h:15
plotBeamSpotMon.b
b
Definition:
plotBeamSpotMon.py:77
PerfMonServices::ELEC_END
@ ELEC_END
Definition:
PerfMonServices.h:31
PerfMonServices::MUON_END
@ MUON_END
Definition:
PerfMonServices.h:27
PerfMonServices::s_sContainerNames
static const std::string s_sContainerNames[NUM_CONTAINERS]
Definition:
PerfMonServices.h:75
a
TList * a
Definition:
liststreamerinfos.cxx:10
PerfMonServices::VTX_END
@ VTX_END
Definition:
PerfMonServices.h:47
PerfMonServices::PHOT_START
@ PHOT_START
Definition:
PerfMonServices.h:33
PerfMonServices::ELEC_START
@ ELEC_START
Definition:
PerfMonServices.h:29
PerfMonServices::MET_START
@ MET_START
Definition:
PerfMonServices.h:37
PerfMonServices::MUON_START
@ MUON_START
Definition:
PerfMonServices.h:23
PerfMonServices::PHOTON_COLLECTION
@ PHOTON_COLLECTION
Definition:
PerfMonServices.h:34
PerfMonServices::STACO_COLLECTION
@ STACO_COLLECTION
Definition:
PerfMonServices.h:25
StoreGateSvc.h
PerfMonServices::MUON_COLLECTION
@ MUON_COLLECTION
Definition:
PerfMonServices.h:26
TSU::T
unsigned long long T
Definition:
L1TopoDataTypes.h:35
python.PyKernel.storeGate
storeGate
Definition:
PyKernel.py:40
PerfMonServices::getContainer
static const T * getContainer(CONTAINERS eContainer)
Definition:
PerfMonServices.h:55
Generated on Thu Nov 7 2024 21:23:22 for ATLAS Offline Software by
1.8.18