ATLAS Offline Software
Public Member Functions | Private Attributes | Friends | List of all members
LArLATOMEMapping Class Reference

class to provide SC mapping More...

#include <LArLATOMEMapping.h>

Collaboration diagram for LArLATOMEMapping:

Public Member Functions

 LArLATOMEMapping (unsigned nLatomes=0)
 
HWIdentifier getChannelID (const unsigned int sourceID, const unsigned int chan) const
 create a HWIdentifier from an Identifier
More...
 

Private Attributes

const HWIdentifier m_hwidEmpty
 Invalid default instance of HWIdentifier. More...
 
std::vector< unsigned int > m_sourceID
 
std::vector< std::vector< HWIdentifier > > m_onlineID
 
std::unordered_map< unsigned, std::vector< HWIdentifier > > m_map
 

Friends

class LArLATOMEMappingAlg
 class which fills object from conditions DB
More...
 

Detailed Description

class to provide SC mapping

Definition at line 28 of file LArLATOMEMapping.h.

Constructor & Destructor Documentation

◆ LArLATOMEMapping()

LArLATOMEMapping::LArLATOMEMapping ( unsigned  nLatomes = 0)

Definition at line 8 of file LArLATOMEMapping.cxx.

9 {
10  if(nLatomes == 0) {
11  m_sourceID.resize(N_LATOMES);
12  m_onlineID.resize(N_LATOMES);
13  } else {
14  m_sourceID.resize(nLatomes);
15  m_onlineID.resize(nLatomes);
16  }
17 }

Member Function Documentation

◆ getChannelID()

HWIdentifier LArLATOMEMapping::getChannelID ( const unsigned int  sourceID,
const unsigned int  chan 
) const
inline

create a HWIdentifier from an Identifier

Definition at line 60 of file LArLATOMEMapping.h.

60  {
61  auto it = m_map.find(sourceID);
62  if (ATH_UNLIKELY(it == m_map.end())) {
63  return m_hwidEmpty;
64  }
65  const std::vector<HWIdentifier>& chanVec = it->second;
66  if (ATH_UNLIKELY(chan >= chanVec.size())) {
67  return m_hwidEmpty;
68  }
69  return chanVec[chan];
70 }

Friends And Related Function Documentation

◆ LArLATOMEMappingAlg

friend class LArLATOMEMappingAlg
friend

class which fills object from conditions DB

Definition at line 34 of file LArLATOMEMapping.h.

Member Data Documentation

◆ m_hwidEmpty

const HWIdentifier LArLATOMEMapping::m_hwidEmpty
private

Invalid default instance of HWIdentifier.

Definition at line 50 of file LArLATOMEMapping.h.

◆ m_map

std::unordered_map<unsigned,std::vector< HWIdentifier> > LArLATOMEMapping::m_map
private

Definition at line 54 of file LArLATOMEMapping.h.

◆ m_onlineID

std::vector<std::vector< HWIdentifier> > LArLATOMEMapping::m_onlineID
private

Definition at line 53 of file LArLATOMEMapping.h.

◆ m_sourceID

std::vector<unsigned int> LArLATOMEMapping::m_sourceID
private

Definition at line 52 of file LArLATOMEMapping.h.


The documentation for this class was generated from the following files:
LArLATOMEMapping::m_map
std::unordered_map< unsigned, std::vector< HWIdentifier > > m_map
Definition: LArLATOMEMapping.h:54
skel.it
it
Definition: skel.GENtoEVGEN.py:396
LArLATOMEMapping::m_onlineID
std::vector< std::vector< HWIdentifier > > m_onlineID
Definition: LArLATOMEMapping.h:53
ATH_UNLIKELY
#define ATH_UNLIKELY(x)
Definition: AthUnlikelyMacros.h:17
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
LArLATOMEMapping::m_sourceID
std::vector< unsigned int > m_sourceID
Definition: LArLATOMEMapping.h:52
LArLATOMEMapping::m_hwidEmpty
const HWIdentifier m_hwidEmpty
Invalid default instance of HWIdentifier.
Definition: LArLATOMEMapping.h:50
N_LATOMES
#define N_LATOMES
Definition: LArLATOMEMapping.cxx:6