Belle II Software development
ECLChannelMapper Class Referencefinal

This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbobject/include/ECLChannelMap.h). More...

#include <ECLChannelMapper.h>

Public Member Functions

 ECLChannelMapper ()
 Default constructor.
 
 ~ECLChannelMapper ()
 Default destructor.
 
bool initFromFile ()
 Initialize channel mapper using data stored in default location.
 
bool initFromFile (const char *eclMapFile)
 Initialize channel mapper using data stored in the ASCII file.
 
bool initFromDB ()
 Initialize channel mapper from the conditions database.
 
ECLChannelMap getDBObject ()
 Convert internal data to ECLChannelMap database object.
 
int getCrateID (int iCOPPERNode, int iFINESSE, bool pcie40=false)
 Get crate number by given COPPER node number and FINESSE number.
 
int getCellId (int iCrate, int iShaper, int iChannel)
 Get CellId by given crate number, shaper position in the crate and DSP channel number in the shaper.
 
int getCOPPERNode (int iCrate)
 Get number of COPPER node by given crate number.
 
int getFINESSE (int iCrate)
 Get number of FINESSE (0/1) in COPPER by given crate number.
 
int getSubSystem (int iCrate)
 Get ECL subsystem ID by given crate number: 0 – barrel, 1 – forward. 2 – backward endcap.
 
int getCrateID (int cellID)
 Get crate number by given CellId.
 
int getShaperPosition (int cellID)
 Get position of the shaper in the crate by given CellId.
 
int getShaperChannel (int cellID)
 Get number of DSP channel in the shaper by given number of CellId.
 
int getElectronicsID (int cellID)
 Return channel index in ECLChannelMap.
 
int getNShapersInCrate (int iCrate)
 Get number of ShaperDSP modules in the given VME crate number.
 
 ClassDef (ECLChannelMapper, 1)
 ClassDef.
 

Static Public Member Functions

static ECLChannelMappergetInstance (bool use_db=true)
 Return main instance of ECLChannelMapper.
 

Private Attributes

bool isInitialized
 initialization flag
 
int convertArrayBarrel [ECL_BARREL_CRATES *ECL_BARREL_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
 convert (iCrate, iShaper, iChannel) to CellId for Barrel ECL
 
int convertArrayFWD [ECL_FWD_CRATES *ECL_FWD_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
 convert (iCrate, iShaper, iChannel) to CellId for Forward endcap
 
int convertArrayBKW [ECL_BKW_CRATES *ECL_BKW_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
 convert (iCrate, iShaper, iChannel) to CellId Backward endcap
 
int convertArrayInv [ECL_TOTAL_CHANNELS][3]
 convert CellId to (iCrate, iShaper, iChannel)
 

Static Private Attributes

static ECLChannelMapperinstance = nullptr
 Main instance of ECLChannelMapper.
 

Detailed Description

This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbobject/include/ECLChannelMap.h).

b) (** NOT SUPPORTED **) Loaded from the text file (standard location is FileSystem::findFile("ecl/data/ecl_channels_map.txt"))

Please note that (a) is recommended and (b) should be used only for very specific rare cases (such as prepation of new ECLChannelMap payloads)

Definition at line 29 of file ECLChannelMapper.h.

Constructor & Destructor Documentation

◆ ECLChannelMapper()

Default constructor.

Definition at line 25 of file ECLChannelMapper.cc.

26{
27 int i;
28 for (i = 0; i < ECL_BARREL_CRATES * ECL_BARREL_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER; i++)
29 convertArrayBarrel[i] = 0;
30 for (i = 0; i < ECL_FWD_CRATES * ECL_FWD_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER; i++)
31 convertArrayFWD[i] = 0;
32 for (i = 0; i < ECL_BKW_CRATES * ECL_BKW_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER; i++)
33 convertArrayBKW[i] = 0;
34 for (i = 0; i < ECL_TOTAL_CHANNELS; i++)
35 for (int j = 0; j < 3; j++)
36 convertArrayInv[i][j] = 0;
37
38 isInitialized = false;
39
40}
bool isInitialized
initialization flag
int convertArrayFWD[ECL_FWD_CRATES *ECL_FWD_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
convert (iCrate, iShaper, iChannel) to CellId for Forward endcap
int convertArrayBKW[ECL_BKW_CRATES *ECL_BKW_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
convert (iCrate, iShaper, iChannel) to CellId Backward endcap
int convertArrayInv[ECL_TOTAL_CHANNELS][3]
convert CellId to (iCrate, iShaper, iChannel)
int convertArrayBarrel[ECL_BARREL_CRATES *ECL_BARREL_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
convert (iCrate, iShaper, iChannel) to CellId for Barrel ECL

◆ ~ECLChannelMapper()

~ECLChannelMapper ( )
inline

Default destructor.

Definition at line 49 of file ECLChannelMapper.h.

49{}

Member Function Documentation

◆ getCellId()

int getCellId ( int  iCrate,
int  iShaper,
int  iChannel 
)

Get CellId by given crate number, shaper position in the crate and DSP channel number in the shaper.

Definition at line 290 of file ECLChannelMapper.cc.

291{
292 // iCrate = 1 - 36 -- Barrel
293 // 37 - 44 -- Forward
294 // 45 - 52 -- Backward
295 int cellID = 0;
296 int arrayIndex;
297
298 if (iCrate < 1 || iCrate > 52) return -1;
299 if (iShaper < 1 || iShaper > 12) return -1;
300 if (iChannel < 1 || iChannel > 16) return -1;
301
302 if (iCrate >= 1 && iCrate <= 36) {
303 //int thetaID = 1 + (iShaper - 1) * 4 + (iChannel - 1) % 4;
304 //int phiID = 1 + (iCrate - 1) * 4 + (iChannel - 1) / 4;
305 //cellID = 1 + ECL_FWD_CHANNELS + (phiID - 1) + (thetaID - 1) * 144;
306
307 arrayIndex = (iCrate - 1) * ECL_BARREL_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER
308 + (iShaper - 1) * ECL_CHANNELS_IN_SHAPER + (iChannel - 1);
309 cellID = convertArrayBarrel[arrayIndex];
310
311 }
312
313 if (iCrate > 36 && iCrate < 45) {
314 arrayIndex = (iCrate - 37) * ECL_FWD_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER
315 + (iShaper - 1) * ECL_CHANNELS_IN_SHAPER + (iChannel - 1);
316 cellID = convertArrayFWD[arrayIndex];
317 }
318
319 if (iCrate > 44) {
320 arrayIndex = (iCrate - 45) * ECL_BKW_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER
321 + (iShaper - 1) * ECL_CHANNELS_IN_SHAPER + (iChannel - 1);
322 cellID = convertArrayBKW[arrayIndex];
323 }
324
325
326 return cellID;
327}

◆ getCOPPERNode()

int getCOPPERNode ( int  iCrate)

Get number of COPPER node by given crate number.

Definition at line 379 of file ECLChannelMapper.cc.

380{
381 int systemID, iNode, iCOPPERNode;
382
383 if (iCrate < 1 || iCrate > ECL_CRATES) return -1;
384 systemID = (iCrate <= ECL_BARREL_CRATES) * BECL_ID + (iCrate > ECL_BARREL_CRATES) * EECL_ID;
385 iNode = (iCrate <= ECL_BARREL_CRATES) ? (iCrate - 1) / 2 : (iCrate - ECL_BARREL_CRATES - 1) % 8;
386 iCOPPERNode = systemID + iNode + 1;
387
388 return iCOPPERNode;
389}

◆ getCrateID() [1/2]

int getCrateID ( int  cellID)

Get crate number by given CellId.

Definition at line 328 of file ECLChannelMapper.cc.

329{
330 if (cellID > 0 && cellID <= ECL_TOTAL_CHANNELS) {
331 return convertArrayInv[cellID - 1 ][0];
332 } else return -1;
333}

◆ getCrateID() [2/2]

int getCrateID ( int  iCOPPERNode,
int  iFINESSE,
bool  pcie40 = false 
)

Get crate number by given COPPER node number and FINESSE number.

Parameters
iCOPPERNodeNode ID (26 nodes in COPPER case, 3 nodes in PCIe40 case)
iFINESSEChannel number (0 or 1 in COPPER case, 0-17 in PCIe40 case)
pcie40Set to true if unpacking PCIe40 data

Definition at line 233 of file ECLChannelMapper.cc.

234{
235 int iCrate;
236
237 if (!pcie40) {
238 // Converting from COPPER nodes
239 if (iFINESSE > ECL_FINESSES_IN_COPPER - 1) {
240 B2ERROR("ECLChannelMapper::ERROR:: wrong FINESSE " << iFINESSE);
241 return -1;
242 }
243
244 if ((iCOPPERNode & BECL_ID) == BECL_ID) {
245 iCrate = (iCOPPERNode - BECL_ID - 1) * ECL_FINESSES_IN_COPPER + iFINESSE + 1;
246 } else if ((iCOPPERNode & EECL_ID) == EECL_ID) {
247 iCrate = ECL_BARREL_CRATES + iFINESSE * ECL_FWD_CRATES + (iCOPPERNode - EECL_ID - 1) + 1;
248 } else {
249 B2ERROR("ECLChannelMapper::ERROR:: wrong COPPER NodeID 0x" << std::hex << iCOPPERNode << " BECL_ID 0x" << BECL_ID << " EECL_ID 0x"
250 << EECL_ID);
251 return -1;
252 }
253 } else {
254 // Converting from PCIe40 nodes
255 const int ECL_BARREL_FEE_IN_PCIE40 = 18;
256 const int ECL_ENDCAP_FEE_IN_PCIE40 = 16;
257
258 // crates 1..18 -> PCIe40, #1
259 // crates 19..36 -> PCIe40, #2
260 // crates 37,45,38,46,..,44,52 -> PCIe40, #3
261
262 if (iCOPPERNode == BECL_ID + 1 || iCOPPERNode == BECL_ID + 2) {
263 // Barrel crates
264 iCrate = (iCOPPERNode - BECL_ID - 1) * ECL_BARREL_FEE_IN_PCIE40 + iFINESSE + 1;
265 if (iFINESSE >= ECL_BARREL_FEE_IN_PCIE40) {
266 B2ERROR("ECLChannelMapper:: slot id must be less than 18, got slot id " << iFINESSE);
267 return -1;
268 }
269 } else if (iCOPPERNode == BECL_ID + 3) {
270 // Endcap crates
271 iCrate = 2 * ECL_BARREL_FEE_IN_PCIE40 + (iFINESSE % 2) * 8 + iFINESSE / 2 + 1;
272 if (iFINESSE >= ECL_ENDCAP_FEE_IN_PCIE40) {
273 B2ERROR("ECLChannelMapper:: slot id must be less than 16, got slot id " << iFINESSE);
274 return -1;
275 }
276 } else {
277 B2ERROR("ECLChannelMapper:: wrong COPPER NodeID 0x" << std::hex << iCOPPERNode << " expected BECL_ID 0x" << BECL_ID);
278 return -1;
279 }
280 }
281
282 if (iCrate > ECL_CRATES || iCrate < 1) {
283 B2ERROR("ECLChannelMapper::getCrateID::ERROR:: wrong crate number " << iCrate << " return -1");
284 return -1;
285 }
286
287 return iCrate;
288}

◆ getDBObject()

ECLChannelMap getDBObject ( )

Convert internal data to ECLChannelMap database object.

Definition at line 205 of file ECLChannelMapper.cc.

206{
207 ECLChannelMap map;
208
209 if (!isInitialized) {
210 B2FATAL("ECLChannelMapper:: Tried to generate dbobject before initialization");
211 }
212
213 int mappingBAR_size = ECL_BARREL_CRATES * ECL_BARREL_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
214 int mappingFWD_size = ECL_FWD_CRATES * ECL_FWD_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
215 int mappingBWD_size = ECL_BKW_CRATES * ECL_BKW_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
216
217 std::vector<int> mappingBAR(mappingBAR_size);
218 std::vector<int> mappingFWD(mappingFWD_size);
219 std::vector<int> mappingBWD(mappingBWD_size);
220
221 for (int i = 0; i < mappingBAR_size; i++)
222 mappingBAR[i] = convertArrayBarrel[i];
223 for (int i = 0; i < mappingFWD_size; i++)
224 mappingFWD[i] = convertArrayFWD[i];
225 for (int i = 0; i < mappingBWD_size; i++)
226 mappingBWD[i] = convertArrayBKW[i];
227
228 map.setMappingVectors(mappingBAR, mappingFWD, mappingBWD);
229
230 return map;
231}
DB object to store correspondence table of type (Crate id, ShaperDSP id, Channel id) <-> (ECL CellID)
Definition: ECLChannelMap.h:51
void setMappingVectors(const std::vector< int > &mappingBAR, const std::vector< int > &mappingFWD, const std::vector< int > &mappingBWD)
Set three vectors of map entries.

◆ getElectronicsID()

int getElectronicsID ( int  cellID)

Return channel index in ECLChannelMap.

Definition at line 349 of file ECLChannelMapper.cc.

350{
351 if (cellID < 1 || cellID > ECL_TOTAL_CHANNELS) return -1;
352
353 int crate = getCrateID(cellID);
354 int shaper = getShaperPosition(cellID);
355 int channel = getShaperChannel(cellID);
356
357 int arrayIndex = 0;
358 // Total number of electronic IDs in barrel
359 const int bar_eid_count = ECL_BARREL_CRATES * ECL_BARREL_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
360 // Total number of electronic IDs in forward endcap
361 const int fwd_eid_count = ECL_FWD_CRATES * ECL_FWD_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
362
363 if (crate <= 36) {
364 arrayIndex += (crate - 1) * ECL_BARREL_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER
365 + (shaper - 1) * ECL_CHANNELS_IN_SHAPER + (channel - 1);
366 } else if (crate <= 44) {
367 arrayIndex += bar_eid_count;
368 arrayIndex += (crate - 37) * ECL_FWD_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER
369 + (shaper - 1) * ECL_CHANNELS_IN_SHAPER + (channel - 1);
370 } else {
371 arrayIndex += bar_eid_count + fwd_eid_count;
372 arrayIndex += (crate - 45) * ECL_BKW_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER
373 + (shaper - 1) * ECL_CHANNELS_IN_SHAPER + (channel - 1);
374 }
375
376 return arrayIndex;
377}
int getShaperChannel(int cellID)
Get number of DSP channel in the shaper by given number of CellId.
int getShaperPosition(int cellID)
Get position of the shaper in the crate by given CellId.
int getCrateID(int iCOPPERNode, int iFINESSE, bool pcie40=false)
Get crate number by given COPPER node number and FINESSE number.

◆ getFINESSE()

int getFINESSE ( int  iCrate)

Get number of FINESSE (0/1) in COPPER by given crate number.

Definition at line 391 of file ECLChannelMapper.cc.

392{
393 if (iCrate < 1 || iCrate > ECL_CRATES) return -1;
394
395 return (iCrate <= ECL_BARREL_CRATES) ? (iCrate - 1) % 2 : (iCrate - ECL_BARREL_CRATES - 1) / 8;
396}

◆ getInstance()

ECLChannelMapper * getInstance ( bool  use_db = true)
static

Return main instance of ECLChannelMapper.

Parameters
use_dbIf true, run initFromDB() at the creation of main instance

Definition at line 49 of file ECLChannelMapper.cc.

50{
51 if (!instance) {
53 if (use_db) instance->initFromDB();
54 else instance->initFromFile();
55 }
56 return instance;
57}
static ECLChannelMapper * instance
Main instance of ECLChannelMapper.
bool initFromDB()
Initialize channel mapper from the conditions database.
bool initFromFile()
Initialize channel mapper using data stored in default location.
ECLChannelMapper()
Default constructor.

◆ getNShapersInCrate()

int getNShapersInCrate ( int  iCrate)
inline

Get number of ShaperDSP modules in the given VME crate number.

Definition at line 90 of file ECLChannelMapper.h.

91 {
92 if (iCrate <= ECL_BARREL_CRATES) return ECL_BARREL_SHAPERS_IN_CRATE;
93 if (ECL_BARREL_CRATES < iCrate && iCrate <= ECL_BARREL_CRATES + ECL_FWD_CRATES) return ECL_FWD_SHAPERS_IN_CRATE;
94 if (ECL_BARREL_CRATES + ECL_FWD_CRATES < iCrate && iCrate <= ECL_CRATES) return ECL_BKW_SHAPERS_IN_CRATE;
95 return 0;
96 }

◆ getShaperChannel()

int getShaperChannel ( int  cellID)

Get number of DSP channel in the shaper by given number of CellId.

Definition at line 342 of file ECLChannelMapper.cc.

343{
344 if (cellID > 0 && cellID <= ECL_TOTAL_CHANNELS) {
345 return convertArrayInv[cellID - 1][2];
346 } else return -1;
347}

◆ getShaperPosition()

int getShaperPosition ( int  cellID)

Get position of the shaper in the crate by given CellId.

Definition at line 335 of file ECLChannelMapper.cc.

336{
337 if (cellID > 0 && cellID <= ECL_TOTAL_CHANNELS) {
338 return convertArrayInv[cellID - 1][1];
339 } else return -1;
340}

◆ getSubSystem()

int getSubSystem ( int  iCrate)

Get ECL subsystem ID by given crate number: 0 – barrel, 1 – forward. 2 – backward endcap.

Definition at line 398 of file ECLChannelMapper.cc.

399{
400 if (iCrate <= ECL_BARREL_CRATES) return 0;
401 if (ECL_BARREL_CRATES < iCrate && iCrate <= ECL_BARREL_CRATES + ECL_FWD_CRATES)
402 return 1;
403 if (ECL_BARREL_CRATES + ECL_FWD_CRATES < iCrate && iCrate <= ECL_CRATES) return 2;
404 return -1;
405}

◆ initFromDB()

bool initFromDB ( )

Initialize channel mapper from the conditions database.

Definition at line 127 of file ECLChannelMapper.cc.

128{
129 DBObjPtr<Belle2::ECLChannelMap> channelMap("ECLChannelMap");
130 // Re-initialize only if interval of validity was changed
131 if (isInitialized && !channelMap.hasChanged()) {
132 return true;
133 }
134
135 if (!channelMap.isValid()) {
136 B2FATAL("ECLChannelMapper:: Could not get ECLChannelMap from the database.");
137 }
138
139 B2INFO("ECLChannelMapper:: loaded ECLChannelMap from the database"
140 << LogVar("IoV", channelMap.getIoV()));
141
142 const auto& mappingBAR = channelMap->getMappingBAR();
143 const auto& mappingFWD = channelMap->getMappingFWD();
144 const auto& mappingBWD = channelMap->getMappingBWD();
145
146 int cellID;
147 // Loop variables
148 int iCrate = 1, iShaper = 1, iChannel = 1;
149 // Index in currently used array (converArrayBarrel,*FWD,*BKW)
150 int arrayIndex = 0;
151 int iMaxShapers = ECL_BARREL_SHAPERS_IN_CRATE;
152
153 while (iCrate <= ECL_CRATES) {
154 if (iCrate <= ECL_BARREL_CRATES) {
155 // Barrel
156 cellID = mappingBAR[arrayIndex];
157 convertArrayBarrel[arrayIndex] = cellID;
158 } else if (iCrate <= ECL_BARREL_CRATES + ECL_FWD_CRATES) {
159 // Forward endcap
160 cellID = mappingFWD[arrayIndex];
161 convertArrayFWD[arrayIndex] = cellID;
162 } else {
163 // Backward endcap
164 cellID = mappingBWD[arrayIndex];
165 convertArrayBKW[arrayIndex] = cellID;
166 }
167
168 if (cellID > ECL_TOTAL_CHANNELS) {
169 B2FATAL("ECLChannelMapper:: wrong cellID (" << cellID << ") in the database payload");
170 return false;
171 }
172
173 if (cellID > 0) {
174 convertArrayInv[cellID - 1][0] = iCrate;
175 convertArrayInv[cellID - 1][1] = iShaper;
176 convertArrayInv[cellID - 1][2] = iChannel;
177 }
178
179 arrayIndex++;
180 // Increment all indices, accounting for hierarchical
181 // structure of channels <- shapers <- crates
182 iChannel++;
183 if (iChannel > ECL_CHANNELS_IN_SHAPER) {
184 iChannel = 1;
185 iShaper++;
186 if (iShaper > iMaxShapers) {
187 iShaper = 1;
188 if (iCrate == ECL_BARREL_CRATES) {
189 arrayIndex = 0;
190 iMaxShapers = getNShapersInCrate(iCrate + 1);
191 } else if (iCrate == ECL_BARREL_CRATES + ECL_FWD_CRATES) {
192 arrayIndex = 0;
193 iMaxShapers = getNShapersInCrate(iCrate + 1);
194 }
195 iCrate++;
196 }
197 }
198 }
199
200 isInitialized = true;
201
202 return true;
203}
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
int getNShapersInCrate(int iCrate)
Get number of ShaperDSP modules in the given VME crate number.
Class to store variables with their name which were sent to the logging service.

◆ initFromFile() [1/2]

bool initFromFile ( )

Initialize channel mapper using data stored in default location.

Definition at line 42 of file ECLChannelMapper.cc.

43{
44 std::string filePath = FileSystem::findFile("ecl/data/ecl_channels_map.txt");
45 return initFromFile(filePath.c_str());
46}
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
Definition: FileSystem.cc:151

◆ initFromFile() [2/2]

bool initFromFile ( const char *  eclMapFile)

Initialize channel mapper using data stored in the ASCII file.

Definition at line 59 of file ECLChannelMapper.cc.

60{
61 B2WARNING("Reading possibly outdated ECLChannelMap from " << eclMapFileName);
62
63 ifstream mapFile(eclMapFileName);
64 if (mapFile.is_open()) {
65
66 float iCrate, iShaper, iChannel, thetaID, phiID, cellID;
67 int arrayIndex = 0;
68 int arrayCount = 0;
69 while (mapFile.good()) {
70
71 // Ignoring commented lines
72 char ch = mapFile.get();
73 if (ch == '#') {
74 mapFile.ignore(256, '\n');
75 continue;
76 } else if (ch == '\n') {
77 continue;
78 } else {
79 mapFile.unget();
80 }
81
82 mapFile >> iCrate >> iShaper >> iChannel >> thetaID >> phiID >> cellID;
83
84 if (cellID > static_cast<float>(ECL_TOTAL_CHANNELS)) {
85 B2ERROR("ECLChannelMapper:: wrong cellID in the init file " << eclMapFileName);
86 return false;
87 }
88
89 if (cellID > 0) {
90 convertArrayInv[(int)cellID - 1][0] = (int)iCrate;
91 convertArrayInv[(int)cellID - 1][1] = (int)iShaper;
92 convertArrayInv[(int)cellID - 1][2] = (int)iChannel;
93 }
94
95 // Barrel
96 if (iCrate >= 1 && iCrate <= 36) {
97 arrayIndex = arrayCount;
98 convertArrayBarrel[arrayIndex] = (int)cellID;
99 }
100
101 // Forward endcap
102 if (iCrate > 36 && iCrate < 45) {
103 arrayIndex = arrayCount - 36 * 12 * 16;
104
105 if (arrayIndex >= 0 && arrayIndex < ECL_FWD_CRATES * ECL_FWD_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER)
106 convertArrayFWD[arrayIndex] = (int)cellID;
107 }
108
109 // Backward endcap
110 if (iCrate > 44) {
111 arrayIndex = arrayCount - 36 * 12 * 16 - 8 * 10 * 16;
112 if (arrayIndex >= 0 && arrayIndex < ECL_BKW_CRATES * ECL_BKW_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER)
113 convertArrayBKW[arrayIndex] = (int)cellID;
114 }
115 arrayCount++;
116 }
117 } else {
118 B2ERROR("ERROR:: file " << eclMapFileName << " doesn't found");
119 return false;
120 }
121
122 isInitialized = true;
123
124 return true;
125}

Member Data Documentation

◆ convertArrayBarrel

int convertArrayBarrel[ECL_BARREL_CRATES *ECL_BARREL_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
private

convert (iCrate, iShaper, iChannel) to CellId for Barrel ECL

Definition at line 35 of file ECLChannelMapper.h.

◆ convertArrayBKW

int convertArrayBKW[ECL_BKW_CRATES *ECL_BKW_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
private

convert (iCrate, iShaper, iChannel) to CellId Backward endcap

Definition at line 39 of file ECLChannelMapper.h.

◆ convertArrayFWD

int convertArrayFWD[ECL_FWD_CRATES *ECL_FWD_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
private

convert (iCrate, iShaper, iChannel) to CellId for Forward endcap

Definition at line 37 of file ECLChannelMapper.h.

◆ convertArrayInv

int convertArrayInv[ECL_TOTAL_CHANNELS][3]
private

convert CellId to (iCrate, iShaper, iChannel)

Definition at line 41 of file ECLChannelMapper.h.

◆ instance

ECLChannelMapper * instance = nullptr
staticprivate

Main instance of ECLChannelMapper.

Definition at line 43 of file ECLChannelMapper.h.

◆ isInitialized

bool isInitialized
private

initialization flag

Definition at line 32 of file ECLChannelMapper.h.


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