ATLAS Offline Software
eFEXOutputCollection.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8  m_dooutput = false;
9 }
10 
12 {
13  for (auto iValues : m_allvalues_eg) {
14  delete iValues;
15  }
16  for (auto iValues : m_allvalues_tau) {
17  delete iValues;
18  }
19 }
20 
22 {
23  for (auto iValues : m_allvalues_eg) {
24  iValues->clear();
25  }
26  for (auto iValues : m_allvalues_tau) {
27  iValues->clear();
28  }
29  m_eFexNumber.clear();
30  m_emtob.clear();
31 }
32 
33 void LVL1::eFEXOutputCollection::addValue_eg(const std::string& key, float value)
34 {
35  m_values_tem_eg.insert(std::make_pair(key, value));
36 }
37 
38 void LVL1::eFEXOutputCollection::addValue_tau(const std::string& key, float value)
39 {
40  m_values_tem_tau.insert(std::make_pair(key, value));
41 }
42 
44 {
45  std::map<std::string, float>* values_local = new std::map<std::string, float>(m_values_tem_eg);
46  m_allvalues_eg.push_back(values_local);
47  m_values_tem_eg.clear();
48 }
49 
51 {
52  std::map<std::string, float>* values_local = new std::map<std::string, float>(m_values_tem_tau);
53  m_allvalues_tau.push_back(values_local);
54  m_values_tem_tau.clear();
55 }
56 
58 {
59  return m_allvalues_tau.size();
60 }
61 
63 {
64  return m_allvalues_eg.size();
65 }
66 
67 std::map<std::string, float>* LVL1::eFEXOutputCollection::get_eg(int location) const
68 {
69  return m_allvalues_eg.at(location);
70 }
71 
72 std::map<std::string, float>* LVL1::eFEXOutputCollection::get_tau(int location) const
73 {
74  return m_allvalues_tau.at(location);
75 }
76 
78 {
79  m_eFexNumber.push_back(efexnumber);
80 }
81 
83 {
84  return m_eFexNumber;
85 }
86 
88 {
89  m_emtob.push_back(emtob);
90 }
91 
92 std::vector<uint32_t> LVL1::eFEXOutputCollection::getEMtob() const
93 {
94  return m_emtob;
95 }
96 
97 
99  m_dooutput = input;
100 }
101 
103  return m_dooutput;
104 }
eFEXOutputCollection.h
create ntuples output
LVL1::eFEXOutputCollection::addValue_eg
void addValue_eg(const std::string &key, float value)
add a value related to the e-gamma algorithm for a TOB
Definition: eFEXOutputCollection.cxx:33
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::eFEXOutputCollection::addeFexNumber
void addeFexNumber(int)
add the eEFX number of a TOB
Definition: eFEXOutputCollection.cxx:77
athena.value
value
Definition: athena.py:122
LVL1::eFEXOutputCollection::m_dooutput
bool m_dooutput
if write Ntuple
Definition: eFEXOutputCollection.h:93
LVL1::eFEXOutputCollection::getEMtob
std::vector< uint32_t > getEMtob() const
get all e-gamma TOB words of an event
Definition: eFEXOutputCollection.cxx:92
python.sizes.location
string location
Definition: sizes.py:11
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
LVL1::eFEXOutputCollection::get_eg
std::map< std::string, float > * get_eg(int) const
get all e-gamma related values the ith TOB
Definition: eFEXOutputCollection.cxx:67
LVL1::eFEXOutputCollection::fill_tau
void fill_tau()
Save all tau values. Use only after finishing defining all tau values for one TOB.
Definition: eFEXOutputCollection.cxx:50
LVL1::eFEXOutputCollection::getdooutput
bool getdooutput() const
return to true if ntuple output is needed
Definition: eFEXOutputCollection.cxx:102
LVL1::eFEXOutputCollection::setdooutput
void setdooutput(bool)
setting to true if ntuple output is needed
Definition: eFEXOutputCollection.cxx:98
LVL1::eFEXOutputCollection::size
int size() const
get total number of eg TOBs saved
Definition: eFEXOutputCollection.cxx:62
LVL1::eFEXOutputCollection::clear
void clear()
Removes all values from the vectors for the next event.
Definition: eFEXOutputCollection.cxx:21
LVL1::eFEXOutputCollection::geteFexNumber
std::vector< int > geteFexNumber() const
get the eFEX numbers of all TOBs
Definition: eFEXOutputCollection.cxx:82
LVL1::eFEXOutputCollection::fill_eg
void fill_eg()
Save all e-gamma values. Use only after finishing defining all e-gamma values for one TOB.
Definition: eFEXOutputCollection.cxx:43
LVL1::eFEXOutputCollection::eFEXOutputCollection
eFEXOutputCollection()
constructor
Definition: eFEXOutputCollection.cxx:7
LVL1::eFEXOutputCollection::tau_size
int tau_size() const
get total number of tau TOBs saved
Definition: eFEXOutputCollection.cxx:57
LVL1::eFEXOutputCollection::addValue_tau
void addValue_tau(const std::string &key, float value)
define a value related to the tau algorithm for a TOB
Definition: eFEXOutputCollection.cxx:38
LVL1::eFEXOutputCollection::addEMtob
void addEMtob(uint32_t)
add a 32-bit e-gamma TOB word
Definition: eFEXOutputCollection.cxx:87
LVL1::eFEXOutputCollection::get_tau
std::map< std::string, float > * get_tau(int) const
get all tau related values the ith TOB
Definition: eFEXOutputCollection.cxx:72
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
LVL1::eFEXOutputCollection::~eFEXOutputCollection
~eFEXOutputCollection()
Destructor.
Definition: eFEXOutputCollection.cxx:11