ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloRxCoolChannelId Class Referencefinal

Encapsulates the ID of one Rx channel of conditions data in COOL, ie the ID of a row in a table. More...

#include <L1CaloRxCoolChannelId.h>

Collaboration diagram for L1CaloRxCoolChannelId:

Public Member Functions

 L1CaloRxCoolChannelId ()
 Create a L1CaloRxCoolChannelId from the integer ID field.
 L1CaloRxCoolChannelId (unsigned int crate, unsigned int module, unsigned int inputConn, unsigned int inputPair)
 Create a L1CaloRxCoolChannelId from its component fields.
 L1CaloRxCoolChannelId (unsigned int crate, unsigned int module, unsigned int inputConn, unsigned int inputPair, unsigned int outputConn, unsigned int outputPair)
 L1CaloRxCoolChannelId (unsigned int id)
 Create a L1CaloRxCoolChannelId from the integer ID field.
 L1CaloRxCoolChannelId (const L1CaloRxCoolChannelId &id)
 Copy a L1CaloRxCoolChannelId.
 ~L1CaloRxCoolChannelId ()=default
unsigned int crate () const
unsigned int module () const
unsigned int inputConn () const
unsigned int inputPair () const
unsigned int id () const
unsigned int outputConn () const
unsigned int outputPair () const
void outputAttributes (unsigned int conn, unsigned int pair)
L1CaloRxCoolChannelIdoperator= (const L1CaloRxCoolChannelId &id)=default
bool operator== (const L1CaloRxCoolChannelId &id) const
bool operator< (const L1CaloRxCoolChannelId &id) const

Private Member Functions

void setId (unsigned int crate, unsigned int module, unsigned int inputConn, unsigned int inputPair)
 Set the CoolChannelId value from its component fields.

Private Attributes

unsigned int m_id
bool m_bOutputIsSet
unsigned int m_outputConn
unsigned int m_outputPair

Friends

std::ostream & operator<< (std::ostream &output, const L1CaloRxCoolChannelId &r)

Detailed Description

Encapsulates the ID of one Rx channel of conditions data in COOL, ie the ID of a row in a table.

Definition at line 10 of file L1CaloRxCoolChannelId.h.

Constructor & Destructor Documentation

◆ L1CaloRxCoolChannelId() [1/5]

L1CaloRxCoolChannelId::L1CaloRxCoolChannelId ( )

Create a L1CaloRxCoolChannelId from the integer ID field.

Definition at line 23 of file L1CaloRxCoolChannelId.cxx.

◆ L1CaloRxCoolChannelId() [2/5]

L1CaloRxCoolChannelId::L1CaloRxCoolChannelId ( unsigned int crate,
unsigned int module,
unsigned int inputConn,
unsigned int inputPair )

Create a L1CaloRxCoolChannelId from its component fields.

Definition at line 37 of file L1CaloRxCoolChannelId.cxx.

41 : m_id(0),
42 m_bOutputIsSet(false),
43 m_outputConn(0),
45{
47}
unsigned int module() const
unsigned int inputConn() const
unsigned int inputPair() const
void setId(unsigned int crate, unsigned int module, unsigned int inputConn, unsigned int inputPair)
Set the CoolChannelId value from its component fields.
unsigned int crate() const

◆ L1CaloRxCoolChannelId() [3/5]

L1CaloRxCoolChannelId::L1CaloRxCoolChannelId ( unsigned int crate,
unsigned int module,
unsigned int inputConn,
unsigned int inputPair,
unsigned int outputConn,
unsigned int outputPair )

Definition at line 49 of file L1CaloRxCoolChannelId.cxx.

49 : m_id(0),
50 m_bOutputIsSet(false),
51 m_outputConn(0),
53{
56}
unsigned int outputPair() const
void outputAttributes(unsigned int conn, unsigned int pair)
unsigned int outputConn() const

◆ L1CaloRxCoolChannelId() [4/5]

L1CaloRxCoolChannelId::L1CaloRxCoolChannelId ( unsigned int id)

Create a L1CaloRxCoolChannelId from the integer ID field.

Definition at line 64 of file L1CaloRxCoolChannelId.cxx.

65 : m_id(id),
66 m_bOutputIsSet(false),
67 m_outputConn(0),
69{
70}

◆ L1CaloRxCoolChannelId() [5/5]

L1CaloRxCoolChannelId::L1CaloRxCoolChannelId ( const L1CaloRxCoolChannelId & id)

Copy a L1CaloRxCoolChannelId.

Definition at line 78 of file L1CaloRxCoolChannelId.cxx.

◆ ~L1CaloRxCoolChannelId()

L1CaloRxCoolChannelId::~L1CaloRxCoolChannelId ( )
default

Member Function Documentation

◆ crate()

unsigned int L1CaloRxCoolChannelId::crate ( ) const
inline

Definition at line 22 of file L1CaloRxCoolChannelId.h.

22{ return (unsigned int) m_id/1024; };

◆ id()

unsigned int L1CaloRxCoolChannelId::id ( ) const
inline

Definition at line 27 of file L1CaloRxCoolChannelId.h.

27{ return m_id; };

◆ inputConn()

unsigned int L1CaloRxCoolChannelId::inputConn ( ) const
inline

Definition at line 24 of file L1CaloRxCoolChannelId.h.

24{ return (unsigned int) m_id%64/16; };

◆ inputPair()

unsigned int L1CaloRxCoolChannelId::inputPair ( ) const
inline

Definition at line 25 of file L1CaloRxCoolChannelId.h.

25{ return (unsigned int) m_id%16; };

◆ module()

unsigned int L1CaloRxCoolChannelId::module ( ) const
inline

Definition at line 23 of file L1CaloRxCoolChannelId.h.

23{ return (unsigned int) m_id%1024/64; };

◆ operator<()

bool L1CaloRxCoolChannelId::operator< ( const L1CaloRxCoolChannelId & id) const

Definition at line 103 of file L1CaloRxCoolChannelId.cxx.

103 {
104 return m_id<id.m_id;
105}

◆ operator=()

L1CaloRxCoolChannelId & L1CaloRxCoolChannelId::operator= ( const L1CaloRxCoolChannelId & id)
default

◆ operator==()

bool L1CaloRxCoolChannelId::operator== ( const L1CaloRxCoolChannelId & id) const

Definition at line 107 of file L1CaloRxCoolChannelId.cxx.

107 {
108 return m_id==id.m_id;
109}

◆ outputAttributes()

void L1CaloRxCoolChannelId::outputAttributes ( unsigned int conn,
unsigned int pair )

Definition at line 112 of file L1CaloRxCoolChannelId.cxx.

112 {
113 if(m_bOutputIsSet) {
114 std::cout<<"Output attributes are already set for this channel: "<<this->id()<<". They cannot be modified"<<std::endl;
115 return;
116 }
118 m_outputPair = pair;
119 m_bOutputIsSet = true;
120}
unsigned int id() const

◆ outputConn()

unsigned int L1CaloRxCoolChannelId::outputConn ( ) const

Definition at line 122 of file L1CaloRxCoolChannelId.cxx.

122 {
123 if(!m_bOutputIsSet) {
124 std::cout<<"outputConn has not been set for channel "<< this->id() <<". You should not call this method."<<std::endl;
125 }
126 return m_outputConn;
127}

◆ outputPair()

unsigned int L1CaloRxCoolChannelId::outputPair ( ) const

Definition at line 129 of file L1CaloRxCoolChannelId.cxx.

129 {
130 if(!m_bOutputIsSet) {
131 std::cout<<"outputPair has not been set for channel "<< this->id() <<". You should not call this method."<<std::endl;
132 }
133 return m_outputPair;
134}

◆ setId()

void L1CaloRxCoolChannelId::setId ( unsigned int crate,
unsigned int module,
unsigned int inputConn,
unsigned int inputPair )
private

Set the CoolChannelId value from its component fields.

Definition at line 93 of file L1CaloRxCoolChannelId.cxx.

97{
98
99 m_id = inputPair + inputConn*16 + module * 64 + crate*1024;
100}

◆ operator<<

std::ostream & operator<< ( std::ostream & output,
const L1CaloRxCoolChannelId & r )
friend

Definition at line 136 of file L1CaloRxCoolChannelId.cxx.

136 {
137 output << "rxChannelId: 0x" << std::hex <<r.id() << std::dec <<", crate: "<<r.crate()<<", module: "<<r.module()<<", inputConn: "<<r.inputConn()<<", inputPair: "<<r.inputPair()<<" ( outputConn: "<< r.outputConn()<<", outputPair: "<<r.outputPair()<<")";
138 return output;
139}
int r
Definition globals.cxx:22
output
Definition merge.py:16

Member Data Documentation

◆ m_bOutputIsSet

bool L1CaloRxCoolChannelId::m_bOutputIsSet
private

Definition at line 47 of file L1CaloRxCoolChannelId.h.

◆ m_id

unsigned int L1CaloRxCoolChannelId::m_id
private

Definition at line 45 of file L1CaloRxCoolChannelId.h.

◆ m_outputConn

unsigned int L1CaloRxCoolChannelId::m_outputConn
private

Definition at line 48 of file L1CaloRxCoolChannelId.h.

◆ m_outputPair

unsigned int L1CaloRxCoolChannelId::m_outputPair
private

Definition at line 49 of file L1CaloRxCoolChannelId.h.


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