ATLAS Offline Software
Classes | Macros | Typedefs | Functions
NrpcCablingData.h File Reference
#include <cstdint>
#include <iostream>
#include <set>
Include dependency graph for NrpcCablingData.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  NrpcCablingOfflineID
 Representation of the offline Identifier in a more tangible format. More...
 
struct  NrpcCablingOnlineID
 Struct summarizing all the Identifier fields to uniquely Identify a Nrpc TDC chip. More...
 
struct  NrpcTdcStripRange
 Depending on whether the cabling map shall convert offline -> online or online -> offline extra information is required Stage Offline -> Online: Range of channels covered by the chip Stage Online -> Offline: Range of strips covered by the chip. More...
 
struct  NrpcTdcChannelRange
 Covered channels by the Online Identifier Object. More...
 
struct  NrpcCablingData
 Cabling information shipped around the Digi <-> Rdo conversions. More...
 
struct  NrpcCablingCoolData
 Struct to represent all cabling information coming from the cabling database per channel. More...
 
struct  NrpcCablOnDataByStrip
 Struct to build the offline -> online map. More...
 
struct  NrpcCablOnDataByTdc
 Struct to build the online -> offline map. More...
 

Macros

#define CABLING_OPERATORS(CL_NAME)
 Helper macro to define the constructors and comparison operators of the Online & Offline Identifiers of the cabling. More...
 

Typedefs

using NrpcCablOnDataByStripSet = std::set< NrpcCablOnDataByStrip, std::less<> >
 

Functions

bool operator< (const NrpcCablOnDataByStrip &a, const NrpcCablingData &b)
 Let's define the operator needed to read the cabling sets. More...
 
bool operator< (const NrpcCablingData &a, const NrpcCablOnDataByStrip &b)
 
bool operator< (const NrpcCablOnDataByStrip &a, const NrpcCablingCoolData &b)
 
bool operator< (const NrpcCablingCoolData &a, const NrpcCablOnDataByStrip &b)
 
bool operator< (const NrpcCablOnDataByTdc &a, const NrpcCablingData &b)
 
bool operator< (const NrpcCablingData &a, const NrpcCablOnDataByTdc &b)
 
std::ostream & operator<< (std::ostream &ostr, const NrpcCablingOfflineID &obj)
 Outstream operators. More...
 
std::ostream & operator<< (std::ostream &ostr, const NrpcCablingOnlineID &obj)
 
std::ostream & operator<< (std::ostream &ostr, const NrpcTdcStripRange &obj)
 
std::ostream & operator<< (std::ostream &ostr, const NrpcTdcChannelRange &obj)
 
std::ostream & operator<< (std::ostream &ostr, const NrpcCablingData &obj)
 
std::ostream & operator<< (std::ostream &ostr, const NrpcCablingCoolData &obj)
 
std::ostream & operator<< (std::ostream &ostr, const NrpcCablOnDataByTdc &obj)
 
std::ostream & operator<< (std::ostream &ostr, const NrpcCablOnDataByStrip &obj)
 

Macro Definition Documentation

◆ CABLING_OPERATORS

#define CABLING_OPERATORS (   CL_NAME)
Value:
bool operator<(const CL_NAME& other) const { return m_cache.hash < other.m_cache.hash; } \
bool operator==(const CL_NAME& other) const {return m_cache.hash == other.m_cache.hash; } \
bool operator!=(const CL_NAME& other) const { return m_cache.hash != other.m_cache.hash; } \
bool operator!() const {return !m_cache.hash;} \
\
CL_NAME() = default; \
CL_NAME( const CL_NAME& other): CL_NAME() { \
m_cache.hash = other.m_cache.hash; \
} \
CL_NAME& operator=(const CL_NAME& other) { \
if (&other != this) m_cache.hash = other.m_cache.hash; \
return *this; \
}

Helper macro to define the constructors and comparison operators of the Online & Offline Identifiers of the cabling.

Definition at line 19 of file NrpcCablingData.h.

Typedef Documentation

◆ NrpcCablOnDataByStripSet

using NrpcCablOnDataByStripSet = std::set<NrpcCablOnDataByStrip, std::less<> >

Definition at line 204 of file NrpcCablingData.h.

Function Documentation

◆ operator<() [1/6]

bool operator< ( const NrpcCablingCoolData a,
const NrpcCablOnDataByStrip b 
)
inline

Definition at line 191 of file NrpcCablingData.h.

191  {
192  if (static_cast<const NrpcCablingOnlineID&>(a) != b) return static_cast<const NrpcCablingOnlineID&>(a) < b;
193  return static_cast<const NrpcTdcStripRange&>(a) < b;
194 }

◆ operator<() [2/6]

bool operator< ( const NrpcCablingData a,
const NrpcCablOnDataByStrip b 
)
inline

Definition at line 182 of file NrpcCablingData.h.

182  {
183  return a.strip < b.firstStrip;
184 }

◆ operator<() [3/6]

bool operator< ( const NrpcCablingData a,
const NrpcCablOnDataByTdc b 
)
inline

Definition at line 200 of file NrpcCablingData.h.

200  {
201  if (static_cast<const NrpcCablingOnlineID&>(a) != b) return static_cast<const NrpcCablingOnlineID&>(a) < b;
202  return a.channelId < b.firstChannel;
203 }

◆ operator<() [4/6]

bool operator< ( const NrpcCablOnDataByStrip a,
const NrpcCablingCoolData b 
)
inline

Definition at line 185 of file NrpcCablingData.h.

185  {
186  if (static_cast<const NrpcCablingOnlineID&>(a) != static_cast<const NrpcCablingOnlineID&>(b)) {
187  return static_cast<const NrpcCablingOnlineID&>(a) < b;
188  }
189  return static_cast<const NrpcTdcStripRange&>(a) < b;
190 }

◆ operator<() [5/6]

bool operator< ( const NrpcCablOnDataByStrip a,
const NrpcCablingData b 
)
inline

Let's define the operator needed to read the cabling sets.

Definition at line 179 of file NrpcCablingData.h.

179  {
180  return a.lastStrip < b.strip;
181 }

◆ operator<() [6/6]

bool operator< ( const NrpcCablOnDataByTdc a,
const NrpcCablingData b 
)
inline

Definition at line 196 of file NrpcCablingData.h.

196  {
197  if (static_cast<const NrpcCablingOnlineID&>(a) != b) return static_cast<const NrpcCablingOnlineID&>(a) < b;
198  return a.lastChannel < b.channelId;
199 }

◆ operator<<() [1/8]

std::ostream& operator<< ( std::ostream &  ostr,
const NrpcCablingCoolData obj 
)

Definition at line 43 of file NrpcCablingData.cxx.

43  {
44  ostr << static_cast<const NrpcCablingOfflineID&>(obj);
45  ostr << static_cast<const NrpcTdcStripRange&>(obj)<< " --- ";
46  ostr << static_cast<const NrpcCablingOnlineID&>(obj);
47  ostr << static_cast<const NrpcTdcChannelRange&>(obj);
48  return ostr;
49 
50 }

◆ operator<<() [2/8]

std::ostream& operator<< ( std::ostream &  ostr,
const NrpcCablingData obj 
)

Definition at line 25 of file NrpcCablingData.cxx.

25  {
26  ostr << static_cast<const NrpcCablingOfflineID&>(obj);
27  ostr << " strip: " << static_cast<int>(obj.strip) << " --- ";
28  ostr << static_cast<const NrpcCablingOnlineID&>(obj);
29  ostr << " channelId: " << static_cast<int>(obj.channelId);
30  return ostr;
31 }

◆ operator<<() [3/8]

std::ostream& operator<< ( std::ostream &  ostr,
const NrpcCablingOfflineID obj 
)

Outstream operators.

Definition at line 7 of file NrpcCablingData.cxx.

7  {
8  ostr << "StationIndex: " << static_cast<int>(obj.stationIndex)
9  << " eta: " << static_cast<int>(obj.eta)
10  << " phi: " << static_cast<int>(obj.phi)
11  << " doubletR: " << static_cast<int>(obj.doubletR)
12  << " doubletPhi: " << static_cast<int>(obj.doubletPhi)
13  << " doubletZ: " << static_cast<int>(obj.doubletZ)
14  << " gasGap: " << static_cast<int>(obj.gasGap)
15  << " measPhi: " << static_cast<int>(obj.measuresPhi())
16  << " stripSide: "<<static_cast<int>(obj.stripSide());
17  return ostr;
18 }

◆ operator<<() [4/8]

std::ostream& operator<< ( std::ostream &  ostr,
const NrpcCablingOnlineID obj 
)

Definition at line 19 of file NrpcCablingData.cxx.

19  {
20  ostr << " subDetector: " << static_cast<int>(obj.subDetector);
21  ostr << " tdcSector: " << static_cast<int>(obj.tdcSector);
22  ostr << " tdc: " << static_cast<int>(obj.tdc);
23  return ostr;
24 }

◆ operator<<() [5/8]

std::ostream& operator<< ( std::ostream &  ostr,
const NrpcCablOnDataByStrip obj 
)

Definition at line 57 of file NrpcCablingData.cxx.

57  {
58  ostr << static_cast<const NrpcCablingOnlineID&>(obj);
59  ostr << static_cast<const NrpcTdcStripRange&>(obj);
60  ostr << static_cast<const NrpcTdcChannelRange&>(obj);
61  return ostr;
62 }

◆ operator<<() [6/8]

std::ostream& operator<< ( std::ostream &  ostr,
const NrpcCablOnDataByTdc obj 
)

Definition at line 51 of file NrpcCablingData.cxx.

51  {
52  ostr << static_cast<const NrpcCablingOnlineID&>(obj);
53  ostr << static_cast<const NrpcTdcStripRange&>(obj);
54  ostr << static_cast<const NrpcTdcChannelRange&>(obj);
55  return ostr;
56 }

◆ operator<<() [7/8]

std::ostream& operator<< ( std::ostream &  ostr,
const NrpcTdcChannelRange obj 
)

Definition at line 38 of file NrpcCablingData.cxx.

38  {
39  ostr<<" first channel: "<<static_cast<int>(obj.firstChannel)
40  <<" last channel: "<<static_cast<int>(obj.lastChannel);
41  return ostr;
42 }

◆ operator<<() [8/8]

std::ostream& operator<< ( std::ostream &  ostr,
const NrpcTdcStripRange obj 
)

Definition at line 33 of file NrpcCablingData.cxx.

33  {
34  ostr<<" firstStrip: "<<static_cast<int>(obj.firstStrip)
35  <<" lastStrip: "<<static_cast<int>(obj.lastStrip);
36  return ostr;
37 }
operator==
bool operator==(const DataVector< T > &a, const DataVector< T > &b)
Vector equality comparison.
operator!=
bool operator!=(const DataVector< T > &a, const DataVector< T > &b)
Based on operator==.
operator<
bool operator<(const NrpcCablOnDataByStrip &a, const NrpcCablingData &b)
Let's define the operator needed to read the cabling sets.
Definition: NrpcCablingData.h:179
operator!
const APEvtWeight operator!(const APEvtWeight &a_in)
Definition: APEvtWeight.cxx:212
NrpcTdcStripRange
Depending on whether the cabling map shall convert offline -> online or online -> offline extra infor...
Definition: NrpcCablingData.h:95
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
NrpcCablingOnlineID
Struct summarizing all the Identifier fields to uniquely Identify a Nrpc TDC chip.
Definition: NrpcCablingData.h:74
python.PyAthena.obj
obj
Definition: PyAthena.py:135