ATLAS Offline Software
Loading...
Searching...
No Matches
LArConditionsContainerBase Class Reference

This is a non-template implementation base class for LArConditionsContainer. More...

#include <LArConditionsContainerBase.h>

Inherited by LArConditionsContainer< LArAutoCorr >, LArConditionsContainer< WaveMap >, LArConditionsContainer< LArAccumulatedDigit >, LArConditionsContainer< LArPedestal >, LArConditionsContainer< LArCondObj >, LArConditionsContainer< LArCableAttenuationP >, LArConditionsContainer< LArCableLengthP >, LArConditionsContainer< LArCaliPulseParamsP >, LArConditionsContainer< LArSingleFloatP >, LArConditionsContainer< LArDetCellParamsP >, LArConditionsContainer< LArEMEC_CphiP >, LArConditionsContainer< LArEMEC_HValphaP >, LArConditionsContainer< LArEMEC_HVbetaP >, LArConditionsContainer< LArfSamplP >, LArConditionsContainer< LArH6OscillationP >, LArConditionsContainer< LArMinBiasAverageP >, LArConditionsContainer< LArMinBiasP >, LArConditionsContainer< LArNoiseP >, LArConditionsContainer< LArPhysCaliTdiffP >, LArConditionsContainer< LArRampP1 >, LArConditionsContainer< LArRinjP >, LArConditionsContainer< LArShapeP1 >, LArConditionsContainer< LArShapeP2 >, LArConditionsContainer< LArTdriftP >, LArConditionsContainer< LArTshaperP >, LArConditionsContainer< LArWaveDerivedQuantitiesP >, LArConditionsContainer< LArWFParams >, LArConditionsContainer< LArAutoCorrP1 >, LArConditionsContainer< LArCaliWaveVec >, LArConditionsContainer< LArDSPThresholdsP >, LArConditionsContainer< LArOFCBinP >, LArConditionsContainer< LArOFCP1 >, LArConditionsContainer< LArPedestalP1 >, LArConditionsContainer< LArPhysWave >, LArConditionsContainer< ACCRAMP >, and LArConditionsContainer< T >.

Collaboration diagram for LArConditionsContainerBase:

Public Types

enum  GroupingType {
  Unknown = 0 , SingleGroup , SubDetectorGrouping , FeedThroughGrouping ,
  ExtendedFTGrouping , ExtendedSubDetGrouping , SuperCells
}
 Grouping type. More...
typedef LArCondFEBIdChanMap::FEBIdVector FEBIdVector

Public Member Functions

 LArConditionsContainerBase ()
 Default constructor.
 LArConditionsContainerBase (GroupingType type)
 constructor defining grouping type
virtual ~LArConditionsContainerBase ()
 destructor
StatusCode initializeBase ()
 initialize
void setGroupingType (GroupingType type)
 allow group type to be set externally - need to (re)initialize after setting grouping type
StatusCode setGroupingType (const std::string &groupingStr, MsgStream &logStr)
 allow group type to be set externally based on a string returns an FAILURE and a message to logStr if unknown string is supplied
const LArOnlineID_BaseonlineHelper () const
 provide access to online id helper
const CaloCell_Base_IDofflineHelper () const
 provide access to offline id helper
const FEBIdVectorfebIdVector (unsigned int gain, unsigned int coolChannel) const
 Access to a FEB ID vector for a given gain and COOL channel.

Static Public Member Functions

static bool applyCorrectionsAtInit (bool setFlag=false, bool flag=true)
 provide access to flag which determines corrections are applied at initialize, i.e.

Protected Member Functions

StatusCode initGrouping ()
std::string groupingTypeToString () const
void correctionIndexAndCoolChannel (HWIdentifier id, unsigned int gain, unsigned int &index, unsigned int &coolChannel)

Protected Attributes

GroupingType m_groupType
LArCondFEBIdChanMap m_febIdChanMap
const LArOnlineID_Basem_onlineHelper
const CaloCell_Base_IDm_offlineHelper
std::vector< unsigned int > m_channelToMultChanCollIndex
bool m_isInitialized

Detailed Description

This is a non-template implementation base class for LArConditionsContainer.

This class contains implementation details in a non-template form allowing it code to be compiled into a library.

Definition at line 39 of file LArConditionsContainerBase.h.

Member Typedef Documentation

◆ FEBIdVector

Member Enumeration Documentation

◆ GroupingType

Constructor & Destructor Documentation

◆ LArConditionsContainerBase() [1/2]

LArConditionsContainerBase::LArConditionsContainerBase ( )

Default constructor.

Definition at line 28 of file LArConditionsContainerBase.cxx.

◆ LArConditionsContainerBase() [2/2]

LArConditionsContainerBase::LArConditionsContainerBase ( GroupingType type)

constructor defining grouping type

Definition at line 36 of file LArConditionsContainerBase.cxx.

37 :
38 m_groupType(type),
39 m_onlineHelper(nullptr),
40 m_offlineHelper(nullptr),
41 m_isInitialized(false)
42{}

◆ ~LArConditionsContainerBase()

LArConditionsContainerBase::~LArConditionsContainerBase ( )
virtual

destructor

Definition at line 45 of file LArConditionsContainerBase.cxx.

46{}

Member Function Documentation

◆ applyCorrectionsAtInit()

bool LArConditionsContainerBase::applyCorrectionsAtInit ( bool setFlag = false,
bool flag = true )
static

provide access to flag which determines corrections are applied at initialize, i.e.

when conditions are read in. Default is true. This is a class (static) variable which applied to ALL conditions in a job! If one wants to change the value of the flag, pass in arguments:

Definition at line 564 of file LArConditionsContainerBase.cxx.

565{
566 // If setFlag is true, change the value of static flag, otherwise
567 // return current value
568
569 // Default value is true
570 static std::atomic<bool> applyCorrs = true;
571
572 if (setFlag) applyCorrs = flag;
573
574 return (applyCorrs);
575}
bool flag
Definition master.py:29

◆ correctionIndexAndCoolChannel()

void LArConditionsContainerBase::correctionIndexAndCoolChannel ( HWIdentifier id,
unsigned int gain,
unsigned int & index,
unsigned int & coolChannel )
protected

Definition at line 500 of file LArConditionsContainerBase.cxx.

504{
505 MsgStream log(Athena::getMessageSvc(), "LArConditionsContainerBase");
506
507 index = 9999;
508 coolChannel = 0;
509 // First get cool channel number
510 if (!m_onlineHelper) {
511 log << MSG::ERROR << "correctionIndex> Could not get online id helper!" << endmsg;
512 return;
513 }
514
515 int p_n = m_onlineHelper->pos_neg(id);
516 if (m_onlineHelper->isEMBPS(id)) {
517 if (p_n) coolChannel = LArCondFEBIdChanMap::PSBA; // PS Barrel
518 else coolChannel = LArCondFEBIdChanMap::PSBC; // PS Barrel
519 }
520 else if (m_onlineHelper->isEMECPS(id)) {
521 if (p_n) coolChannel = LArCondFEBIdChanMap::PSECA; // PS Endcap
522 else coolChannel = LArCondFEBIdChanMap::PSECC; // PS Endcap
523 }
524 else if (m_onlineHelper->isEMBchannel(id)) {
525 if (p_n) coolChannel = LArCondFEBIdChanMap::EMBA; // EM Barrel
526 else coolChannel = LArCondFEBIdChanMap::EMBC; // EM Barrel
527 }
528 else if (m_onlineHelper->isEMECchannel(id)) {
529 if (p_n) coolChannel = LArCondFEBIdChanMap::EMECA; // EM Endcap
530 else coolChannel = LArCondFEBIdChanMap::EMECC; // EM Endcap
531 }
532 else if (m_onlineHelper->isHECchannel(id)) {
533 if (p_n) coolChannel = LArCondFEBIdChanMap::HECA; // HEC A
534 else coolChannel = LArCondFEBIdChanMap::HECC; // HEC C
535 }
536 else if (m_onlineHelper->isFCALchannel(id)) {
537 if (p_n) coolChannel = LArCondFEBIdChanMap::FCALA; // FCAL A
538 else coolChannel = LArCondFEBIdChanMap::FCALC; // FCAL C
539 }
540
541 if (!coolChannel) {
542 log << MSG::ERROR << "correctionIndex> coolChannel not found! Online ids: "
543 << " " << m_onlineHelper->show_to_string(id)
544 << endmsg;
545 return;
546 }
547
548 // add on offset for gain
549 unsigned int gainOffset = (gain - m_febIdChanMap.minGain())*LArCondFEBIdChanMap::NCORRTYPE;
550 coolChannel += gainOffset;
551
552 // look up the index in the table
553 if (coolChannel >= m_channelToMultChanCollIndex.size()) {
554 log << MSG::ERROR << "correctionIndex> coolChannel larger than lookup table: chan, size "
555 << coolChannel << " " << m_channelToMultChanCollIndex.size()
556 << endmsg;
557 }
558 else {
559 index = m_channelToMultChanCollIndex[coolChannel];
560 }
561}
#define endmsg
std::vector< unsigned int > m_channelToMultChanCollIndex
IMessageSvc * getMessageSvc(bool quiet=false)
str index
Definition DeMoScan.py:362

◆ febIdVector()

const LArConditionsContainerBase::FEBIdVector & LArConditionsContainerBase::febIdVector ( unsigned int gain,
unsigned int coolChannel ) const

Access to a FEB ID vector for a given gain and COOL channel.

Definition at line 493 of file LArConditionsContainerBase.cxx.

495{
496 return (m_febIdChanMap.febIdVector(gain, coolChannel));
497}

◆ groupingTypeToString()

std::string LArConditionsContainerBase::groupingTypeToString ( ) const
protected

Definition at line 457 of file LArConditionsContainerBase.cxx.

458{
459 // Return grouping type in string form
460 switch (m_groupType){
461 case 0:
462 return ("Unknown");
463 case 1:
464 return ("SingleGroup");
465 case 2:
466 return ("SubDetectorGrouping");
467 case 3:
468 return ("FeedThroughGrouping");
469 case 4:
470 return ("ExtendedFTGrouping");
471 case 5:
472 return ("ExtendedSubDetGrouping");
473 case 6:
474 return ("SuperCells");
475 }
476 return ("Unknown");
477}

◆ initGrouping()

StatusCode LArConditionsContainerBase::initGrouping ( )
protected

Definition at line 130 of file LArConditionsContainerBase.cxx.

131{
132 MsgStream log(Athena::getMessageSvc(), "LArConditionsContainerBase");
133 log << MSG::DEBUG << "initGrouping "<< endmsg;
134
135 // We allow for different groupings
136
137 if (Unknown == m_groupType) {
138 log << MSG::ERROR << "Unknown grouping "<< endmsg;
139
140 // Not yet known
141 }
143
144 log << MSG::DEBUG << "Single group "<< endmsg;
145
146 // Only one group - add all feb ids to channel 0
147 std::vector<HWIdentifier>::const_iterator febIt = m_onlineHelper->feb_begin();
148 std::vector<HWIdentifier>::const_iterator febEnd = m_onlineHelper->feb_end();
150 for (; febIt != febEnd; ++febIt) {
151 febIds.push_back((*febIt).get_identifier32().get_compact());
152 }
153 // add for LArCondFEBIdChanMap
154 unsigned int nChanPerGain = 1;
155 unsigned int minGain = 0;
156 unsigned int nGains = 3;
157 m_febIdChanMap = LArCondFEBIdChanMap(nChanPerGain, minGain, nGains);
158 m_febIdChanMap.addFEBIdVector(0, febIds);
159 }
160 else if (SubDetectorGrouping == m_groupType) {
161
162 log << MSG::DEBUG << "Subdetector grouping "<< endmsg;
163
164 // Set up LArCondFEBIdChanMap for four groups: EM barrel, EMEM, HEC, FCal
165 std::vector<HWIdentifier>::const_iterator febIt = m_onlineHelper->feb_begin();
166 std::vector<HWIdentifier>::const_iterator febEnd = m_onlineHelper->feb_end();
167
172
173 for (; febIt != febEnd; ++febIt) {
174 unsigned int febId = (*febIt).get_identifier32().get_compact();
175 if (m_onlineHelper->isEMBchannel(*febIt)) {
176 emBarrel.push_back(febId);
177 }
178 else if (m_onlineHelper->isEMECchannel(*febIt)) {
179 emEndcap.push_back(febId);
180 }
181 else if (m_onlineHelper->isHECchannel(*febIt)) {
182 hec.push_back(febId);
183 }
184 else if (m_onlineHelper->isFCALchannel(*febIt)) {
185 fcal.push_back(febId);
186 }
187 else {
188 log << MSG::DEBUG << "Uassociated FEB id: "
189 << MSG::hex << (febId) << MSG::dec
190 << " isCalib " << m_onlineHelper->isCalibration(*febIt)
191 << " " << m_onlineHelper->show_to_string(*febIt)
192 << endmsg;
193 }
194 }
195 // add for LArCondFEBIdChanMap
196 unsigned int nChanPerGain = 4;
197 unsigned int minGain = 0;
198 unsigned int nGains = 3;
199 m_febIdChanMap = LArCondFEBIdChanMap(nChanPerGain, minGain, nGains);
200 m_febIdChanMap.addFEBIdVector(0, emBarrel);
201 m_febIdChanMap.addFEBIdVector(1, emEndcap);
202 m_febIdChanMap.addFEBIdVector(2, hec);
203 m_febIdChanMap.addFEBIdVector(3, fcal);
204
205// unsigned int coolChannel;
206// for (unsigned int gain = 0; gain < nGains; ++gain) {
207// for (unsigned int i = 0; i < emBarrel.size(); ++i) {
208// if (!m_febIdChanMap.getChannel(emBarrel[i], gain, coolChannel)) {
209// log << MSG::DEBUG << "Unable to get cool channel for em barrel - i = "
210// << i << endmsg;
211// return (StatusCode::FAILURE);
212// }
213// }
214// for (unsigned int i = 0; i < emEndcap.size(); ++i) {
215// if (!m_febIdChanMap.getChannel(emEndcap[i], gain, coolChannel)) {
216// log << MSG::DEBUG << "Unable to get cool channel for em endcap - i = "
217// << i << endmsg;
218// return (StatusCode::FAILURE);
219// }
220// }
221// for (unsigned int i = 0; i < hec.size(); ++i) {
222// if (!m_febIdChanMap.getChannel(hec[i], gain, coolChannel)) {
223// log << MSG::DEBUG << "Unable to get cool channel for hec - i = "
224// << i << endmsg;
225// return (StatusCode::FAILURE);
226// }
227// }
228// for (unsigned int i = 0; i < fcal.size(); ++i) {
229// if (!m_febIdChanMap.getChannel(fcal[i], gain, coolChannel)) {
230// log << MSG::DEBUG << "Unable to get cool channel for fcal - i = "
231// << i << endmsg;
232// return (StatusCode::FAILURE);
233// }
234// }
235// }
236 }
238 log << MSG::DEBUG << "Extended Subdetector grouping "<< endmsg;
239
240 // Set up LArCondFEBIdChanMap for four groups: EM barrel, EM barrel PS ,EMEC EMEC PS, HEC, FCal
241 std::vector<HWIdentifier>::const_iterator febIt = m_onlineHelper->feb_begin();
242 std::vector<HWIdentifier>::const_iterator febEnd = m_onlineHelper->feb_end();
243
244 LArCondFEBIdChanMap::FEBIdVector emBarrel[2] = {};
245 LArCondFEBIdChanMap::FEBIdVector emBarrelPS[2] = {};
246 LArCondFEBIdChanMap::FEBIdVector emEndcap[2] = {};
247 LArCondFEBIdChanMap::FEBIdVector emEndcapPS[2] = {};
250
251 for (; febIt != febEnd; ++febIt) {
252 int iside = m_onlineHelper->pos_neg(*febIt);
253 // Sanity check
254 if(iside <0 || iside > 1) {
255 log << MSG::ERROR << "Wrong side id: "<< iside <<" from: "
256 << MSG::hex << *febIt << MSG::dec << endmsg;
257 return (StatusCode::FAILURE);
258 }
259 unsigned int febId = (*febIt).get_identifier32().get_compact();
260 if (m_onlineHelper->isEMBPS(*febIt)) {
261 emBarrelPS[iside].push_back(febId);
262 }
263 else if (m_onlineHelper->isEMECPS(*febIt)) {
264 emEndcapPS[iside].push_back(febId);
265 }
266 else if (m_onlineHelper->isEMBchannel(*febIt)) {
267 emBarrel[iside].push_back(febId);
268 }
269 else if (m_onlineHelper->isEMECchannel(*febIt)) {
270 emEndcap[iside].push_back(febId);
271 }
272 else if (m_onlineHelper->isHECchannel(*febIt)) {
273 hec[iside].push_back(febId);
274 }
275 else if (m_onlineHelper->isFCALchannel(*febIt)) {
276 fcal[iside].push_back(febId);
277 }
278 else {
279 log << MSG::DEBUG << "Uassociated FEB id: "
280 << MSG::hex << (febId) << MSG::dec
281 << " isCalib " << m_onlineHelper->isCalibration(*febIt)
282 << " " << m_onlineHelper->show_to_string(*febIt)
283 << endmsg;
284 }
285 }
286 // add for LArCondFEBIdChanMap
287 unsigned int nChanPerGain = 12;
288 unsigned int minGain = 0;
289 unsigned int nGains = 3;
290 m_febIdChanMap = LArCondFEBIdChanMap(nChanPerGain, minGain, nGains);
291 for (int iside=0; iside<2; ++iside) {
292 m_febIdChanMap.addFEBIdVector(0+iside*6, emBarrel[iside]);
293 m_febIdChanMap.addFEBIdVector(1+iside*6, emBarrelPS[iside]);
294 m_febIdChanMap.addFEBIdVector(2+iside*6, emEndcap[iside]);
295 m_febIdChanMap.addFEBIdVector(3+iside*6, emEndcapPS[iside]);
296 m_febIdChanMap.addFEBIdVector(4+iside*6, hec[iside]);
297 m_febIdChanMap.addFEBIdVector(5+iside*6, fcal[iside]);
298 }
299
300 }
301 else if (FeedThroughGrouping == m_groupType) {
302 log << MSG::DEBUG << "FeedThrough grouping "<< endmsg;
303
304 // Set up LArCondFEBIdChanMap for four groups: EM barrel, EMEM, HEC, FCal
305 std::vector<HWIdentifier>::const_iterator febIt = m_onlineHelper->feb_begin();
306 std::vector<HWIdentifier>::const_iterator febEnd = m_onlineHelper->feb_end();
307
308 std::vector<LArCondFEBIdChanMap::FEBIdVector> ft(m_onlineHelper->feedthroughHashMax());
309
310
311 for (; febIt != febEnd; ++febIt) {
312 // Find the feedthru hash and add to vector
313 HWIdentifier febId = (*febIt);
314 int b_ec = m_onlineHelper->barrel_ec(febId);
315 int p_n = m_onlineHelper->pos_neg(febId);
316 int f_t = m_onlineHelper->feedthrough(febId);
317 HWIdentifier ftid = m_onlineHelper->feedthrough_Id(b_ec, p_n, f_t);
318 IdentifierHash fthash = m_onlineHelper->feedthrough_Hash(ftid);
319 if (fthash < ft.size()) {
320 ft[fthash].push_back(febId.get_identifier32().get_compact());
321 }
322 else {
323 log << MSG::ERROR << "Feedthru hash > channel map size: id, hash, size "
324 << MSG::hex << febId << MSG::dec << " "
325 << ftid << " " << ft.size()
326 << endmsg;
327 return (StatusCode::FAILURE);
328 }
329 }
330 // add for LArCondFEBIdChanMap
331 unsigned int nChanPerGain = ft.size();
332 unsigned int minGain = 0;
333 unsigned int nGains = 3;
334 m_febIdChanMap = LArCondFEBIdChanMap(nChanPerGain, minGain, nGains);
335 for (unsigned int i = 0; i < ft.size(); ++i) {
336 m_febIdChanMap.addFEBIdVector(i, ft[i]);
337 }
338 }
339 else if (ExtendedFTGrouping == m_groupType) {
340
341 log << MSG::DEBUG << "Extended FeedThrough grouping (PS goes seperatly, EMEC in HEC as well)"<< endmsg;
342
343 // Set up LArCondFEBIdChanMap for four groups: EM barrel, EMEM, HEC, FCal
344 std::vector<HWIdentifier>::const_iterator febIt = m_onlineHelper->feb_begin();
345 std::vector<HWIdentifier>::const_iterator febEnd = m_onlineHelper->feb_end();
346
347 //Vectors of groups
348 //Standard Febs (one group per FT)
349 std::vector<LArCondFEBIdChanMap::FEBIdVector> ft(m_onlineHelper->feedthroughHashMax());
350 //Presampler FEBs (one group per FT)
351 std::vector<LArCondFEBIdChanMap::FEBIdVector> ftPS(m_onlineHelper->feedthroughHashMax());
352 //EMEC channel in special crate:
353 std::vector<LArCondFEBIdChanMap::FEBIdVector> ftSpecial(8); //How many are there?
354
355 for (; febIt != febEnd; ++febIt) {
356 // Find the feedthru hash and add to vector
357 HWIdentifier febId = (*febIt);
358 int b_ec = m_onlineHelper->barrel_ec(febId);
359 int p_n = m_onlineHelper->pos_neg(febId);
360 int f_t = m_onlineHelper->feedthrough(febId);
361 HWIdentifier ftid = m_onlineHelper->feedthrough_Id(b_ec, p_n, f_t);
362 IdentifierHash fthash = m_onlineHelper->feedthrough_Hash(ftid);
363
364 //sanity check
365 if (fthash >= ft.size()) {
366 log << MSG::ERROR << "Feedthru hash > channel map size: id, hash, size "
367 << MSG::hex << febId << MSG::dec << " "
368 << ftid << " " << ft.size()
369 << endmsg;
370 return (StatusCode::FAILURE);
371 }
372
373 //Subdivide into specific cases:
374 if (!m_onlineHelper->isEMECinHECchannel(febId)) { //this is taken care of further down
375 if (m_onlineHelper->isPS(febId))
376 ftPS[fthash].push_back(febId.get_identifier32().get_compact()); //PS goes in separate channels
377 else
378 ft[fthash].push_back(febId.get_identifier32().get_compact());
379 }
380 }
381 //EMEC in HEC crate: Do 'by hand'
382 //FTs: 3,10,16,22 Slots: 1,2
383 //parameters: ec,pn,ft,slot
384 ftSpecial[0].push_back(m_onlineHelper->feb_Id(1,0,3,1).get_identifier32().get_compact());
385 ftSpecial[0].push_back(m_onlineHelper->feb_Id(1,0,3,2).get_identifier32().get_compact());
386
387 ftSpecial[1].push_back(m_onlineHelper->feb_Id(1,1,3,1).get_identifier32().get_compact());
388 ftSpecial[1].push_back(m_onlineHelper->feb_Id(1,1,3,2).get_identifier32().get_compact());
389
390 ftSpecial[2].push_back(m_onlineHelper->feb_Id(1,0,10,1).get_identifier32().get_compact());
391 ftSpecial[2].push_back(m_onlineHelper->feb_Id(1,0,10,2).get_identifier32().get_compact());
392
393 ftSpecial[3].push_back(m_onlineHelper->feb_Id(1,1,10,1).get_identifier32().get_compact());
394 ftSpecial[3].push_back(m_onlineHelper->feb_Id(1,1,10,2).get_identifier32().get_compact());
395
396 ftSpecial[4].push_back(m_onlineHelper->feb_Id(1,0,16,1).get_identifier32().get_compact());
397 ftSpecial[4].push_back(m_onlineHelper->feb_Id(1,0,16,2).get_identifier32().get_compact());
398
399 ftSpecial[5].push_back(m_onlineHelper->feb_Id(1,1,16,1).get_identifier32().get_compact());
400 ftSpecial[5].push_back(m_onlineHelper->feb_Id(1,1,16,2).get_identifier32().get_compact());
401
402 ftSpecial[6].push_back(m_onlineHelper->feb_Id(1,0,22,1).get_identifier32().get_compact());
403 ftSpecial[6].push_back(m_onlineHelper->feb_Id(1,0,22,2).get_identifier32().get_compact());
404
405 ftSpecial[7].push_back(m_onlineHelper->feb_Id(1,1,22,1).get_identifier32().get_compact());
406 ftSpecial[7].push_back(m_onlineHelper->feb_Id(1,1,22,2).get_identifier32().get_compact());
407
408
409 // add for LArCondFEBIdChanMap
410 unsigned int nChanPerGain = ft.size()+ftPS.size()+ftSpecial.size();
411 unsigned int minGain = 0;
412 unsigned int nGains = 3;
413 unsigned int iCoolChannel=0;
414 m_febIdChanMap = LArCondFEBIdChanMap(nChanPerGain, minGain, nGains);
415 for (unsigned int i = 0; i < ft.size(); ++i) {
416 m_febIdChanMap.addFEBIdVector(iCoolChannel++, ft[i]);
417 }
418 for (unsigned int i = 0; i < ftPS.size(); ++i) {
419 m_febIdChanMap.addFEBIdVector(iCoolChannel++, ftPS[i]);
420 }
421 for (unsigned int i = 0; i < ftSpecial.size(); ++i) {
422 m_febIdChanMap.addFEBIdVector(iCoolChannel++, ftSpecial[i]);
423 }
424 } else {
425 log << MSG::ERROR << "Unknown COOL Channel grouping " << m_groupType << endmsg;
426 return StatusCode::FAILURE;
427 }
428 // Resize the vector mapping the COOL channel to the
429 // DataVector.
430 m_channelToMultChanCollIndex = std::vector<unsigned int>(m_febIdChanMap.totalChannels(), 9999);
431
432 log << MSG::DEBUG << "Number of channels per gain "
433 << m_febIdChanMap.channelsPerGain()
434 << endmsg;
435
436 log << MSG::DEBUG << "Mininum gain value "
437 << m_febIdChanMap.minGain()
438 << endmsg;
439
440 log << MSG::DEBUG << "Number of gain values "
441 << m_febIdChanMap.nGains()
442 << endmsg;
443
444 log << MSG::DEBUG << "Number of offset channels "
445 << m_febIdChanMap.nOffsetChannels()
446 << endmsg;
447
448 log << MSG::DEBUG << "Total number of channels "
449 << m_febIdChanMap.totalChannels()
450 << endmsg;
451
452 return (StatusCode::SUCCESS);
453
454}
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
std::vector< FEBId > FEBIdVector

◆ initializeBase()

StatusCode LArConditionsContainerBase::initializeBase ( )

initialize

Definition at line 51 of file LArConditionsContainerBase.cxx.

52{
53 //Get LArOnlineID....
54 ServiceHandle<StoreGateSvc> detStore("DetectorStore", "LArConditionsContainerBase");
55 CHECK( detStore.isValid() );
56
58 //Dealing with supercells, need supercell identifier helper
59 const LArOnline_SuperCellID* onlID = nullptr;
60 CHECK( detStore->retrieve(onlID,"LArOnline_SuperCellID") );
61 m_onlineHelper=onlID;//cast to base-class
62
63 const CaloCell_SuperCell_ID* oflID = nullptr;
64 CHECK( detStore->retrieve(oflID,"CaloCell_SuperCell_ID") );
65 m_offlineHelper=oflID; //cast to base-class
66 }
67 else {
68 //Regular readout
69 const LArOnlineID* onlID = nullptr;
70 CHECK( detStore->retrieve(onlID,"LArOnlineID") );
71 m_onlineHelper=onlID;//cast to base-class
72
73 const CaloCell_ID* oflID = nullptr;
74 CHECK( detStore->retrieve(oflID,"CaloCell_ID") );
75 m_offlineHelper=oflID; //cast to base-class
76 }
77
78 // initialize the grouping
80
81 // Set initialized to true
82 m_isInitialized = true;
83
84 return (StatusCode::SUCCESS);
85}
#define CHECK(...)
Evaluate an expression and check for errors.

◆ offlineHelper()

const CaloCell_Base_ID * LArConditionsContainerBase::offlineHelper ( ) const

provide access to offline id helper

Definition at line 486 of file LArConditionsContainerBase.cxx.

487{
488 return (m_offlineHelper);
489}

◆ onlineHelper()

const LArOnlineID_Base * LArConditionsContainerBase::onlineHelper ( ) const

provide access to online id helper

Definition at line 480 of file LArConditionsContainerBase.cxx.

481{
482 return (m_onlineHelper);
483}

◆ setGroupingType() [1/2]

StatusCode LArConditionsContainerBase::setGroupingType ( const std::string & groupingStr,
MsgStream & logStr )

allow group type to be set externally based on a string returns an FAILURE and a message to logStr if unknown string is supplied

Definition at line 95 of file LArConditionsContainerBase.cxx.

96{
97 // Set grouping type - default is SubDet
98 if (groupingStr == "Single")
100 return StatusCode::SUCCESS;
101 }
102 else if (groupingStr == "SubDetector")
104 return StatusCode::SUCCESS;
105 }
106 else if (groupingStr == "ExtendedSubDetector")
108 return StatusCode::SUCCESS;
109 }
110 else if (groupingStr == "FeedThrough")
112 return StatusCode::SUCCESS;
113 }
114 else if (groupingStr == "ExtendedFeedThrough") {
116 return StatusCode::SUCCESS;
117 }
118 else if (groupingStr == "SuperCells") {
120 return StatusCode::SUCCESS;
121 }
122
123 logStr << MSG::ERROR << "Unknown COOL Channel Grouping '"<< groupingStr <<"'. Allowed values are:" << endmsg;
124 logStr << MSG::ERROR << "'Single','SubDetector', 'ExtendedSubDetector','FeedThrough','ExtendedFeedThrough'" << endmsg;
125 return StatusCode::FAILURE;
126}
void setGroupingType(GroupingType type)
allow group type to be set externally - need to (re)initialize after setting grouping type

◆ setGroupingType() [2/2]

void LArConditionsContainerBase::setGroupingType ( GroupingType type)

allow group type to be set externally - need to (re)initialize after setting grouping type

Definition at line 88 of file LArConditionsContainerBase.cxx.

Member Data Documentation

◆ m_channelToMultChanCollIndex

std::vector<unsigned int> LArConditionsContainerBase::m_channelToMultChanCollIndex
protected

Definition at line 114 of file LArConditionsContainerBase.h.

◆ m_febIdChanMap

LArCondFEBIdChanMap LArConditionsContainerBase::m_febIdChanMap
protected

Definition at line 108 of file LArConditionsContainerBase.h.

◆ m_groupType

GroupingType LArConditionsContainerBase::m_groupType
protected

Definition at line 107 of file LArConditionsContainerBase.h.

◆ m_isInitialized

bool LArConditionsContainerBase::m_isInitialized
protected

Definition at line 115 of file LArConditionsContainerBase.h.

◆ m_offlineHelper

const CaloCell_Base_ID* LArConditionsContainerBase::m_offlineHelper
protected

Definition at line 110 of file LArConditionsContainerBase.h.

◆ m_onlineHelper

const LArOnlineID_Base* LArConditionsContainerBase::m_onlineHelper
protected

Definition at line 109 of file LArConditionsContainerBase.h.


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