ATLAS Offline Software
Public Member Functions | Private Attributes | Friends | List of all members
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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ getDeadChannelsHash()

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

Definition at line 176 of file CscCondDbData.cxx.

176  {
178  return m_emptyHashs;
179 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ getDeadStationsId()

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

Definition at line 167 of file CscCondDbData.cxx.

167  {
168  if(m_cachedDeadStationsId.size()!=0) return m_cachedDeadStationsId;
169  return m_emptyIds;
170 }

◆ 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"){
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 }

◆ 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 }

◆ 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;
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;
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  }
412  onlineId = m_onlineChannelIdsFromLayerHash[layerHash];
413  return StatusCode::SUCCESS;
414 }

◆ 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();
18  m_channelContext = idHelper->channel_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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ readChannelF001()

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

Definition at line 248 of file CscCondDbData.cxx.

248  {
250  if(val==-1) return StatusCode::FAILURE;
251  return StatusCode::SUCCESS;
252 }

◆ readChannelNoise()

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

Definition at line 255 of file CscCondDbData.cxx.

255  {
257  if(val==-1) return StatusCode::FAILURE;
258  return StatusCode::SUCCESS;
259 }

◆ 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  }

◆ readChannelPed()

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

Definition at line 262 of file CscCondDbData.cxx.

262  {
264  if(val==-1) return StatusCode::FAILURE;
265  return StatusCode::SUCCESS;
266 }

◆ readChannelPSlope()

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

Definition at line 269 of file CscCondDbData.cxx.

269  {
271  if(val==-1) return StatusCode::FAILURE;
272  return StatusCode::SUCCESS;
273 }

◆ readChannelRMS()

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

Definition at line 276 of file CscCondDbData.cxx.

276  {
278  if(val==-1) return StatusCode::FAILURE;
279  return StatusCode::SUCCESS;
280 }

◆ readChannelStatus()

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

Definition at line 283 of file CscCondDbData.cxx.

283  {
285  if(val==-1) return StatusCode::FAILURE;
286  return StatusCode::SUCCESS;
287 }

◆ readChannelT0Base()

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

Definition at line 290 of file CscCondDbData.cxx.

290  {
292  if(val==-1) return StatusCode::FAILURE;
293  return StatusCode::SUCCESS;
294 }

◆ 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;
300  return StatusCode::SUCCESS;
301 }

◆ 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 }

◆ 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  {
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 }

Friends And Related Function Documentation

◆ 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.

◆ m_cachedChannelsNoise

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

Definition at line 108 of file CscCondDbData.h.

◆ m_cachedChannelsPed

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

Definition at line 109 of file CscCondDbData.h.

◆ m_cachedChannelsPSlope

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

Definition at line 110 of file CscCondDbData.h.

◆ m_cachedChannelsRMS

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

Definition at line 111 of file CscCondDbData.h.

◆ m_cachedChannelsStatus

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

Definition at line 112 of file CscCondDbData.h.

◆ m_cachedChannelsT0Base

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

Definition at line 113 of file CscCondDbData.h.

◆ m_cachedChannelsT0Phase

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

Definition at line 114 of file CscCondDbData.h.

◆ m_cachedDeadChannelsHash

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

Definition at line 105 of file CscCondDbData.h.

◆ m_cachedDeadLayers

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

Definition at line 99 of file CscCondDbData.h.

◆ m_cachedDeadLayersId

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

Definition at line 102 of file CscCondDbData.h.

◆ m_cachedDeadStations

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

Definition at line 100 of file CscCondDbData.h.

◆ m_cachedDeadStationsId

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

Definition at line 103 of file CscCondDbData.h.

◆ m_channelContext

IdContext CscCondDbData::m_channelContext {}
private

Definition at line 93 of file CscCondDbData.h.

◆ m_emptyHashs

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

Definition at line 118 of file CscCondDbData.h.

◆ m_emptyIds

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

Definition at line 117 of file CscCondDbData.h.

◆ m_emptyNames

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

Definition at line 116 of file CscCondDbData.h.

◆ m_moduleContext

IdContext CscCondDbData::m_moduleContext {}
private

Definition at line 94 of file CscCondDbData.h.

◆ 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.

◆ m_onlineChannelIdsFromLayerHash

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

Definition at line 96 of file CscCondDbData.h.

◆ m_onlineOfflinePhiFlip

bool CscCondDbData::m_onlineOfflinePhiFlip {true}
private

Definition at line 91 of file CscCondDbData.h.


The documentation for this class was generated from the following files:
CscCondDbData::readChannelRMS
StatusCode readChannelRMS(IdentifierHash, float &) const
Definition: CscCondDbData.cxx:276
CscCondDbData::getChannelPSlope
const float & getChannelPSlope(IdentifierHash) const
Definition: CscCondDbData.cxx:214
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:129
CscCondDbData::getChannelF001
const float & getChannelF001(IdentifierHash) const
Definition: CscCondDbData.cxx:193
SiliconTech::strip
@ strip
CscCondDbData::m_nillfloat
const float m_nillfloat
Definition: CscCondDbData.h:121
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
CscCondDbData::m_cachedChannelsNoise
std::map< unsigned int, float > m_cachedChannelsNoise
Definition: CscCondDbData.h:108
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
CscCondDbData::readChannelPed
StatusCode readChannelPed(IdentifierHash, float &) const
Definition: CscCondDbData.cxx:262
MuonIdHelper::get_id
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)
Definition: MuonIdHelper.cxx:69
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
CscCondDbData::setDeadChannelHash
void setDeadChannelHash(IdentifierHash)
Definition: CscCondDbData.cxx:115
CscCondDbData::readChannelT0Phase
StatusCode readChannelT0Phase(IdentifierHash, bool &) const
Definition: CscCondDbData.cxx:297
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
MuonIdHelper::channel_context
IdContext channel_context() const
id for channel
Definition: MuonIdHelper.cxx:745
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
index
Definition: index.py:1
CscCondDbData::m_onlineOfflinePhiFlip
bool m_onlineOfflinePhiFlip
Definition: CscCondDbData.h:91
CscCondDbData::m_cachedDeadLayers
std::vector< std::string > m_cachedDeadLayers
Definition: CscCondDbData.h:99
CscCondDbData::getChannelStatus
const int & getChannelStatus(IdentifierHash) const
Definition: CscCondDbData.cxx:228
CscCondDbData::m_cachedChannelsPed
std::map< unsigned int, float > m_cachedChannelsPed
Definition: CscCondDbData.h:109
CscCondDbData::m_cachedDeadStationsId
std::vector< Identifier > m_cachedDeadStationsId
Definition: CscCondDbData.h:103
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:804
CscCondDbData::m_moduleContext
IdContext m_moduleContext
Definition: CscCondDbData.h:94
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:214
CscCondDbData::offlineToOnlineId
StatusCode offlineToOnlineId(const CscIdHelper *, const Identifier &, unsigned int &) const
Definition: CscCondDbData.cxx:447
CscCondDbData::m_cachedChannelsPSlope
std::map< unsigned int, float > m_cachedChannelsPSlope
Definition: CscCondDbData.h:110
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
CscCondDbData::m_cachedDeadLayersId
std::vector< Identifier > m_cachedDeadLayersId
Definition: CscCondDbData.h:102
CscCondDbData::readChannelT0Base
StatusCode readChannelT0Base(IdentifierHash, float &) const
Definition: CscCondDbData.cxx:290
CscCondDbData::m_emptyNames
std::vector< std::string > m_emptyNames
Definition: CscCondDbData.h:116
CscIdHelper::wireLayer
int wireLayer(const Identifier &id) const
Definition: CscIdHelper.cxx:772
CscCondDbData::offlineElementToOnlineId
StatusCode offlineElementToOnlineId(const CscIdHelper *, const Identifier &, unsigned int &) const
Definition: CscCondDbData.cxx:419
CscCondDbData::m_emptyIds
std::vector< Identifier > m_emptyIds
Definition: CscCondDbData.h:117
CscCondDbData::getChannelRMS
const float & getChannelRMS(IdentifierHash) const
Definition: CscCondDbData.cxx:221
CscCondDbData::m_onlineChannelIdsFromLayerHash
std::vector< unsigned int > m_onlineChannelIdsFromLayerHash
Definition: CscCondDbData.h:96
CscCondDbData::readChannelPSlope
StatusCode readChannelPSlope(IdentifierHash, float &) const
Definition: CscCondDbData.cxx:269
CscCondDbData::readChannelStatus
StatusCode readChannelStatus(IdentifierHash, int &) const
Definition: CscCondDbData.cxx:283
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CscCondDbData::m_nillbool
const bool m_nillbool
Definition: CscCondDbData.h:120
beamspotnt.parName
list parName
Definition: bin/beamspotnt.py:1287
CscCondDbData::m_cachedDeadChannelsHash
std::vector< unsigned int > m_cachedDeadChannelsHash
Definition: CscCondDbData.h:105
CscCondDbData::readChannelNoise
StatusCode readChannelNoise(IdentifierHash, float &) const
Definition: CscCondDbData.cxx:255
CscCondDbData::readChannelF001
StatusCode readChannelF001(IdentifierHash, float &) const
Definition: CscCondDbData.cxx:248
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:814
CscCondDbData::getChannelNoise
const float & getChannelNoise(IdentifierHash) const
Definition: CscCondDbData.cxx:200
CscCondDbData::m_cachedChannelsF001
std::map< unsigned int, float > m_cachedChannelsF001
Definition: CscCondDbData.h:107
CscIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int chamberLayer, int wireLayer, int measuresPhi, int strip) const
Definition: CscIdHelper.cxx:706
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
CscCondDbData::m_cachedDeadStations
std::vector< std::string > m_cachedDeadStations
Definition: CscCondDbData.h:100
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:809
CscCondDbData::m_nillint
const int m_nillint
Definition: CscCondDbData.h:122
CscCondDbData::m_cachedChannelsT0Base
std::map< unsigned int, float > m_cachedChannelsT0Base
Definition: CscCondDbData.h:113
CscCondDbData::m_emptyHashs
std::vector< unsigned int > m_emptyHashs
Definition: CscCondDbData.h:118
CscIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: CscIdHelper.cxx:678
Example_ReadSampleNoise.ped
ped
Definition: Example_ReadSampleNoise.py:45
CscCondDbData::m_channelContext
IdContext m_channelContext
Definition: CscCondDbData.h:93
CscCondDbData::getChannelPed
const float & getChannelPed(IdentifierHash) const
Definition: CscCondDbData.cxx:207
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
CscCondDbData::hasChannelT0Phase
bool hasChannelT0Phase(IdentifierHash) const
Definition: CscCondDbData.cxx:186
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
CscIdHelper::strip
int strip(const Identifier &id) const
Definition: CscIdHelper.cxx:776
CscCondDbData::m_cachedChannelsStatus
std::map< unsigned int, int > m_cachedChannelsStatus
Definition: CscCondDbData.h:112
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MuonIdHelper::module_context
IdContext module_context() const
id for module
Definition: MuonIdHelper.cxx:735
beamspotnt.rms
rms
Definition: bin/beamspotnt.py:1266
CscCondDbData::isGoodStation
bool isGoodStation(const Identifier &) const
Definition: CscCondDbData.cxx:334
CscCondDbData::m_cachedChannelsT0Phase
std::map< unsigned int, bool > m_cachedChannelsT0Phase
Definition: CscCondDbData.h:114
merge.status
status
Definition: merge.py:17
CscIdHelper::measuresPhi
bool measuresPhi(const Identifier &id) const override
Definition: CscIdHelper.cxx:774
CscCondDbData::isGoodLayer
bool isGoodLayer(const Identifier &) const
Definition: CscCondDbData.cxx:326
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:127
IdentifierHash
Definition: IdentifierHash.h:38
CscCondDbData::m_cachedChannelsRMS
std::map< unsigned int, float > m_cachedChannelsRMS
Definition: CscCondDbData.h:111
WriteCellNoiseToCool.noise
noise
Definition: WriteCellNoiseToCool.py:380
CscIdHelper::chamberLayer
int chamberLayer(const Identifier &id) const
Definition: CscIdHelper.cxx:770
CscCondDbData::layerHashToOnlineId
StatusCode layerHashToOnlineId(const unsigned int &, unsigned int &) const
Definition: CscCondDbData.cxx:404
CscCondDbData::getChannelT0Base
const float & getChannelT0Base(IdentifierHash) const
Definition: CscCondDbData.cxx:235
CscCondDbData::getChannelT0Phase
const bool & getChannelT0Phase(IdentifierHash) const
Definition: CscCondDbData.cxx:242