16#ifndef EFEXFPGATOWERIDPROVIDER_H
17#define EFEXFPGATOWERIDPROVIDER_H
23#include <unordered_map>
59 StatusCode
setAddress(
const std::string& inputaddress);
107 std::unordered_map<int, std::unique_ptr<std::vector<towerinfo>> >
m_alltowers;
StatusCode loadcsv()
load the mapping info in the csv file
bool hasFPGA(int) const
check if an FPGA exists in the csv file
std::vector< std::unique_ptr< std::vector< int > > > m_towerrankingcache
Ordered tower Ids in each FPGAs. The index is the index of the FPGA.
StatusCode initialize()
initialize the tool
static const InterfaceID & interfaceID()
bool m_hascsvfile
if the csv file is valid
StatusCode rankTowerinFPGA(int FPGAindex)
rank the tower ids in an FPGA This function determines the order of towers in an FPGA.
int getFPGAIndex(int eFEXid, int FPGAid) const
determine the index of an 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.
StatusCode getRankedTowerIDinFPGA(int eFEXID, int FPGAID, int(&towerlist)[10][6]) const
obtain ordered tower IDs in an FPGA
bool ifhaveinputfile() const
StatusCode getRankedTowerIDineFEX(int eFEXID, int(&towerlist)[10][18]) const
obtain ordered tower IDs in an eFEX
std::string m_csvaddress
path to the input csv file
~eFEXFPGATowerIdProvider()
Destructor.
eFEXFPGATowerIdProvider(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
StatusCode setAddress(const std::string &inputaddress)
set path to the csv file and load
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
static const InterfaceID IID_IIeFEXFPGATowerIdProvider("LVL1::eFEXFPGATowerIdProvider", 1, 0)
Sturcture defines the id, eta and phi position of a tower.
int eTowerEta
tower Eta index
int eTowerPhi
tower Phi index