ATLAS Offline Software
Trigger
TrigConfiguration
TrigConfData
src
L1PrescalesSet.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigConfData/L1PrescalesSet.h
"
6
7
TrigConf::L1PrescalesSet::L1PrescalesSet
()
8
{}
9
10
TrigConf::L1PrescalesSet::L1PrescalesSet
(
const
boost::property_tree::ptree
&
data
)
11
:
DataStructure
(
data
)
12
{
13
load
();
14
}
15
16
void
17
TrigConf::L1PrescalesSet::load
()
18
{
19
m_name = getAttribute(
"name"
);
20
const
auto
&
cuts
=
data
().get_child(
"cutValues"
);
21
for
(
auto
&
c
:
cuts
) {
22
L1Prescale
ps;
23
ps.
cut
=
c
.second.get_child(
"cut"
).get_value<int32_t>();
24
ps.
enabled
=
c
.second.get_child(
"enabled"
).get_value<
bool
>();
25
ps.
prescale
=
getPrescaleFromCut
(ps.
cut
);
26
m_prescales[
c
.first] = ps;
27
}
28
}
29
30
void
31
TrigConf::L1PrescalesSet::clear
()
32
{
33
m_psk = 0;
34
m_prescales.clear();
35
}
36
37
std::size_t
38
TrigConf::L1PrescalesSet::size
()
const
39
{
40
return
m_prescales.size();
41
}
42
43
unsigned
int
44
TrigConf::L1PrescalesSet::psk
()
const
{
45
return
m_psk;
46
}
47
48
void
49
TrigConf::L1PrescalesSet::setPSK
(
unsigned
int
psk ) {
50
m_psk = psk;
51
}
52
53
const
TrigConf::L1PrescalesSet::L1Prescale
&
54
TrigConf::L1PrescalesSet::prescale
(
const
std::string & itemName)
const
{
55
return
m_prescales.at(itemName);
56
}
57
const
std::map<std::string, TrigConf::L1PrescalesSet::L1Prescale>&
58
TrigConf::L1PrescalesSet::prescales
()
const
{
59
return
m_prescales;
60
}
73
double
74
TrigConf::L1PrescalesSet::getPrescaleFromCut
(
uint32_t
cut
)
const
{
75
return
static_cast<
double
>
(0xFFFFFF) / ( 0x1000000 -
cut
);
76
}
77
data
char data[hepevt_bytes_allocation_ATLAS]
Definition:
HepEvt.cxx:11
TrigConf::L1PrescalesSet::L1Prescale::cut
uint32_t cut
Definition:
L1PrescalesSet.h:23
TrigConf::L1PrescalesSet::L1Prescale::enabled
bool enabled
Definition:
L1PrescalesSet.h:24
xAOD::uint32_t
setEventNumber uint32_t
Definition:
EventInfo_v1.cxx:127
L1PrescalesSet.h
TrigConf::L1PrescalesSet::L1PrescalesSet
L1PrescalesSet()
Constructor.
Definition:
L1PrescalesSet.cxx:7
python.TrigConfigSvcUtils.getPrescaleFromCut
def getPrescaleFromCut(cut)
Definition:
TrigConfigSvcUtils.py:763
TrigConf::L1PrescalesSet::setPSK
void setPSK(unsigned int psk)
Definition:
L1PrescalesSet.cxx:49
BindingsTest.cut
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
Definition:
BindingsTest.py:13
TrigConf::L1PrescalesSet::psk
unsigned int psk() const
setter and getter for the L1 prescale key
Definition:
L1PrescalesSet.cxx:44
plotBeamSpotVert.cuts
string cuts
Definition:
plotBeamSpotVert.py:93
TrigConf::L1PrescalesSet::getPrescaleFromCut
double getPrescaleFromCut(uint32_t cut) const
prescale = 2*24/(cut+1.)
Definition:
L1PrescalesSet.cxx:74
TrigConf::L1PrescalesSet::clear
virtual void clear() override
Clearing the configuration data.
Definition:
L1PrescalesSet.cxx:31
TrigConf::L1PrescalesSet::L1Prescale
Definition:
L1PrescalesSet.h:22
TrigConf::L1PrescalesSet::load
void load()
Definition:
L1PrescalesSet.cxx:17
ptree
boost::property_tree::ptree ptree
Definition:
JsonFileLoader.cxx:16
TrigConf::L1PrescalesSet::prescale
const L1Prescale & prescale(const std::string &itemName) const
Definition:
L1PrescalesSet.cxx:54
TrigConf::DataStructure
Base class for Trigger configuration data and wrapper around underlying representation.
Definition:
DataStructure.h:37
TrigConf::L1PrescalesSet::L1Prescale::prescale
double prescale
Definition:
L1PrescalesSet.h:25
TrigConf::L1PrescalesSet::prescales
const std::map< std::string, L1Prescale > & prescales() const
Definition:
L1PrescalesSet.cxx:58
TrigConf::L1PrescalesSet::size
std::size_t size() const
number of L1 prescales
Definition:
L1PrescalesSet.cxx:38
python.compressB64.c
def c
Definition:
compressB64.py:93
Generated on Sun Dec 22 2024 21:13:07 for ATLAS Offline Software by
1.8.18