ATLAS Offline Software
EfexHardwareInfo.cxx
Go to the documentation of this file.
1 #include <iostream>
2 #include <string>
5 :m_valid(false), m_efexlabel("invalid") , m_fibre(-1), m_inputconnector(-1),
6 m_mpodlabel("invalid")
7 {
8 }
9 EfexHardwareInfo::EfexHardwareInfo(std::string efexlabel,
10  int fibre,
11  int inputconnector,
12  std::string mpod)
13 :m_valid(true), m_efexlabel(efexlabel) , m_fibre(fibre), m_inputconnector(inputconnector),
14 m_mpodlabel(mpod),m_overlap(-99)
15 {
16 }
17 std::string EfexHardwareInfo::getEFEXLabel() const
18 {
19  return m_efexlabel;
20 }
22 {
23  return m_fibre;
24 }
26 {
27  return 11-(m_fibre)%12; // Ribbon fibre # flip (hopefully right!)
28 }
30 {
31  return m_inputconnector;
32 }
34 {
35  int mpodnum = int(m_mpodlabel.at(1)) -48;
36  if (m_mpodlabel.at(0) == 'H') mpodnum += 10;
37  return mpodnum;
38 }
39 std::string EfexHardwareInfo::getMpodLabel() const
40 {
41  return m_mpodlabel;
42 }
44 {
45  return m_valid;
46 }
48 {
49  m_overlap = overlap;
50 }
52 {
53  return m_overlap;
54 }
56 {
57  std::cout << "EfexHardwareInfo Object:" << std::endl;
58  if(m_valid){
59  std::cout << "EFEX: " << this->getEFEXLabel() << std::endl;
60  std::cout << "Fibre: " << std::to_string(this->getFibreNumber()) << std::endl;
61  std::cout << "Input Connector: " << std::to_string(this->getInputConnector()) << std::endl;
62  std::cout << "MpodLabel: " << this->getMpodLabel() << std::endl;
63  }
64  else{
65  std::cout << "Invalid/Unused Connection" << std::endl;
66  }
67  std::cout << std::endl;
68 }
EfexHardwareInfo::getMpodNumber
int getMpodNumber() const
Definition: EfexHardwareInfo.cxx:33
EfexHardwareInfo::getMpodLabel
std::string getMpodLabel() const
Definition: EfexHardwareInfo.cxx:39
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
EfexHardwareInfo::m_efexlabel
std::string m_efexlabel
Definition: EfexHardwareInfo.h:28
EfexHardwareInfo::m_valid
bool m_valid
Definition: EfexHardwareInfo.h:27
EfexHardwareInfo::getEFEXLabel
std::string getEFEXLabel() const
Definition: EfexHardwareInfo.cxx:17
EfexHardwareInfo.h
EfexHardwareInfo::EfexHardwareInfo
EfexHardwareInfo()
Definition: EfexHardwareInfo.cxx:4
EfexHardwareInfo::m_fibre
int m_fibre
Definition: EfexHardwareInfo.h:29
EfexHardwareInfo::m_overlap
int m_overlap
Definition: EfexHardwareInfo.h:32
EfexHardwareInfo::getInputConnector
int getInputConnector() const
Definition: EfexHardwareInfo.cxx:29
EfexHardwareInfo::getFibreNumber
int getFibreNumber() const
Definition: EfexHardwareInfo.cxx:21
EfexHardwareInfo::getRibbonFibreNumber
int getRibbonFibreNumber() const
Definition: EfexHardwareInfo.cxx:25
EfexHardwareInfo::m_inputconnector
int m_inputconnector
Definition: EfexHardwareInfo.h:30
EfexHardwareInfo::printInfo
void printInfo() const
Definition: EfexHardwareInfo.cxx:55
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
EfexHardwareInfo::getValidity
bool getValidity() const
Definition: EfexHardwareInfo.cxx:43
EfexHardwareInfo::setOverlap
void setOverlap(int overlap)
Definition: EfexHardwareInfo.cxx:47
EfexHardwareInfo::m_mpodlabel
std::string m_mpodlabel
Definition: EfexHardwareInfo.h:31
EfexHardwareInfo::getOverlap
int getOverlap() const
Definition: EfexHardwareInfo.cxx:51