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

#include <CscCondDbData.h>

Collaboration diagram for CscCondDbData:

Public Member Functions

 CscCondDbData ()=default
virtual ~CscCondDbData ()=default
void loadParameters (const CscIdHelper *)
void setParameters (bool)
void setChannelF001 (IdentifierHash, float)
void setChannelNoise (IdentifierHash, float)
void setChannelPed (IdentifierHash, float)
void setChannelPSlope (IdentifierHash, float)
void setChannelRMS (IdentifierHash, float)
void setChannelStatus (IdentifierHash, int)
void setChannelT0Base (IdentifierHash, float)
void setChannelT0Phase (IdentifierHash, bool)
void setDeadChannelHash (IdentifierHash)
void setDeadLayer (std::string_view, Identifier)
void setDeadStation (std::string_view, Identifier)
const std::vector< std::string > & getDeadLayers () const
const std::vector< std::string > & getDeadStations () const
const std::vector< Identifier > & getDeadLayersId () const
const std::vector< Identifier > & getDeadStationsId () const
const std::vector< unsigned int > & getDeadChannelsHash () const
bool hasChannelT0Phase (IdentifierHash) const
const float & getChannelF001 (IdentifierHash) const
const float & getChannelNoise (IdentifierHash) const
const float & getChannelPed (IdentifierHash) const
const float & getChannelPSlope (IdentifierHash) const
const float & getChannelRMS (IdentifierHash) const
const int & getChannelStatus (IdentifierHash) const
const float & getChannelT0Base (IdentifierHash) const
const bool & getChannelT0Phase (IdentifierHash) const
StatusCode readChannelF001 (IdentifierHash, float &) const
StatusCode readChannelNoise (IdentifierHash, float &) const
StatusCode readChannelPed (IdentifierHash, float &) const
StatusCode readChannelPSlope (IdentifierHash, float &) const
StatusCode readChannelRMS (IdentifierHash, float &) const
StatusCode readChannelStatus (IdentifierHash, int &) const
StatusCode readChannelT0Base (IdentifierHash, float &) const
StatusCode readChannelT0Phase (IdentifierHash, bool &) const
bool isGood (const Identifier &) const
bool isGoodLayer (const Identifier &) const
bool isGoodStation (const Identifier &) const
bool isGoodChannelHash (const IdentifierHash &) const
StatusCode indexToStringId (const CscIdHelper *, const unsigned int &, const std::string &, std::string &) const
StatusCode layerHashToOnlineId (const unsigned int &, unsigned int &) const
StatusCode offlineElementToOnlineId (const CscIdHelper *, const Identifier &, unsigned int &) const
StatusCode offlineToOnlineId (const CscIdHelper *, const Identifier &, unsigned int &) const
StatusCode onlineToOfflineIds (const CscIdHelper *, const unsigned int &, Identifier &, Identifier &) const
template<typename T>
StatusCode readChannelParam (IdentifierHash hash, T &val, const std::string &parName) const

Private Attributes

bool m_onlineOfflinePhiFlip {true}
IdContext m_channelContext {}
IdContext m_moduleContext {}
std::vector< unsigned int > m_onlineChannelIdsFromLayerHash {}
std::vector< unsigned int > m_onlineChannelIdsFromChamberCoolChannel {}
std::vector< std::string > m_cachedDeadLayers {}
std::vector< std::string > m_cachedDeadStations {}
std::vector< Identifierm_cachedDeadLayersId {}
std::vector< Identifierm_cachedDeadStationsId {}
std::vector< unsigned int > m_cachedDeadChannelsHash {}
std::map< unsigned int, float > m_cachedChannelsF001 {}
std::map< unsigned int, float > m_cachedChannelsNoise {}
std::map< unsigned int, float > m_cachedChannelsPed {}
std::map< unsigned int, float > m_cachedChannelsPSlope {}
std::map< unsigned int, float > m_cachedChannelsRMS {}
std::map< unsigned int, int > m_cachedChannelsStatus {}
std::map< unsigned int, float > m_cachedChannelsT0Base {}
std::map< unsigned int, bool > m_cachedChannelsT0Phase {}
std::vector< std::string > m_emptyNames {}
std::vector< Identifierm_emptyIds {}
std::vector< unsigned int > m_emptyHashs {}
const bool m_nillbool = false
const float m_nillfloat = -1
const int m_nillint = -1

Friends

class CscCondDbAlg

Detailed Description

Definition at line 24 of file CscCondDbData.h.

Constructor & Destructor Documentation

◆ CscCondDbData()

CscCondDbData::CscCondDbData ( )
default

◆ ~CscCondDbData()

virtual CscCondDbData::~CscCondDbData ( )
virtualdefault

Member Function Documentation

◆ getChannelF001()

const float & CscCondDbData::getChannelF001 ( IdentifierHash hash) const

Definition at line 193 of file CscCondDbData.cxx.

193 {
194 if(m_cachedChannelsF001.find((unsigned int) hash)==m_cachedChannelsF001.end()) return m_nillfloat;
195 return m_cachedChannelsF001.find((unsigned int) hash)->second;
196}
const float m_nillfloat
std::map< unsigned int, float > m_cachedChannelsF001

◆ getChannelNoise()

const float & CscCondDbData::getChannelNoise ( IdentifierHash hash) const

Definition at line 200 of file CscCondDbData.cxx.

200 {
201 if(m_cachedChannelsNoise.find((unsigned int) hash)==m_cachedChannelsNoise.end()) return m_nillfloat;
202 return m_cachedChannelsNoise.find((unsigned int) hash)->second;
203}
std::map< unsigned int, float > m_cachedChannelsNoise

◆ getChannelPed()

const float & CscCondDbData::getChannelPed ( IdentifierHash hash) const

Definition at line 207 of file CscCondDbData.cxx.

207 {
208 if(m_cachedChannelsPed.find((unsigned int) hash)==m_cachedChannelsPed.end()) return m_nillfloat;
209 return m_cachedChannelsPed.find((unsigned int) hash)->second;
210}
std::map< unsigned int, float > m_cachedChannelsPed

◆ getChannelPSlope()

const float & CscCondDbData::getChannelPSlope ( IdentifierHash hash) const

Definition at line 214 of file CscCondDbData.cxx.

214 {
215 if(m_cachedChannelsPSlope.find((unsigned int) hash)==m_cachedChannelsPSlope.end()) return m_nillfloat;
216 return m_cachedChannelsPSlope.find((unsigned int) hash)->second;
217}
std::map< unsigned int, float > m_cachedChannelsPSlope

◆ getChannelRMS()

const float & CscCondDbData::getChannelRMS ( IdentifierHash hash) const

Definition at line 221 of file CscCondDbData.cxx.

221 {
222 if(m_cachedChannelsRMS.find((unsigned int) hash)==m_cachedChannelsRMS.end()) return m_nillfloat;
223 return m_cachedChannelsRMS.find((unsigned int) hash)->second;
224}
std::map< unsigned int, float > m_cachedChannelsRMS

◆ getChannelStatus()

const int & CscCondDbData::getChannelStatus ( IdentifierHash hash) const

Definition at line 228 of file CscCondDbData.cxx.

228 {
229 if(m_cachedChannelsStatus.find((unsigned int) hash)==m_cachedChannelsStatus.end()) return m_nillint;
230 return m_cachedChannelsStatus.find((unsigned int) hash)->second;
231}
const int m_nillint
std::map< unsigned int, int > m_cachedChannelsStatus

◆ getChannelT0Base()

const float & CscCondDbData::getChannelT0Base ( IdentifierHash hash) const

Definition at line 235 of file CscCondDbData.cxx.

235 {
236 if(m_cachedChannelsT0Base.find((unsigned int) hash)==m_cachedChannelsT0Base.end()) return m_nillfloat;
237 return m_cachedChannelsT0Base.find((unsigned int) hash)->second;
238}
std::map< unsigned int, float > m_cachedChannelsT0Base

◆ getChannelT0Phase()

const bool & CscCondDbData::getChannelT0Phase ( IdentifierHash hash) const

Definition at line 242 of file CscCondDbData.cxx.

242 {
243 if(m_cachedChannelsT0Phase.find((unsigned int) hash)==m_cachedChannelsT0Phase.end()) return m_nillbool;
244 return m_cachedChannelsT0Phase.find((unsigned int) hash)->second;
245}
std::map< unsigned int, bool > m_cachedChannelsT0Phase
const bool m_nillbool

◆ getDeadChannelsHash()

const std::vector< unsigned int > & CscCondDbData::getDeadChannelsHash ( ) const

Definition at line 176 of file CscCondDbData.cxx.

176 {
178 return m_emptyHashs;
179}
std::vector< unsigned int > m_emptyHashs
std::vector< unsigned int > m_cachedDeadChannelsHash

◆ getDeadLayers()

const std::vector< std::string > & CscCondDbData::getDeadLayers ( ) const

Definition at line 144 of file CscCondDbData.cxx.

144 {
145 if(m_cachedDeadLayers.size()!=0) return m_cachedDeadLayers;
146 return m_emptyNames;
147}
std::vector< std::string > m_cachedDeadLayers
std::vector< std::string > m_emptyNames

◆ getDeadLayersId()

const std::vector< Identifier > & CscCondDbData::getDeadLayersId ( ) const

Definition at line 160 of file CscCondDbData.cxx.

160 {
161 if(m_cachedDeadLayersId.size()!=0) return m_cachedDeadLayersId;
162 return m_emptyIds;
163}
std::vector< Identifier > m_emptyIds
std::vector< Identifier > m_cachedDeadLayersId

◆ getDeadStations()

const std::vector< std::string > & CscCondDbData::getDeadStations ( ) const

Definition at line 151 of file CscCondDbData.cxx.

151 {
152 if(m_cachedDeadStations.size()!=0) return m_cachedDeadStations;
153 return m_emptyNames;
154}
std::vector< std::string > m_cachedDeadStations

◆ getDeadStationsId()

const std::vector< Identifier > & CscCondDbData::getDeadStationsId ( ) const

Definition at line 167 of file CscCondDbData.cxx.

167 {
169 return m_emptyIds;
170}
std::vector< Identifier > m_cachedDeadStationsId

◆ hasChannelT0Phase()

bool CscCondDbData::hasChannelT0Phase ( IdentifierHash hash) const

Definition at line 186 of file CscCondDbData.cxx.

186 {
187 if(m_cachedChannelsT0Phase.find((unsigned int) hash)==m_cachedChannelsT0Phase.end()) return false;
188 return true;
189}

◆ indexToStringId()

StatusCode CscCondDbData::indexToStringId ( const CscIdHelper * idHelper,
const unsigned int & index,
const std::string & cat,
std::string & idString ) const

Definition at line 347 of file CscCondDbData.cxx.

347 {
348 // copy-paste from CscCoolStrSvc
349
350 //There is no string id for the CSC category.
351 if(cat == "CSC") {
352 idString = "";
353 return StatusCode::SUCCESS;
354 }
355 if(cat == "ENDCAP") {
356 if(index == 0)
357 idString = "-1";
358 if(index == 1)
359 idString = "1";
360 else {
361 MsgStream log(Athena::getMessageSvc(),"CscCondDbData");
362 log << MSG::INFO << "Requested index " << index << " can't be converted to a string Id for the category " << cat << endmsg;
363 return StatusCode::RECOVERABLE;
364 }
365 }
366
367 //remaining categories need online identifiers
368 unsigned int onlineId = 0;
369 std::stringstream ss;
370 if(cat == "CHAMBER"){
371 Identifier chamberId;
372 idHelper->get_id(IdentifierHash(index), chamberId, &m_moduleContext);
373 if(!offlineElementToOnlineId(idHelper, chamberId, onlineId).isSuccess()) {
374 MsgStream log(Athena::getMessageSvc(),"CscCondDbData");
375 log << MSG::INFO << "Failed converting chamber identifier to online id during stringId gen." << endmsg;
376 return StatusCode::RECOVERABLE;
377 }
378 }
379 else if(cat == "LAYER"){
380 unsigned int onlineId;
381 if(!layerHashToOnlineId(index, onlineId)){
382 MsgStream log(Athena::getMessageSvc(),"CscCondDbData");
383 log << MSG::INFO << "Failed at getting online id from layer hash during stringId gen." << endmsg;
384 }
385 }
386 else if(cat == "CHANNEL"){
387 Identifier channelId;
388 idHelper->get_id(IdentifierHash(index), channelId, &m_channelContext);
389 if(!offlineToOnlineId(idHelper, channelId, onlineId).isSuccess()) {
390 MsgStream log(Athena::getMessageSvc(),"CscCondDbData");
391 log << MSG::INFO << "Failed converting chamber identifier to online id during stringId gen." << endmsg;
392 return StatusCode::RECOVERABLE;
393 }
394 }
395
396 ss << std::hex << std::setfill('0') << std::setw(5) << onlineId << std::dec;
397 idString = ss.str();
398 return StatusCode::SUCCESS;
399}
#define endmsg
static Double_t ss
StatusCode offlineToOnlineId(const CscIdHelper *, const Identifier &, unsigned int &) const
StatusCode offlineElementToOnlineId(const CscIdHelper *, const Identifier &, unsigned int &) const
IdContext m_channelContext
StatusCode layerHashToOnlineId(const unsigned int &, unsigned int &) const
IdContext m_moduleContext
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const override
Create compact id from hash id (return == 0 for OK)
IMessageSvc * getMessageSvc(bool quiet=false)
str index
Definition DeMoScan.py:362

◆ isGood()

bool CscCondDbData::isGood ( const Identifier & Id) const

Definition at line 309 of file CscCondDbData.cxx.

309 {
310 // probing id in all lists
311 if(not isGoodLayer (Id)) return false;
312 if(not isGoodStation (Id)) return false;
313 return true;
314}
bool isGoodStation(const Identifier &) const
bool isGoodLayer(const Identifier &) const

◆ isGoodChannelHash()

bool CscCondDbData::isGoodChannelHash ( const IdentifierHash & hash) const

Definition at line 318 of file CscCondDbData.cxx.

318 {
319 if(m_cachedDeadChannelsHash.size()==0) return true;
320 bool found = std::find(m_cachedDeadChannelsHash.begin(), m_cachedDeadChannelsHash.end(), (unsigned int) hash) != m_cachedDeadChannelsHash.end();
321 return !found;
322}

◆ isGoodLayer()

bool CscCondDbData::isGoodLayer ( const Identifier & Id) const

Definition at line 326 of file CscCondDbData.cxx.

326 {
327 if(m_cachedDeadLayersId.size()==0) return true;
328 bool found = std::find(m_cachedDeadLayersId.begin(), m_cachedDeadLayersId.end(), Id)!=m_cachedDeadLayersId.end();
329 return !found;
330}

◆ isGoodStation()

bool CscCondDbData::isGoodStation ( const Identifier & Id) const

Definition at line 334 of file CscCondDbData.cxx.

334 {
335 if(m_cachedDeadStationsId.size()==0) return true;
336 bool found = std::find(m_cachedDeadStationsId.begin(), m_cachedDeadStationsId.end(), Id)!=m_cachedDeadStationsId.end();
337 return !found;
338}

◆ layerHashToOnlineId()

StatusCode CscCondDbData::layerHashToOnlineId ( const unsigned int & layerHash,
unsigned int & onlineId ) const

Definition at line 404 of file CscCondDbData.cxx.

404 {
405 // copy-paste from CscCoolStrSvc
406
407 if(layerHash >= m_onlineChannelIdsFromLayerHash.size()) {
408 MsgStream log(Athena::getMessageSvc(),"CscCondDbData");
409 log << MSG::INFO << "Tried to lookup online id from layer hash " << layerHash <<". Max is " << m_onlineChannelIdsFromLayerHash.size() << endmsg;
410 return StatusCode::SUCCESS;
411 }
413 return StatusCode::SUCCESS;
414}
std::vector< unsigned int > m_onlineChannelIdsFromLayerHash
IdentifierHash layerHash(const UncalibratedMeasurement *meas)
Returns the layer hash from an uncalibrated meaurement.

◆ loadParameters()

void CscCondDbData::loadParameters ( const CscIdHelper * idHelper)

Definition at line 14 of file CscCondDbData.cxx.

14 {
15
16 // prepare contexts
17 m_moduleContext = idHelper->module_context();
19
20
21 for(int stationName = 0; stationName < 2; stationName++){
22 for(int stationEta =0; stationEta <2; stationEta++){
23 for(int stationPhi = 0; stationPhi <8; stationPhi++){
24 for(int wireLayer = 0; wireLayer <4; wireLayer++){
25 for(int measuresPhi = 0; measuresPhi <2; measuresPhi++){
26 Identifier id = idHelper->channelID(
27 stationName+1,
28 (stationEta? 1:-1),
29 stationPhi+1,
30 2,//only installed chamber layer
31 wireLayer+1,
32 measuresPhi,
33 1 //channel doesn't matter. We'll just use first
34 );
35 unsigned int onlineId;
36 if(!offlineToOnlineId(idHelper, id, onlineId).isSuccess()) {
37 MsgStream log(Athena::getMessageSvc(),"CscCondDbData");
38 log << MSG::WARNING << "Failed at geting online id!" << endmsg;
39 }
40 else {
41 m_onlineChannelIdsFromLayerHash.push_back(onlineId);
42 }
43 }
44 }
45 }
46 }
47 }
48}
Identifier channelID(int stationName, int stationEta, int stationPhi, int chamberLayer, int wireLayer, int measuresPhi, int strip) const
IdContext module_context() const
id for module
IdContext channel_context() const
id for channel
constexpr uint8_t stationPhi
station Phi 1 to 8

◆ offlineElementToOnlineId()

StatusCode CscCondDbData::offlineElementToOnlineId ( const CscIdHelper * idHelper,
const Identifier & id,
unsigned int & onlineId ) const

Definition at line 419 of file CscCondDbData.cxx.

419 {
420 // copy-paste from CscCoolStrSvc
421
422 onlineId = 0;
423 //Phi,wireLayer,and strip all are offset by one between the two schemes.
424 //Also, station name is 50 or 51 in Identifiers, but only 0 or 1 in
425 //the online id.
426 int stationName ((idHelper->stationName(id) -50)&0x1 ); // 0001 0000 0000 0000 0000
427 int phi = (idHelper->stationPhi(id) - 1)&0x7 ; // 0000 1110 0000 0000 0000
428 int eta = ((idHelper->stationEta(id) == 1) ? 1:0) &0x1; // 0000 0001 0000 0000 0000
429 int chamLay = 1; // 0000 0000 1000 0000 0000
430 int wireLay = 0; // 0000 0000 0110 0000 0000
431 int measuresPhi = 0; // 0000 0000 0001 0000 0000
432 int strip = 0; // 0000 0000 0000 1111 1111
433
434 onlineId += (stationName << 16); // 0001 0000 0000 0000 0000
435 onlineId += (phi << 13) ; // 0000 1110 0000 0000 0000
436 onlineId += (eta <<12); // 0000 0001 0000 0000 0000
437 onlineId += (chamLay <<11); // 0000 0000 1000 0000 0000
438 onlineId += (wireLay << 9); // 0000 0000 0110 0000 0000
439 onlineId += (measuresPhi << 8); // 0000 0000 0001 0000 0000
440 onlineId += strip ; // 0000 0000 0000 1111 1111
441 return StatusCode::SUCCESS;
442}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
int stationEta(const Identifier &id) const
int stationPhi(const Identifier &id) const
int stationName(const Identifier &id) const

◆ offlineToOnlineId()

StatusCode CscCondDbData::offlineToOnlineId ( const CscIdHelper * idHelper,
const Identifier & id,
unsigned int & onlineId ) const

Definition at line 447 of file CscCondDbData.cxx.

447 {
448 // copy-paste from CscCoolStrSvc
449
450 onlineId = 0;
451 //Phi,wireLayer,and strip all are offset by one between the two schemes.
452 //Also, station name is 50 or 51 in Identifiers, but only 0 or 1 in
453 //the online id.
454 int stationName ((idHelper->stationName(id) -50)&0x1 ); // 0001 0000 0000 0000 0000
455 int phi = (idHelper->stationPhi(id) - 1)&0x7 ; // 0000 1110 0000 0000 0000
456 int eta = ((idHelper->stationEta(id) == 1) ? 1:0) &0x1; // 0000 0001 0000 0000 0000
457 int chamLay = (idHelper->chamberLayer(id)-1) &0x1; // 0000 0000 1000 0000 0000
458 int wireLay = (idHelper->wireLayer(id)-1) &0x3; // 0000 0000 0110 0000 0000
459 int measuresPhi = (idHelper->measuresPhi(id) &0x1); // 0000 0000 0001 0000 0000
460 int strip; // 0000 0000 0000 1111 1111
461
462 //Online and offline phi ids are flipped on A wheel
463 if(m_onlineOfflinePhiFlip && measuresPhi && eta == 1){
464 strip = (48 - (idHelper->strip(id))) & 0xff;
465 }
466 else {
467 strip = (idHelper->strip(id)-1) & 0xff;
468 }
469
470
471 onlineId += (stationName << 16); // 0001 0000 0000 0000 0000
472 onlineId += (phi << 13) ; // 0000 1110 0000 0000 0000
473 onlineId += (eta <<12); // 0000 0001 0000 0000 0000
474 onlineId += (chamLay <<11); // 0000 0000 1000 0000 0000
475 onlineId += (wireLay << 9); // 0000 0000 0110 0000 0000
476 onlineId += (measuresPhi << 8); // 0000 0000 0001 0000 0000
477 onlineId += strip ; // 0000 0000 0000 1111 1111
478 return StatusCode::SUCCESS;
479}
bool m_onlineOfflinePhiFlip
int wireLayer(const Identifier &id) const
int chamberLayer(const Identifier &id) const
int strip(const Identifier &id) const
bool measuresPhi(const Identifier &id) const override

◆ onlineToOfflineIds()

StatusCode CscCondDbData::onlineToOfflineIds ( const CscIdHelper * idHelper,
const unsigned int & onlineId,
Identifier & elementId,
Identifier & channelId ) const

Definition at line 483 of file CscCondDbData.cxx.

483 {
484 // copy-paste from CscCoolStrSvc
485
486 int stationName = ((onlineId >> 16)&0x1) + 50;
487 int phi = ((onlineId >> 13)&0x7)+1;
488 int eta = ((((onlineId >> 12)&0x1) == 1) ? 1:-1);
489 int chamLay = ((onlineId>>11)&0x1) +1;
490 int wireLay = ((onlineId>>9)&0x3) +1;
491 int measuresPhi = ((onlineId >> 8)&0x1);
492 int strip;
493
494 //Online and offline phi ids are flipped on A wheel
495 if(m_onlineOfflinePhiFlip && measuresPhi && eta == 1){
496 strip = 48 - ((onlineId)&0xff) ; //equivalent: 49 -( onlineId&0xff +1)
497 }
498 else {
499 strip = ((onlineId)&0xff) +1;
500 }
501
502 elementId = idHelper->elementID(stationName,eta,phi);
503
504 // The following call of channelID with check=true ensures that the identifier is checked to be physically valid.
505 // This is currently required to be checked when running with layouts which do not contain all CSCs anymore, since the
506 // CSCCool database contains still all CSCs. A clean fix would be to have a dedicated database for every layout.
507 bool isValid = true;
508 channelId = idHelper->channelID(stationName,eta,phi,chamLay,wireLay,measuresPhi,strip,isValid);
509 static std::atomic<bool> conversionFailPrinted = false;
510 if (!isValid) {
511 if (!conversionFailPrinted) {
512 MsgStream log(Athena::getMessageSvc(),"CscCondDbData");
513 log << MSG::WARNING << "Failed to retrieve offline Identifier from online Identifier " << onlineId
514 << " (station " << stationName << ", eta=" << eta << ", phi=" << phi << "). "
515 << "This is likely due to the fact that the CSCCool database contains "
516 << "more entries than the detector layout." << endmsg;
517 conversionFailPrinted = true;
518 }
519 return StatusCode::FAILURE;
520 }
521
522 return StatusCode::SUCCESS;
523}
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition AtlasPID.h:878
Identifier elementID(int stationName, int stationEta, int stationPhi) const

◆ readChannelF001()

StatusCode CscCondDbData::readChannelF001 ( IdentifierHash hash,
float & val ) const

Definition at line 248 of file CscCondDbData.cxx.

248 {
249 val = getChannelF001(hash);
250 if(val==-1) return StatusCode::FAILURE;
251 return StatusCode::SUCCESS;
252}
const float & getChannelF001(IdentifierHash) const

◆ readChannelNoise()

StatusCode CscCondDbData::readChannelNoise ( IdentifierHash hash,
float & val ) const

Definition at line 255 of file CscCondDbData.cxx.

255 {
256 val = getChannelNoise(hash);
257 if(val==-1) return StatusCode::FAILURE;
258 return StatusCode::SUCCESS;
259}
const float & getChannelNoise(IdentifierHash) const

◆ readChannelParam()

template<typename T>
StatusCode CscCondDbData::readChannelParam ( IdentifierHash hash,
T & val,
const std::string & parName ) const
inline

Definition at line 127 of file CscCondDbData.h.

127 {
128
129 if (parName == "f001" ) { float theVal; auto sc = readChannelF001 (hash, theVal); val = theVal; return sc;}
130 else if(parName == "noise" ) { float theVal; auto sc = readChannelNoise (hash, theVal); val = theVal; return sc;}
131 else if(parName == "ped" ) { float theVal; auto sc = readChannelPed (hash, theVal); val = theVal; return sc;}
132 else if(parName == "pslope" ) { float theVal; auto sc = readChannelPSlope (hash, theVal); val = theVal; return sc;}
133 else if(parName == "rms" ) { float theVal; auto sc = readChannelRMS (hash, theVal); val = theVal; return sc;}
134 else if(parName == "status" ) { int theVal; auto sc = readChannelStatus (hash, theVal); val = theVal; return sc;}
135 else if(parName == "t0base" ) { float theVal; auto sc = readChannelT0Base (hash, theVal); val = theVal; return sc;}
136 else if(parName == "t0phase") { bool theVal; auto sc = readChannelT0Phase(hash, theVal); val = theVal; return sc;}
137 return StatusCode::FAILURE;
138 }
static Double_t sc
StatusCode readChannelPed(IdentifierHash, float &) const
StatusCode readChannelT0Base(IdentifierHash, float &) const
StatusCode readChannelT0Phase(IdentifierHash, bool &) const
StatusCode readChannelRMS(IdentifierHash, float &) const
StatusCode readChannelStatus(IdentifierHash, int &) const
StatusCode readChannelPSlope(IdentifierHash, float &) const
StatusCode readChannelNoise(IdentifierHash, float &) const
StatusCode readChannelF001(IdentifierHash, float &) const

◆ readChannelPed()

StatusCode CscCondDbData::readChannelPed ( IdentifierHash hash,
float & val ) const

Definition at line 262 of file CscCondDbData.cxx.

262 {
263 val = getChannelPed(hash);
264 if(val==-1) return StatusCode::FAILURE;
265 return StatusCode::SUCCESS;
266}
const float & getChannelPed(IdentifierHash) const

◆ readChannelPSlope()

StatusCode CscCondDbData::readChannelPSlope ( IdentifierHash hash,
float & val ) const

Definition at line 269 of file CscCondDbData.cxx.

269 {
270 val = getChannelPSlope(hash);
271 if(val==-1) return StatusCode::FAILURE;
272 return StatusCode::SUCCESS;
273}
const float & getChannelPSlope(IdentifierHash) const

◆ readChannelRMS()

StatusCode CscCondDbData::readChannelRMS ( IdentifierHash hash,
float & val ) const

Definition at line 276 of file CscCondDbData.cxx.

276 {
277 val = getChannelRMS(hash);
278 if(val==-1) return StatusCode::FAILURE;
279 return StatusCode::SUCCESS;
280}
const float & getChannelRMS(IdentifierHash) const

◆ readChannelStatus()

StatusCode CscCondDbData::readChannelStatus ( IdentifierHash hash,
int & val ) const

Definition at line 283 of file CscCondDbData.cxx.

283 {
284 val = getChannelStatus(hash);
285 if(val==-1) return StatusCode::FAILURE;
286 return StatusCode::SUCCESS;
287}
const int & getChannelStatus(IdentifierHash) const

◆ readChannelT0Base()

StatusCode CscCondDbData::readChannelT0Base ( IdentifierHash hash,
float & val ) const

Definition at line 290 of file CscCondDbData.cxx.

290 {
291 val = getChannelT0Base(hash);
292 if(val==-1) return StatusCode::FAILURE;
293 return StatusCode::SUCCESS;
294}
const float & getChannelT0Base(IdentifierHash) const

◆ readChannelT0Phase()

StatusCode CscCondDbData::readChannelT0Phase ( IdentifierHash hash,
bool & val ) const

Definition at line 297 of file CscCondDbData.cxx.

297 {
298 if(!hasChannelT0Phase(hash)) return StatusCode::FAILURE;
299 val = getChannelT0Phase(hash);
300 return StatusCode::SUCCESS;
301}
const bool & getChannelT0Phase(IdentifierHash) const
bool hasChannelT0Phase(IdentifierHash) const

◆ setChannelF001()

void CscCondDbData::setChannelF001 ( IdentifierHash hash,
float f001 )

Definition at line 62 of file CscCondDbData.cxx.

62 {
63 m_cachedChannelsF001[(unsigned int) hash] = f001;
64}

◆ setChannelNoise()

void CscCondDbData::setChannelNoise ( IdentifierHash hash,
float noise )

Definition at line 68 of file CscCondDbData.cxx.

68 {
69 m_cachedChannelsNoise[(unsigned int) hash] = noise;
70}

◆ setChannelPed()

void CscCondDbData::setChannelPed ( IdentifierHash hash,
float ped )

Definition at line 74 of file CscCondDbData.cxx.

74 {
75 m_cachedChannelsPed[(unsigned int) hash] = ped;
76}

◆ setChannelPSlope()

void CscCondDbData::setChannelPSlope ( IdentifierHash hash,
float pslope )

Definition at line 80 of file CscCondDbData.cxx.

80 {
81 m_cachedChannelsPSlope[(unsigned int) hash] = pslope;
82}

◆ setChannelRMS()

void CscCondDbData::setChannelRMS ( IdentifierHash hash,
float rms )

Definition at line 86 of file CscCondDbData.cxx.

86 {
87 m_cachedChannelsRMS[(unsigned int) hash] = rms;
88}

◆ setChannelStatus()

void CscCondDbData::setChannelStatus ( IdentifierHash hash,
int status )

Definition at line 92 of file CscCondDbData.cxx.

92 {
93 m_cachedChannelsStatus[(unsigned int) hash] = status;
94 if((status & 0x1) || ((status >> 1) & 0x1)) setDeadChannelHash(hash);
95}
void setDeadChannelHash(IdentifierHash)

◆ setChannelT0Base()

void CscCondDbData::setChannelT0Base ( IdentifierHash hash,
float t0base )

Definition at line 99 of file CscCondDbData.cxx.

99 {
100 m_cachedChannelsT0Base[(unsigned int) hash] = t0base;
101}

◆ setChannelT0Phase()

void CscCondDbData::setChannelT0Phase ( IdentifierHash hash,
bool t0phase )

Definition at line 105 of file CscCondDbData.cxx.

105 {
106 m_cachedChannelsT0Phase[(unsigned int) hash] = t0phase;
107}

◆ setDeadChannelHash()

void CscCondDbData::setDeadChannelHash ( IdentifierHash hash)

Definition at line 115 of file CscCondDbData.cxx.

115 {
116 if(std::find(m_cachedDeadChannelsHash.begin(), m_cachedDeadChannelsHash.end(), (unsigned int) hash) != m_cachedDeadChannelsHash.end()) return;
117 m_cachedDeadChannelsHash.push_back((unsigned int) hash);
118}

◆ setDeadLayer()

void CscCondDbData::setDeadLayer ( std::string_view name,
Identifier Id )

Definition at line 122 of file CscCondDbData.cxx.

122 {
123 if(std::find(m_cachedDeadLayersId.begin(), m_cachedDeadLayersId.end(), Id)!=m_cachedDeadLayersId.end()) return;
124 m_cachedDeadLayers .push_back(std::string(name));
125 m_cachedDeadLayersId.push_back(Id );
126}

◆ setDeadStation()

void CscCondDbData::setDeadStation ( std::string_view name,
Identifier Id )

Definition at line 130 of file CscCondDbData.cxx.

130 {
131 if(std::find(m_cachedDeadStationsId.begin(), m_cachedDeadStationsId.end(), Id)!=m_cachedDeadStationsId.end()) return;
132 m_cachedDeadStations .push_back(std::string(name));
133 m_cachedDeadStationsId.push_back(Id );
134}

◆ setParameters()

void CscCondDbData::setParameters ( bool onlineOfflinePhiFlip)

Definition at line 53 of file CscCondDbData.cxx.

53 {
54 m_onlineOfflinePhiFlip = onlineOfflinePhiFlip;
55}

◆ CscCondDbAlg

friend class CscCondDbAlg
friend

Definition at line 26 of file CscCondDbData.h.

Member Data Documentation

◆ m_cachedChannelsF001

std::map<unsigned int, float> CscCondDbData::m_cachedChannelsF001 {}
private

Definition at line 107 of file CscCondDbData.h.

107{};

◆ m_cachedChannelsNoise

std::map<unsigned int, float> CscCondDbData::m_cachedChannelsNoise {}
private

Definition at line 108 of file CscCondDbData.h.

108{};

◆ m_cachedChannelsPed

std::map<unsigned int, float> CscCondDbData::m_cachedChannelsPed {}
private

Definition at line 109 of file CscCondDbData.h.

109{};

◆ m_cachedChannelsPSlope

std::map<unsigned int, float> CscCondDbData::m_cachedChannelsPSlope {}
private

Definition at line 110 of file CscCondDbData.h.

110{};

◆ m_cachedChannelsRMS

std::map<unsigned int, float> CscCondDbData::m_cachedChannelsRMS {}
private

Definition at line 111 of file CscCondDbData.h.

111{};

◆ m_cachedChannelsStatus

std::map<unsigned int, int > CscCondDbData::m_cachedChannelsStatus {}
private

Definition at line 112 of file CscCondDbData.h.

112{};

◆ m_cachedChannelsT0Base

std::map<unsigned int, float> CscCondDbData::m_cachedChannelsT0Base {}
private

Definition at line 113 of file CscCondDbData.h.

113{};

◆ m_cachedChannelsT0Phase

std::map<unsigned int, bool > CscCondDbData::m_cachedChannelsT0Phase {}
private

Definition at line 114 of file CscCondDbData.h.

114{};

◆ m_cachedDeadChannelsHash

std::vector<unsigned int> CscCondDbData::m_cachedDeadChannelsHash {}
private

Definition at line 105 of file CscCondDbData.h.

105{};

◆ m_cachedDeadLayers

std::vector<std::string> CscCondDbData::m_cachedDeadLayers {}
private

Definition at line 99 of file CscCondDbData.h.

99{};

◆ m_cachedDeadLayersId

std::vector<Identifier> CscCondDbData::m_cachedDeadLayersId {}
private

Definition at line 102 of file CscCondDbData.h.

102{};

◆ m_cachedDeadStations

std::vector<std::string> CscCondDbData::m_cachedDeadStations {}
private

Definition at line 100 of file CscCondDbData.h.

100{};

◆ m_cachedDeadStationsId

std::vector<Identifier> CscCondDbData::m_cachedDeadStationsId {}
private

Definition at line 103 of file CscCondDbData.h.

103{};

◆ m_channelContext

IdContext CscCondDbData::m_channelContext {}
private

Definition at line 93 of file CscCondDbData.h.

93{};

◆ m_emptyHashs

std::vector<unsigned int> CscCondDbData::m_emptyHashs {}
private

Definition at line 118 of file CscCondDbData.h.

118{};

◆ m_emptyIds

std::vector<Identifier> CscCondDbData::m_emptyIds {}
private

Definition at line 117 of file CscCondDbData.h.

117{};

◆ m_emptyNames

std::vector<std::string> CscCondDbData::m_emptyNames {}
private

Definition at line 116 of file CscCondDbData.h.

116{};

◆ m_moduleContext

IdContext CscCondDbData::m_moduleContext {}
private

Definition at line 94 of file CscCondDbData.h.

94{};

◆ m_nillbool

const bool CscCondDbData::m_nillbool = false
private

Definition at line 120 of file CscCondDbData.h.

◆ m_nillfloat

const float CscCondDbData::m_nillfloat = -1
private

Definition at line 121 of file CscCondDbData.h.

◆ m_nillint

const int CscCondDbData::m_nillint = -1
private

Definition at line 122 of file CscCondDbData.h.

◆ m_onlineChannelIdsFromChamberCoolChannel

std::vector<unsigned int> CscCondDbData::m_onlineChannelIdsFromChamberCoolChannel {}
private

Definition at line 97 of file CscCondDbData.h.

97{};

◆ m_onlineChannelIdsFromLayerHash

std::vector<unsigned int> CscCondDbData::m_onlineChannelIdsFromLayerHash {}
private

Definition at line 96 of file CscCondDbData.h.

96{};

◆ m_onlineOfflinePhiFlip

bool CscCondDbData::m_onlineOfflinePhiFlip {true}
private

Definition at line 91 of file CscCondDbData.h.

91{true};

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