ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::eFEXFPGATowerIdProvider Class Reference

Provide tower-FPGA mapping Load information stored in a .csv file and provide the IDs of all towers in an FPGA or an eFEX module. More...

#include <eFEXFPGATowerIdProvider.h>

Inheritance diagram for LVL1::eFEXFPGATowerIdProvider:
Collaboration diagram for LVL1::eFEXFPGATowerIdProvider:

Classes

struct  towerinfo
 Sturcture defines the id, eta and phi position of a tower. More...

Public Member Functions

 eFEXFPGATowerIdProvider (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor.
 ~eFEXFPGATowerIdProvider ()
 Destructor.
StatusCode initialize ()
 initialize the tool
StatusCode setAddress (const std::string &inputaddress)
 set path to the csv file and load
StatusCode getRankedTowerIDinFPGA (int eFEXID, int FPGAID, int(&towerlist)[10][6]) const
 obtain ordered tower IDs in an FPGA
StatusCode getRankedTowerIDineFEX (int eFEXID, int(&towerlist)[10][18]) const
 obtain ordered tower IDs in an eFEX
bool ifhaveinputfile () const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode rankTowerinFPGA (int FPGAindex)
 rank the tower ids in an FPGA This function determines the order of towers in an FPGA.
bool hasFPGA (int) const
 check if an FPGA exists in the csv file
StatusCode loadcsv ()
 load the mapping info in the csv file
int getFPGAIndex (int eFEXid, int FPGAid) const
 determine the index of an FPGA
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

bool m_hascsvfile {false}
 if the csv file is valid
std::vector< std::unique_ptr< std::vector< int > > > m_towerrankingcache
 Ordered tower Ids in each FPGAs. The index is the index of the FPGA.
std::unordered_map< int, std::unique_ptr< std::vector< towerinfo > > > m_alltowers
 Unordered tower Ids in each FPGAs. The index is the index of the FPGA.
std::string m_csvaddress
 path to the input csv file
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Provide tower-FPGA mapping Load information stored in a .csv file and provide the IDs of all towers in an FPGA or an eFEX module.

Definition at line 35 of file eFEXFPGATowerIdProvider.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ eFEXFPGATowerIdProvider()

LVL1::eFEXFPGATowerIdProvider::eFEXFPGATowerIdProvider ( const std::string & type,
const std::string & name,
const IInterface * parent )

Constructor.

Definition at line 12 of file eFEXFPGATowerIdProvider.cxx.

12 :
13 AthAlgTool(type, name, parent)
14{
15 declareInterface<eFEXFPGATowerIdProvider>(this);
16}
AthAlgTool()
Default constructor:

◆ ~eFEXFPGATowerIdProvider()

LVL1::eFEXFPGATowerIdProvider::~eFEXFPGATowerIdProvider ( )

Destructor.

Definition at line 27 of file eFEXFPGATowerIdProvider.cxx.

28{
29 m_alltowers.clear();
30 m_towerrankingcache.clear();
31}
std::vector< std::unique_ptr< std::vector< int > > > m_towerrankingcache
Ordered tower Ids in each FPGAs. The index is the index of the FPGA.
std::unordered_map< int, std::unique_ptr< std::vector< towerinfo > > > m_alltowers
Unordered tower Ids in each FPGAs. The index is the index of the FPGA.

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getFPGAIndex()

int LVL1::eFEXFPGATowerIdProvider::getFPGAIndex ( int eFEXid,
int FPGAid ) const
private

determine the index of an FPGA

Parameters
eFEXIDId of the eFEX module (0-23)
FPGAIDId of the FPGA (0-3)
Returns
FPGA index

Definition at line 283 of file eFEXFPGATowerIdProvider.cxx.

284{
285 // check the range of eFEX ID and FPGA ID
286 // There is supposed to be 24 eFex and each eFex
287 // contains 4 FPGAs.
288 if (FPGAid < 0 or FPGAid > 3) {
289 return -1;
290 }
291 if (eFEXid < 0 or FPGAid > 23) {
292 return -1;
293 }
294 return eFEXid * 4 + FPGAid;
295}

◆ getRankedTowerIDineFEX()

StatusCode LVL1::eFEXFPGATowerIdProvider::getRankedTowerIDineFEX ( int eFEXID,
int(&) towerlist[10][18] ) const

obtain ordered tower IDs in an eFEX

Parameters
eFEXIDId of the eFEX module (0-23)
towerlista 10*18 (phi*eta) array to store the output tower Ids
Returns
status code

Definition at line 84 of file eFEXFPGATowerIdProvider.cxx.

84 {
85 int FPGA0index{ getFPGAIndex(eFEXID, 0) };
86 int FPGA1index{ getFPGAIndex(eFEXID, 1) };
87 int FPGA2index{ getFPGAIndex(eFEXID, 2) };
88 int FPGA3index{ getFPGAIndex(eFEXID, 3) };
89 //
90 auto is_negative = [](int val){return val<0;};
91 if (std::ranges::any_of(std::initializer_list{FPGA0index, FPGA1index, FPGA2index, FPGA3index}, is_negative)){
92 return StatusCode::FAILURE;
93 }
94
95
96 if (!m_towerrankingcache[FPGA0index] || !m_towerrankingcache[FPGA1index] ||
97 !m_towerrankingcache[FPGA2index] || !m_towerrankingcache[FPGA3index]) {
98 for (int i{ 0 }; i < 10; i++) {
99 for (int j{ 0 }; j < 18; j++) {
100 towerlist[i][j] = 0;
101 }
102 }
103 ATH_MSG_ERROR("FPGA mapping info missing.");
104 return StatusCode::FAILURE;
105 }
106
107 // FPGA0
108 int vectorindex{ 0 };
109 for (int i{ 0 }; i < 10; i++) {
110 for (int j{ 0 }; j < 6; j++) {
111 towerlist[i][j] = (*m_towerrankingcache[FPGA0index]).at(vectorindex++);
112 }
113 }
114
115 // fPGA1 skipping overlap with FPGA0 and FPGA2
116 vectorindex = 0;
117 for (int i{ 0 }; i < 10; i++) {
118 vectorindex += 2;
119 for (int j{ 2 }; j < 4; j++) {
120 towerlist[i][j + 4] = (*m_towerrankingcache[FPGA1index]).at(vectorindex++);
121 }
122 vectorindex += 2;
123 }
124
125 // FPGA2
126 vectorindex = 0;
127 for (int i{ 0 }; i < 10; i++) {
128 for (int j{ 0 }; j < 6; j++) {
129 towerlist[i][j + 8] = (*m_towerrankingcache[FPGA2index]).at(vectorindex++);
130 }
131 }
132
133 // FPGA4 skipping overlap with FPGA2
134 vectorindex = 0;
135 for (int i{ 0 }; i < 10; i++) {
136 vectorindex += 2;
137 for (int j{ 2 }; j < 6; j++) {
138 towerlist[i][j + 12] = (*m_towerrankingcache[FPGA3index]).at(vectorindex++);
139 }
140 }
141 return StatusCode::SUCCESS;
142}
#define ATH_MSG_ERROR(x)
int getFPGAIndex(int eFEXid, int FPGAid) const
determine the index of an FPGA

◆ getRankedTowerIDinFPGA()

StatusCode LVL1::eFEXFPGATowerIdProvider::getRankedTowerIDinFPGA ( int eFEXID,
int FPGAID,
int(&) towerlist[10][6] ) const

obtain ordered tower IDs in an FPGA

Parameters
eFEXIDId of the eFEX module (0-23)
FPGAIDId of the FPGA (0-3)
towerlista 10*6 (phi*eta) array to store the output tower Ids
Returns
status code

Definition at line 59 of file eFEXFPGATowerIdProvider.cxx.

59 {
60 int FPGAindex{ getFPGAIndex(eFEXID, FPGAID) };
61 if (FPGAindex<0) return StatusCode::FAILURE;
62 if (m_towerrankingcache[FPGAindex]) {
63 // obtain the tower order from cache
64 int vectorindex{ 0 };
65 for (int i{ 0 }; i < 10; i++) {
66 for (int j{ 0 }; j < 6; j++) {
67 towerlist[i][j] = (*m_towerrankingcache[FPGAindex]).at(vectorindex++);
68 }
69 }
70 }
71 // set tower ids to 0 if the information about the FPGA stored in the .csv file is damaged
72 else {
73 for (int i{ 0 }; i < 10; i++) {
74 for (int j{ 0 }; j < 6; j++) {
75 towerlist[i][j] = 0;
76 }
77 }
78 ATH_MSG_ERROR("FPGA mapping info missing.");
79 return StatusCode::FAILURE;
80 }
81 return StatusCode::SUCCESS;
82}

◆ hasFPGA()

bool LVL1::eFEXFPGATowerIdProvider::hasFPGA ( int FPGAindex) const
private

check if an FPGA exists in the csv file

Definition at line 190 of file eFEXFPGATowerIdProvider.cxx.

191{
192 // check if the info of a speific FPGA has been loaded or not
193 return m_alltowers.contains(FPGAindex);
194}

◆ ifhaveinputfile()

bool LVL1::eFEXFPGATowerIdProvider::ifhaveinputfile ( ) const

Definition at line 144 of file eFEXFPGATowerIdProvider.cxx.

144 {
145 return m_hascsvfile;
146}
bool m_hascsvfile
if the csv file is valid

◆ initialize()

StatusCode LVL1::eFEXFPGATowerIdProvider::initialize ( )

initialize the tool

Definition at line 18 of file eFEXFPGATowerIdProvider.cxx.

19{
20 std::string csvpath = PathResolver::find_file("tower_fpga_efex_map.csv", "DATAPATH");
21 if (setAddress(csvpath) == StatusCode::FAILURE) {
22 ATH_MSG_WARNING("tower_fpga_efex_map.csv missing or invalid. Swiching to hard-coded mapping.");
23 };
24 return StatusCode::SUCCESS;
25}
#define ATH_MSG_WARNING(x)
StatusCode setAddress(const std::string &inputaddress)
set path to the csv file and load
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & LVL1::eFEXFPGATowerIdProvider::interfaceID ( )
inlinestatic

Definition at line 48 of file eFEXFPGATowerIdProvider.h.

static const InterfaceID IID_IIeFEXFPGATowerIdProvider("LVL1::eFEXFPGATowerIdProvider", 1, 0)

◆ loadcsv()

StatusCode LVL1::eFEXFPGATowerIdProvider::loadcsv ( )
private

load the mapping info in the csv file

Definition at line 196 of file eFEXFPGATowerIdProvider.cxx.

197{
198 // read the .csv file line by line
199 std::string eachline;
200 std::ifstream myfile(m_csvaddress);
201 if (myfile.is_open()) {
202 while (std::getline(myfile, eachline)) {
203 // ignore text after #
204 std::string::size_type ipos = eachline.find("#");
205 if (ipos!=std::string::npos) eachline.resize(ipos);
206
207 // prevent reading lines with only white spaces
208 if (std::all_of(eachline.begin(), eachline.end(), ::isspace)) {
209 continue;
210 }
211
212 // ignore lines with non-digit characters
213 auto validchar = [](char ch) { return (::isspace(ch) || ::isdigit(ch) || ch==','); };
214 if (!std::all_of(eachline.begin(), eachline.end(), validchar)) {
215 ATH_MSG_INFO("invalid line '" << eachline << "'");
216 break;
217 }
218
219 // split lines in the .csv file by comma
220 std::stringstream eachline_stream(eachline);
221 std::vector<int> numbers_in_eachline;
222 while (eachline_stream.good()) {
223 std::string tem_string;
224 std::getline(eachline_stream, tem_string, ',');
225 try {
226 numbers_in_eachline.push_back(std::stoi(tem_string));
227 }
228 catch (...) {
229 ATH_MSG_WARNING( "Invalid input in tower_fpga_efex_map.csv." );
230 return StatusCode::FAILURE;
231 }
232 }
233
234 // There is supposed to be 5 numbers in each line:
235 // eFEX ID, FPGA ID, eTower ID, eta, phi
236 if (numbers_in_eachline.size() != 5) {
237 ATH_MSG_WARNING( "Invalid input in tower_fpga_efex_map.csv." );
238 return StatusCode::FAILURE;
239 }
240 // eta and phi are supposed to be positive
241 if (numbers_in_eachline[3] < 0 || numbers_in_eachline[4] < 0) {
242 ATH_MSG_WARNING("Invalid input in tower_fpga_efex_map.csv.");
243 // return scodefail
244 return StatusCode::FAILURE;
245 }
246 int FPGAindex = getFPGAIndex(numbers_in_eachline[0], numbers_in_eachline[1]);
247 // check the range of eFEX ID and FPGA ID
248 if (FPGAindex == -1) {
249 ATH_MSG_WARNING("Invalid input in tower_fpga_efex_map.csv.");
250 return StatusCode::FAILURE;
251 }
252 towerinfo tem_towerinfo;
253 tem_towerinfo.eTowerID = numbers_in_eachline[2];
254 // determine the sign of eta using the tower id
255 // positive: 200000-299999, 400000-499999, 600000-699999
256 // negative: 100000-199999, 300000-399999, 500000-599999
257 int etasign;
258 if (int(numbers_in_eachline[2] / 100000) % 2 != 0) {
259 etasign = -1;
260 } else {
261 etasign = 1;
262 }
263 tem_towerinfo.eTowerEta = etasign * (numbers_in_eachline[3]);
264 tem_towerinfo.eTowerPhi = numbers_in_eachline[4];
265
266 // Create a key for the FPGA if the the FPGA key is not
267 // avaliable in the m_alltowers hash table object yet.
268 // Otherwise append the tower to the existing bucket.
269 if (hasFPGA(FPGAindex)) {
270 m_alltowers[FPGAindex]->push_back(tem_towerinfo);
271 } else {
272 m_alltowers[FPGAindex] = std::make_unique<std::vector<towerinfo>>(std::vector{tem_towerinfo});
273 }
274 }
275 myfile.close();
276 } else {
277 ATH_MSG_WARNING("Unable to open share/tower_fpga_efex_map.csv.");
278 return StatusCode::FAILURE;
279 }
280 return StatusCode::SUCCESS;
281}
#define ATH_MSG_INFO(x)
bool hasFPGA(int) const
check if an FPGA exists in the csv file
std::string m_csvaddress
path to the input csv file
Sturcture defines the id, eta and phi position of a tower.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ rankTowerinFPGA()

StatusCode LVL1::eFEXFPGATowerIdProvider::rankTowerinFPGA ( int FPGAindex)
private

rank the tower ids in an FPGA This function determines the order of towers in an FPGA.

Towers are sorted using eta and phi, and then store the result in m_towerrankingcache object for future use.

Parameters
FPGAindexindex of the FPGA
Returns
status code
See also
getFPGAIndex

Definition at line 148 of file eFEXFPGATowerIdProvider.cxx.

149{
150 // This function determines the order of towers in an FPGA.
151 // Towers are sorted using eta and phi, and
152 // then store the result in m_towerrankingcache object for future use.
153 if (FPGAindex < 0) return StatusCode::FAILURE;
154 // If the tower order of an FPGA has not been determined yet, start sorting.
155 if (!m_towerrankingcache[FPGAindex]) {
156 std::vector<std::pair<int, int>> rankingmap;
157 // the row order is determined by eta while the column order is determined by phi
158 for (auto each : *m_alltowers[FPGAindex]) {
159 if (each.eTowerPhi < 3 && each.eTowerPhi > -1 && FPGAindex >= getFPGAIndex(21, 0)) {
160 rankingmap.push_back(std::pair<int, int>(-each.eTowerEta - (90 + each.eTowerPhi) * 100, each.eTowerID));
161 } else {
162 rankingmap.push_back(std::pair<int, int>(-each.eTowerEta - each.eTowerPhi * 100, each.eTowerID));
163 }
164 }
165 // There is supposed to be 60 towers in each FPGA
166 if (rankingmap.size() != 60) {
167 return StatusCode::FAILURE;
168 }
169 std::sort(rankingmap.begin(), rankingmap.end(),
170 [](std::pair<int, int> a, std::pair<int, int> b) {
171 // tower around eta == 0 has the same eta.
172 if (a.first == b.first) {
173 return (a.second < b.second);
174 }
175 return (a.first > b.first);
176 });
177 auto output = std::make_unique<std::vector<int>>();
178 output->reserve(60);
179 int vectorindex = 0;
180 for (int i{ 0 }; i < 10; i++) {
181 for (int j{ 0 }; j < 6; j++) {
182 output->push_back(rankingmap[vectorindex++].second);
183 }
184 }
185 m_towerrankingcache[FPGAindex] = std::move(output);
186 }
187 return StatusCode::SUCCESS;
188}
static Double_t a
output
Definition merge.py:16
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setAddress()

StatusCode LVL1::eFEXFPGATowerIdProvider::setAddress ( const std::string & inputaddress)

set path to the csv file and load

Definition at line 33 of file eFEXFPGATowerIdProvider.cxx.

34{
35 if (inputaddress.empty()) {
36 m_hascsvfile = false;
37 return StatusCode::FAILURE;
38 }
39 m_hascsvfile = true;
40 m_csvaddress = inputaddress;
41 if (loadcsv() == StatusCode::FAILURE) {
42 m_hascsvfile = false;
43 return StatusCode::FAILURE;
44 }
45 m_towerrankingcache.clear();
46 m_towerrankingcache.resize(96);
47 // sort the towers in each FPGA
48 for (int efex{ 0 }; efex < 24; efex++) {
49 for (int fpga{ 0 }; fpga < 4; fpga++) {
50 if (rankTowerinFPGA(getFPGAIndex(efex, fpga)) == StatusCode::FAILURE) {
51 m_hascsvfile = false;
52 return StatusCode::FAILURE;
53 }
54 }
55 }
56 return StatusCode::SUCCESS;
57}
StatusCode loadcsv()
load the mapping info in the csv file
StatusCode rankTowerinFPGA(int FPGAindex)
rank the tower ids in an FPGA This function determines the order of towers in an FPGA.

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_alltowers

std::unordered_map<int, std::unique_ptr<std::vector<towerinfo> > > LVL1::eFEXFPGATowerIdProvider::m_alltowers
private

Unordered tower Ids in each FPGAs. The index is the index of the FPGA.

See also
getFPGAIndex

Definition at line 107 of file eFEXFPGATowerIdProvider.h.

◆ m_csvaddress

std::string LVL1::eFEXFPGATowerIdProvider::m_csvaddress
private

path to the input csv file

Definition at line 126 of file eFEXFPGATowerIdProvider.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_hascsvfile

bool LVL1::eFEXFPGATowerIdProvider::m_hascsvfile {false}
private

if the csv file is valid

Definition at line 86 of file eFEXFPGATowerIdProvider.h.

86{false};

◆ m_towerrankingcache

std::vector<std::unique_ptr<std::vector<int> > > LVL1::eFEXFPGATowerIdProvider::m_towerrankingcache
private

Ordered tower Ids in each FPGAs. The index is the index of the FPGA.

See also
getFPGAIndex

Definition at line 104 of file eFEXFPGATowerIdProvider.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: