ATLAS Offline Software
MuonIntToStrName.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 //Function converting from ATHENA identifier int StationName, std::string ChamberType
8 //to the corresponding ATHENA identifier std::string StationName
9 std::string convertIntToStrName(int ChamberNameInt, const std::string& ChamberType) {
10 
11  //Input values
12  int Name_int = ChamberNameInt;
13 
14  //add type
15  //"MDT","CSC","TGC" go in the same loop while
16  //"RPC" go to a different loop due to the same
17  //naming with "MDT"
18  const std::string& Type=ChamberType;
19 
20 
21  //Set string variables
22  std::string Name_str;
23 
24 
25  if (Type=="MDT" || Type=="CSC" || Type=="TGC"){
26  //Switch from ATHENA int name to Hardware string name
27  if (Name_int == 0) Name_str="BIL";
28  else if (Name_int == 1) Name_str="BIS";
29  else if (Name_int == 2) Name_str="BML";
30  else if (Name_int == 3) Name_str="BMS";
31  else if (Name_int == 4) Name_str="BOL";
32  else if (Name_int == 5) Name_str="BOS";
33  else if (Name_int == 6) Name_str="BEE";
34  else if (Name_int == 7) Name_str="BIR";
35  else if (Name_int == 8) Name_str="BMF";
36  else if (Name_int == 9) Name_str="BOF";
37  else if (Name_int == 10) Name_str="BOG";
38  else if (Name_int == 11) Name_str="BOH";
39  else if (Name_int == 12) Name_str="EIC";
40  else if (Name_int == 13) Name_str="EIL";
41  else if (Name_int == 14) Name_str="EEL";
42  else if (Name_int == 15) Name_str="EES";
43  else if (Name_int == 16) Name_str="EMC";
44  else if (Name_int == 17) Name_str="EML";
45  else if (Name_int == 18) Name_str="EMS";
46  else if (Name_int == 19) Name_str="EOC";
47  else if (Name_int == 20) Name_str="EOL";
48  else if (Name_int == 21) Name_str="EOS";
49  else if (Name_int == 22) Name_str="T1C";
50  else if (Name_int == 23) Name_str="T1L";
51  else if (Name_int == 24) Name_str="T1S";
52  else if (Name_int == 25) Name_str="T2C";
53  else if (Name_int == 26) Name_str="T2L";
54  else if (Name_int == 27) Name_str="T2S";
55  else if (Name_int == 28) Name_str="T3C";
56  else if (Name_int == 29) Name_str="T3L";
57  else if (Name_int == 30) Name_str="T3S";
58  else if (Name_int == 31) Name_str="CI1";
59  else if (Name_int == 32) Name_str="CI2";
60  else if (Name_int == 33) Name_str="CI3";
61  else if (Name_int == 34) Name_str="CI4";
62  else if (Name_int == 35) Name_str="FIL";
63  else if (Name_int == 36) Name_str="FIS";
64  else if (Name_int == 37) Name_str="FML";
65  else if (Name_int == 38) Name_str="FMS";
66  else if (Name_int == 39) Name_str="FOL";
67  else if (Name_int == 40) Name_str="FOS";
68  else if (Name_int == 41) Name_str="T1F";
69  else if (Name_int == 42) Name_str="T1E";
70  else if (Name_int == 43) Name_str="T2F";
71  else if (Name_int == 44) Name_str="T2E";
72  else if (Name_int == 45) Name_str="T3F";
73  else if (Name_int == 46) Name_str="T3E";
74  else if (Name_int == 47) Name_str="T4F";
75  else if (Name_int == 48) Name_str="T4E";
76  else if (Name_int == 49) Name_str="EIS";
77  else if (Name_int == 50) Name_str="CSS";
78  else if (Name_int == 51) Name_str="CSL";
79  else if (Name_int == 52) Name_str="BIM";
80  else Name_str = "XXX";
81 
82  } else if (Type=="RPC") {
83  if (Name_int == 2) Name_str="BML";
84  else if (Name_int == 3) Name_str="BMS";
85  else if (Name_int == 4) Name_str="BOL";
86  else if (Name_int == 5) Name_str="BOS";
87  else if (Name_int == 8) Name_str="BMF";
88  else if (Name_int == 9) Name_str="BOF";
89  else if (Name_int == 10) Name_str="BOG";
90  else Name_str = "XXX";
91  } else {Name_str = "XXX";}
92 
93  //Return int StationName
94 
95  return Name_str;
96 
97 }
xAODType
Definition: ObjectType.h:13
convertIntToStrName
std::string convertIntToStrName(int ChamberNameInt, const std::string &ChamberType)
Definition: MuonIntToStrName.cxx:9
MuonStrToIntName.h