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

#include <PixelCablingCondData.h>

Collaboration diagram for PixelCablingCondData:

Public Member Functions

 PixelCablingCondData ()
 
virtual ~PixelCablingCondData ()
 
 PixelCablingCondData (const PixelCablingCondData &other)=delete
 
PixelCablingCondDataoperator= (const PixelCablingCondData &other)=delete
 
void add_entry_onoff (const uint64_t, const Identifier)
 
void add_entry_offon (const Identifier, const uint64_t)
 
void add_entry_offrob (const Identifier, const uint32_t)
 
void add_entry_rodrob (int rodid, int robid)
 
void add_entry_robrod (int robid, int rodid)
 
void add_entry_offlineList (const uint32_t, const Identifier)
 
void add_entry_DCSoffline (const std::string &, const Identifier)
 
Identifier find_entry_onoff (const uint64_t) const
 
uint64_t find_entry_offon (const Identifier) const
 
uint32_t find_entry_offrob (Identifier offlineId) const
 
int find_entry_rodrob (const int rodid) const
 
int find_entry_robrod (const int robid) const
 
std::deque< Identifierfind_entry_offlineList (uint32_t robid) const
 
Identifier find_entry_DCSoffline (const std::string &DCSname) const
 
std::string find_entry_offlineDCS (const Identifier offlineId) const
 
uint64_t getOnlineIdFromRobId (uint32_t robid, uint32_t link) const
 
const std::vector< uint32_t > & get_allRods () const
 
const std::vector< uint32_t > & get_allRobs () const
 
unsigned int get_size_onoff ()
 
void set_readout_map (std::map< uint32_t, bool > rodReadoutMap)
 
const std::unordered_map< uint64_t, Identifier > & get_idMap_onoff () const
 
const std::unordered_map< Identifier, uint64_t, idHasher > & get_idMap_offon () const
 
const std::unordered_map< Identifier, uint32_t, idHasher > & get_idMap_offrob () const
 
const std::unordered_map< int, int > & get_idMap_rodrob () const
 
const std::unordered_map< int, int > & get_idMap_robrod () const
 
const std::unordered_map< std::string, Identifier > & get_idMapDCSoff () const
 
void clear ()
 

Private Attributes

std::unordered_map< uint64_t, Identifierm_idMap_onoff
 offline identifier -> online identifier map More...
 
std::unordered_map< Identifier, uint64_t, idHasherm_idMap_offon
 online identifier -> offline identifier map More...
 
std::unordered_map< Identifier, uint32_t, idHasherm_idMap_offrob
 offline identifier -> ROBId map More...
 
std::unordered_map< int, int > m_idMap_rodrob
 RODId -> ROBId map. More...
 
std::unordered_map< int, int > m_idMap_robrod
 ROBId -> RODId map (reverse of m_idMap_rodrob) More...
 
std::map< uint32_t, std::deque< Identifier > > m_offlineListVect
 ROBId -> offline identifier list. More...
 
std::unordered_map< std::string, Identifierm_idMapDCSoff
 DCS name -> offline identifier. More...
 
std::map< uint32_t, bool > m_rodReadoutMap
 Readout speed for each ROD. false=40MBit, true=80MBit. More...
 
std::vector< uint32_t > m_allRods
 
std::vector< uint32_t > m_allRobs
 

Detailed Description

Definition at line 26 of file PixelCablingCondData.h.

Constructor & Destructor Documentation

◆ PixelCablingCondData() [1/2]

PixelCablingCondData::PixelCablingCondData ( )

Definition at line 17 of file PixelCablingCondData.cxx.

17  :
18  m_idMap_onoff(),
19  m_idMap_offon(),
24  m_idMapDCSoff(),
26  m_allRods(),
27  m_allRobs()
28 { }

◆ ~PixelCablingCondData()

PixelCablingCondData::~PixelCablingCondData ( )
virtualdefault

◆ PixelCablingCondData() [2/2]

PixelCablingCondData::PixelCablingCondData ( const PixelCablingCondData other)
delete

Member Function Documentation

◆ add_entry_DCSoffline()

void PixelCablingCondData::add_entry_DCSoffline ( const std::string &  DCSname,
const Identifier  offlineId 
)

Definition at line 60 of file PixelCablingCondData.cxx.

60  {
61  m_idMapDCSoff.insert(std::make_pair(DCSname, offlineId));
62 }

◆ add_entry_offlineList()

void PixelCablingCondData::add_entry_offlineList ( const uint32_t  robid,
const Identifier  offlineId 
)

Definition at line 56 of file PixelCablingCondData.cxx.

56  {
57  m_offlineListVect[robid].push_back(offlineId); // add ROBid -> offline identifier pair in m_offlineListVect
58 }

◆ add_entry_offon()

void PixelCablingCondData::add_entry_offon ( const Identifier  offlineId,
const uint64_t  onlineId 
)

Definition at line 36 of file PixelCablingCondData.cxx.

36  {
37  m_idMap_offon.insert(std::make_pair(offlineId, onlineId)); // add offline identifier -> online identifier pair in m_idMap_offon
38 }

◆ add_entry_offrob()

void PixelCablingCondData::add_entry_offrob ( const Identifier  offlineId,
const uint32_t  robid 
)

Definition at line 40 of file PixelCablingCondData.cxx.

40  {
41  m_idMap_offrob.insert(std::make_pair(offlineId, robid)); // add offline identifier -> offline ROBId pair in m_idMap_offrob
42 }

◆ add_entry_onoff()

void PixelCablingCondData::add_entry_onoff ( const uint64_t  onlineId,
const Identifier  offlineId 
)

Definition at line 32 of file PixelCablingCondData.cxx.

32  {
33  m_idMap_onoff.insert(std::make_pair(onlineId, offlineId)); // add online identifier -> offline identifier pair in m_idMap_onoff
34 }

◆ add_entry_robrod()

void PixelCablingCondData::add_entry_robrod ( int  robid,
int  rodid 
)

Definition at line 50 of file PixelCablingCondData.cxx.

50  {
51  auto [iter, newElementAdded] = m_idMap_robrod.insert(std::make_pair(robid, rodid));
52  if ( newElementAdded )
53  m_allRobs.push_back(robid);
54 }

◆ add_entry_rodrob()

void PixelCablingCondData::add_entry_rodrob ( int  rodid,
int  robid 
)

Definition at line 44 of file PixelCablingCondData.cxx.

44  {
45  auto [iter, newElementAdded] = m_idMap_rodrob.insert(std::make_pair(rodid, robid)); // add RODId identifier -> offline ROBId pair in m_idMap_rodrob
46  if ( newElementAdded )
47  m_allRods.push_back(rodid);
48 }

◆ clear()

void PixelCablingCondData::clear ( )

Definition at line 228 of file PixelCablingCondData.cxx.

228  {
229  m_idMap_onoff.clear();
230  m_idMap_offon.clear();
231  m_idMap_offrob.clear();
232  m_idMap_rodrob.clear();
233  m_idMap_robrod.clear();
234  m_offlineListVect.clear();
235  m_idMapDCSoff.clear();
236  m_rodReadoutMap.clear();
237  m_allRods.clear();
238  m_allRobs.clear();
239 }

◆ find_entry_DCSoffline()

Identifier PixelCablingCondData::find_entry_DCSoffline ( const std::string &  DCSname) const

Definition at line 150 of file PixelCablingCondData.cxx.

150  {
151  std::unordered_map<std::string, Identifier>::const_iterator iter(m_idMapDCSoff.find(DCSname));
152  if (iter == m_idMapDCSoff.end()) {
153  return Identifier(0);
154  }
155  return iter->second;
156 }

◆ find_entry_offlineDCS()

std::string PixelCablingCondData::find_entry_offlineDCS ( const Identifier  offlineId) const

Definition at line 158 of file PixelCablingCondData.cxx.

158  {
159  std::unordered_map<std::string, Identifier>::const_iterator iter = m_idMapDCSoff.begin();
160  for (; iter != m_idMapDCSoff.end(); ++iter) {
161  if (iter->second == offlineId)
162  return iter->first;
163  }
164  return ""; // not found
165 }

◆ find_entry_offlineList()

std::deque< Identifier > PixelCablingCondData::find_entry_offlineList ( uint32_t  robid) const

Definition at line 140 of file PixelCablingCondData.cxx.

140  {
141  std::deque<Identifier> offlineId; // declare collection identifier list for the ROBId
142  std::deque<Identifier>::const_iterator it1 = m_offlineListVect.at(robid).begin(); // first offline identifier for the ROBId
143  std::deque<Identifier>::const_iterator it2 = m_offlineListVect.at(robid).end(); // last offline identifier for the ROBId
144  for (; it1 != it2; ++it1) { // loop thrue offline identifiers
145  offlineId.push_back(*it1); // fill offline identifier into offline identifier list
146  }
147  return offlineId; // return the offline identifier list for the ROBId
148 }

◆ find_entry_offon()

uint64_t PixelCablingCondData::find_entry_offon ( const Identifier  offlineId) const

Definition at line 102 of file PixelCablingCondData.cxx.

102  {
103  uint64_t onlineId; // declare online identifier
104  std::unordered_map<Identifier, uint64_t, idHasher>::const_iterator iter(m_idMap_offon.find(offlineId)); // find offline identifier in m_idMap_offon map
105  if (iter == m_idMap_offon.end()) { // if offline identifier not found in m_idMap_offon map -> ERROR
106  onlineId = 0; // fill online identifier with empty identifier
107  return onlineId; // return empty online identifier
108  }
109  onlineId = (*iter).second; // fill online identifier with found online identifier
110  return onlineId; // return found online identifier
111 }

◆ find_entry_offrob()

uint32_t PixelCablingCondData::find_entry_offrob ( Identifier  offlineId) const

Definition at line 114 of file PixelCablingCondData.cxx.

114  {
115  uint32_t robid{};
116  if (offlineId == invalidId) return robid;
117  const auto iter = m_idMap_offrob.find(offlineId);
118  if (iter == m_idMap_offrob.end()) {
119  return robid;
120  }
121  robid = (*iter).second; // fill ROBId with found ROBId
122  return robid; // return found ROBId
123 }

◆ find_entry_onoff()

Identifier PixelCablingCondData::find_entry_onoff ( const uint64_t  onlineId) const

Definition at line 68 of file PixelCablingCondData.cxx.

68  {
69  // Search m_idMap_onoff for the onlineId
70  uint64_t searchId = onlineId;
71  Identifier offlineId(0);
72  std::unordered_map<uint64_t, Identifier>::const_iterator iter(m_idMap_onoff.find(searchId));
73 
74  // OnlineId has been found - get the offline identifier
75  if (iter != m_idMap_onoff.end()) offlineId = (*iter).second;
76 
77  // Is onlineId not found? Then check if this is a b-layer module; if it is read out at
78  // 80 Mbit, search again with link = 0, since FMT has enough info to identify the module
79  else {
80  uint32_t rodid = (onlineId & 0xFFFFFF); // last 24 bit are rodid
81 
82  if ((rodid & 0x130000) >> 16 == 0x13) {
83  std::map<uint32_t, bool>::const_iterator it = m_rodReadoutMap.find(rodid);
84 
85  if (it != m_rodReadoutMap.end()) {
86  if ((*it).second) { // true = is 80 MBit
87 
88  // Search again
89  searchId = onlineId & (0xF0FFFFFF);
90  iter = m_idMap_onoff.find(searchId);
91 
92  // Get identifier
93  if (iter != m_idMap_onoff.end()) offlineId = (*iter).second;
94  }
95  }
96  }
97  // If onlineId is still not found, the empty identifier is returned.
98  }
99  return offlineId;
100 }

◆ find_entry_robrod()

int PixelCablingCondData::find_entry_robrod ( const int  robid) const

Definition at line 134 of file PixelCablingCondData.cxx.

134  {
135  std::unordered_map<int,int>::const_iterator iter(m_idMap_robrod.find(robid));
136  if (iter == m_idMap_robrod.end()) return 0;
137  return iter->second;
138 }

◆ find_entry_rodrob()

int PixelCablingCondData::find_entry_rodrob ( const int  rodid) const

Definition at line 125 of file PixelCablingCondData.cxx.

125  {
126  std::unordered_map<int, int>::const_iterator iter(m_idMap_rodrob.find(rodid));
127  if (iter == m_idMap_rodrob.end()) {
128  return 0;
129  }
130  int robid = iter->second;
131  return robid;
132 }

◆ get_allRobs()

const std::vector< uint32_t > & PixelCablingCondData::get_allRobs ( ) const

Definition at line 171 of file PixelCablingCondData.cxx.

171  {
172  return m_allRobs;
173 }

◆ get_allRods()

const std::vector< uint32_t > & PixelCablingCondData::get_allRods ( ) const

Definition at line 167 of file PixelCablingCondData.cxx.

167  {
168  return m_allRods;
169 }

◆ get_idMap_offon()

const std::unordered_map< Identifier, uint64_t, idHasher > & PixelCablingCondData::get_idMap_offon ( ) const

Definition at line 208 of file PixelCablingCondData.cxx.

208  {
209  return m_idMap_offon;
210 }

◆ get_idMap_offrob()

const std::unordered_map< Identifier, uint32_t, idHasher > & PixelCablingCondData::get_idMap_offrob ( ) const

Definition at line 212 of file PixelCablingCondData.cxx.

212  {
213  return m_idMap_offrob;
214 }

◆ get_idMap_onoff()

const std::unordered_map< uint64_t, Identifier > & PixelCablingCondData::get_idMap_onoff ( ) const

Definition at line 204 of file PixelCablingCondData.cxx.

204  {
205  return m_idMap_onoff;
206 }

◆ get_idMap_robrod()

const std::unordered_map< int, int > & PixelCablingCondData::get_idMap_robrod ( ) const

Definition at line 220 of file PixelCablingCondData.cxx.

220  {
221  return m_idMap_robrod;
222 }

◆ get_idMap_rodrob()

const std::unordered_map< int, int > & PixelCablingCondData::get_idMap_rodrob ( ) const

Definition at line 216 of file PixelCablingCondData.cxx.

216  {
217  return m_idMap_rodrob;
218 }

◆ get_idMapDCSoff()

const std::unordered_map< std::string, Identifier > & PixelCablingCondData::get_idMapDCSoff ( ) const

Definition at line 224 of file PixelCablingCondData.cxx.

224  {
225  return m_idMapDCSoff;
226 }

◆ get_size_onoff()

unsigned int PixelCablingCondData::get_size_onoff ( )
inline

Definition at line 54 of file PixelCablingCondData.h.

54 {return m_idMap_onoff.size();}

◆ getOnlineIdFromRobId()

uint64_t PixelCablingCondData::getOnlineIdFromRobId ( uint32_t  robid,
uint32_t  link 
) const

Definition at line 181 of file PixelCablingCondData.cxx.

181  {
182  uint32_t subDetId = (robid & 0xFFFFFF) >> 16;
183 
184  // Pixels:
185  if (subDetId < 0x14) return (robid & 0xFFFFFF) | (link << 24);
186 
187  // IBL / DBM:
188  else if (subDetId == 0x14 || subDetId == 0x15) {
189 
190  // Need to search the on-off map for the appropriate onlineId
191  uint32_t linknum_temp;
192  std::unordered_map<uint64_t, Identifier>::const_iterator itr = m_idMap_onoff.begin();
193  for (; itr != m_idMap_onoff.end(); ++itr) {
194  if ((itr->first & 0xFFFFFF) == robid) {
195  linknum_temp = (itr->first >> 24);
196  // Check for linknum in both first and third nibble
197  if ((linknum_temp & 0xF) == link || ((linknum_temp >> 8) & 0xF) == link) return itr->first;
198  }
199  }
200  }
201  return 0;
202 }

◆ operator=()

PixelCablingCondData& PixelCablingCondData::operator= ( const PixelCablingCondData other)
delete

◆ set_readout_map()

void PixelCablingCondData::set_readout_map ( std::map< uint32_t, bool >  rodReadoutMap)

Definition at line 64 of file PixelCablingCondData.cxx.

64  {
65  m_rodReadoutMap = std::move(rodReadoutMap);
66 }

Member Data Documentation

◆ m_allRobs

std::vector<uint32_t> PixelCablingCondData::m_allRobs
private

Definition at line 79 of file PixelCablingCondData.h.

◆ m_allRods

std::vector<uint32_t> PixelCablingCondData::m_allRods
private

Definition at line 78 of file PixelCablingCondData.h.

◆ m_idMap_offon

std::unordered_map<Identifier, uint64_t, idHasher> PixelCablingCondData::m_idMap_offon
private

online identifier -> offline identifier map

Definition at line 70 of file PixelCablingCondData.h.

◆ m_idMap_offrob

std::unordered_map<Identifier, uint32_t, idHasher> PixelCablingCondData::m_idMap_offrob
private

offline identifier -> ROBId map

Definition at line 71 of file PixelCablingCondData.h.

◆ m_idMap_onoff

std::unordered_map<uint64_t, Identifier> PixelCablingCondData::m_idMap_onoff
private

offline identifier -> online identifier map

Definition at line 69 of file PixelCablingCondData.h.

◆ m_idMap_robrod

std::unordered_map<int,int> PixelCablingCondData::m_idMap_robrod
private

ROBId -> RODId map (reverse of m_idMap_rodrob)

Definition at line 73 of file PixelCablingCondData.h.

◆ m_idMap_rodrob

std::unordered_map<int,int> PixelCablingCondData::m_idMap_rodrob
private

RODId -> ROBId map.

Definition at line 72 of file PixelCablingCondData.h.

◆ m_idMapDCSoff

std::unordered_map<std::string, Identifier> PixelCablingCondData::m_idMapDCSoff
private

DCS name -> offline identifier.

Definition at line 75 of file PixelCablingCondData.h.

◆ m_offlineListVect

std::map<uint32_t, std::deque<Identifier> > PixelCablingCondData::m_offlineListVect
private

ROBId -> offline identifier list.

Definition at line 74 of file PixelCablingCondData.h.

◆ m_rodReadoutMap

std::map<uint32_t,bool> PixelCablingCondData::m_rodReadoutMap
private

Readout speed for each ROD. false=40MBit, true=80MBit.

Definition at line 76 of file PixelCablingCondData.h.


The documentation for this class was generated from the following files:
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
skel.it
it
Definition: skel.GENtoEVGEN.py:396
PixelCablingCondData::m_idMap_offrob
std::unordered_map< Identifier, uint32_t, idHasher > m_idMap_offrob
offline identifier -> ROBId map
Definition: PixelCablingCondData.h:71
PixelCablingCondData::m_idMap_offon
std::unordered_map< Identifier, uint64_t, idHasher > m_idMap_offon
online identifier -> offline identifier map
Definition: PixelCablingCondData.h:70
DetDescrDictionaryDict::it1
std::vector< HWIdentifier >::iterator it1
Definition: DetDescrDictionaryDict.h:17
PixelCablingCondData::m_idMap_rodrob
std::unordered_map< int, int > m_idMap_rodrob
RODId -> ROBId map.
Definition: PixelCablingCondData.h:72
PixelCablingCondData::m_idMap_onoff
std::unordered_map< uint64_t, Identifier > m_idMap_onoff
offline identifier -> online identifier map
Definition: PixelCablingCondData.h:69
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
PixelCablingCondData::m_rodReadoutMap
std::map< uint32_t, bool > m_rodReadoutMap
Readout speed for each ROD. false=40MBit, true=80MBit.
Definition: PixelCablingCondData.h:76
PixelCablingCondData::m_idMap_robrod
std::unordered_map< int, int > m_idMap_robrod
ROBId -> RODId map (reverse of m_idMap_rodrob)
Definition: PixelCablingCondData.h:73
PixelCablingCondData::m_idMapDCSoff
std::unordered_map< std::string, Identifier > m_idMapDCSoff
DCS name -> offline identifier.
Definition: PixelCablingCondData.h:75
PixelCablingCondData::m_offlineListVect
std::map< uint32_t, std::deque< Identifier > > m_offlineListVect
ROBId -> offline identifier list.
Definition: PixelCablingCondData.h:74
PixelCablingCondData::m_allRods
std::vector< uint32_t > m_allRods
Definition: PixelCablingCondData.h:78
PixelCablingCondData::m_allRobs
std::vector< uint32_t > m_allRobs
Definition: PixelCablingCondData.h:79
Identifier
Definition: IdentifierFieldParser.cxx:14