54 return (mAddressDict[
type])[add];
59 return mAddressDict[
type];
69 return mNameDict[
type];
81 }
else if (
type == 1) {
83 }
else if (
type == 2) {
85 }
else if (
type == 3) {
88 LOG(error) <<
"You can select 0 (RU), 1 (ALPIDE), 2 (UBB), 3 (DeadMap)";
97 }
else if (
type ==
"ALPIDE") {
99 }
else if (
type ==
"UBB") {
101 }
else if (
type ==
"DeadMap") {
104 LOG(error) <<
"You can select RU (0), ALPIDE (1), UBB (2), DeadMap (3)";
120 return mRUConfAddLine;
124 return mRUConfValLine;
128 return mALPIDEConfAddLine;
132 return mALPIDEConfValLine;
148 const int mVerNameLine = 0;
149 const int mALPIDEConfAddLine = 1;
150 const int mALPIDEConfValLine = 2;
151 const int mRUConfAddLine = 3;
152 const int mRUConfValLine = 4;
153 const int mUBBNameLine = 5;
154 const int mUBBValLine = 6;
155 const int mDeadMapLine = 7;
157 std::string mVersion;
159 std::map<std::string, std::map<std::string, int>> mNameDict;
160 std::map<std::string, int> mNameDictRU;
161 std::map<std::string, int> mNameDictALPIDE;
162 std::map<std::string, int> mNameDictUBB;
164 std::map<std::string, std::map<int, std::string>> mAddressDict;
165 std::map<int, std::string> mAddressDictRU;
166 std::map<int, std::string> mAddressDictALPIDE;
167 std::map<int, std::string> mAddressDictUBB;
169 void initDictionary()
173 mNameDictALPIDE.clear();
174 mNameDictUBB.clear();
176 mAddressDict.clear();
177 mAddressDictRU.clear();
178 mAddressDictALPIDE.clear();
179 mAddressDictUBB.clear();
181 std::vector<std::pair<std::string, uint>> pairRU;
182 pairRU.push_back(std::make_pair(
"MANCHESTER", 1046));
183 pairRU.push_back(std::make_pair(
"ENABLE", 4096));
184 pairRU.push_back(std::make_pair(
"TRIGGER_PERIOD", 4097));
185 pairRU.push_back(std::make_pair(
"PULSE_nTRIGGER", 4098));
186 pairRU.push_back(std::make_pair(
"TRIGGER_MIN_DISTANCE", 4099));
187 pairRU.push_back(std::make_pair(
"OPCODE_GATING", 4101));
188 pairRU.push_back(std::make_pair(
"TRIGGER_DELAY", 4102));
189 pairRU.push_back(std::make_pair(
"ENABLE_PACKER_0", 4103));
190 pairRU.push_back(std::make_pair(
"ENABLE_PACKER_1", 4104));
191 pairRU.push_back(std::make_pair(
"ENABLE_PACKER_2", 4105));
192 pairRU.push_back(std::make_pair(
"TRIG_SOURCE", 4106));
193 pairRU.push_back(std::make_pair(
"TIMEOUT_TO_START", 5376));
194 pairRU.push_back(std::make_pair(
"TIMEOUT_TO_STOP", 5377));
195 pairRU.push_back(std::make_pair(
"TIMEOUT_IN_IDLE", 5378));
196 pairRU.push_back(std::make_pair(
"GBT_LOAD_BALANCING", 5631));
198 std::vector<std::pair<std::string, uint>> pairALPIDE;
199 pairALPIDE.push_back(std::make_pair(
"Mode_Control_Register", 1));
200 pairALPIDE.push_back(std::make_pair(
"FROMU_Configration_Register_1", 4));
201 pairALPIDE.push_back(std::make_pair(
"FROMU_Configration_Register_2", 5));
202 pairALPIDE.push_back(std::make_pair(
"FROMU_Configration_Register_3", 6));
203 pairALPIDE.push_back(std::make_pair(
"FROMU_Pulsing_Register_1", 7));
204 pairALPIDE.push_back(std::make_pair(
"FROMU_Pulsing_Register_2", 8));
205 pairALPIDE.push_back(std::make_pair(
"CMUandDMU_Configration_Register", 16));
206 pairALPIDE.push_back(std::make_pair(
"DTU_Configration_Register", 20));
207 pairALPIDE.push_back(std::make_pair(
"DTU_DACs_Register", 21));
208 pairALPIDE.push_back(std::make_pair(
"DTU_Test_Register_1", 24));
209 pairALPIDE.push_back(std::make_pair(
"DTU_Test_Register_2", 25));
210 pairALPIDE.push_back(std::make_pair(
"DTU_Test_Register_3", 26));
211 pairALPIDE.push_back(std::make_pair(
"VCASP", 1539));
212 pairALPIDE.push_back(std::make_pair(
"VCLIP", 1544));
213 pairALPIDE.push_back(std::make_pair(
"IBIAS", 1549));
214 pairALPIDE.push_back(std::make_pair(
"VPULSEH", 1541));
215 pairALPIDE.push_back(std::make_pair(
"VPULSEL", 1542));
216 pairALPIDE.push_back(std::make_pair(
"VRESETD", 1538));
217 pairALPIDE.push_back(std::make_pair(
"IDB", 1548));
218 pairALPIDE.push_back(std::make_pair(
"AUTO_ROF__NOISE_MASK__MASK_LEV__MC_HIT__MC_ID", 65535));
220 std::vector<std::pair<std::string, uint>> pairUBB;
222 for (
int iH = 0; iH <= 1; ++iH) {
223 for (
int iD = 0; iD <= 4; ++iD) {
224 for (
int iF = 0; iF <= 1; ++iF) {
225 for (
int iZ = 0; iZ <= 3; ++iZ) {
226 pairUBB.push_back(std::make_pair(Form(
"U_BB_H%dD%dF%dZ%d", iH, iD, iF, iZ), idUBB));
233 for (
int iRU = 0; iRU < pairRU.size(); ++iRU) {
234 std::pair<std::string, int> p = pairRU[iRU];
235 mAddressDictRU.emplace(p.second, p.first);
236 mNameDictRU.emplace(p.first, p.second);
238 for (
int iALPIDE = 0; iALPIDE < pairALPIDE.size(); ++iALPIDE) {
239 std::pair<std::string, int> p = pairALPIDE[iALPIDE];
240 mAddressDictALPIDE.emplace(p.second, p.first);
241 mNameDictALPIDE.emplace(p.first, p.second);
243 for (
int iUBB = 0; iUBB < pairUBB.size(); ++iUBB) {
244 std::pair<std::string, int> p = pairUBB[iUBB];
245 mAddressDictUBB.emplace(p.second, p.first);
246 mNameDictUBB.emplace(p.first, p.second);
249 mNameDict.emplace(
"RU", mNameDictRU);
250 mNameDict.emplace(
"ALPIDE", mNameDictALPIDE);
251 mNameDict.emplace(
"UBB", mNameDictUBB);
253 mAddressDict.emplace(
"RU", mAddressDictRU);
254 mAddressDict.emplace(
"ALPIDE", mAddressDictALPIDE);
255 mAddressDict.emplace(
"UBB", mAddressDictUBB);