ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
L1CaloRxCoolChannelId Class Referencefinal

#include <L1CaloRxCoolChannelId.h>

Collaboration diagram for L1CaloRxCoolChannelId:

Public Member Functions

 L1CaloRxCoolChannelId ()
 Create a L1CaloRxCoolChannelId from the integer ID field. More...
 
 L1CaloRxCoolChannelId (unsigned int crate, unsigned int module, unsigned int inputConn, unsigned int inputPair)
 Create a L1CaloRxCoolChannelId from its component fields. More...
 
 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. More...
 
 L1CaloRxCoolChannelId (const L1CaloRxCoolChannelId &id)
 Copy a L1CaloRxCoolChannelId. More...
 
 ~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. More...
 

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.

24  : m_id(0),
25  m_bOutputIsSet(false),
26  m_outputConn(0),
27  m_outputPair(0)
28 {
29 }

◆ 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),
44  m_outputPair(0)
45 {
47 }

◆ 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),
52  m_outputPair(0)
53 {
56 }

◆ 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),
68  m_outputPair(0)
69 {
70 }

◆ L1CaloRxCoolChannelId() [5/5]

L1CaloRxCoolChannelId::L1CaloRxCoolChannelId ( const L1CaloRxCoolChannelId id)

Copy a L1CaloRxCoolChannelId.

Definition at line 78 of file L1CaloRxCoolChannelId.cxx.

79  : m_id(id.m_id),
83 {
84 }

◆ ~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  }
117  m_outputConn = conn;
118  m_outputPair = pair;
119  m_bOutputIsSet = true;
120 }

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

Friends And Related Function Documentation

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

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:
beamspotman.r
def r
Definition: beamspotman.py:676
L1CaloRxCoolChannelId::outputPair
unsigned int outputPair() const
Definition: L1CaloRxCoolChannelId.cxx:129
checkCorrelInHIST.conn
conn
Definition: checkCorrelInHIST.py:25
L1CaloRxCoolChannelId::m_id
unsigned int m_id
Definition: L1CaloRxCoolChannelId.h:45
L1CaloRxCoolChannelId::id
unsigned int id() const
Definition: L1CaloRxCoolChannelId.h:27
L1CaloRxCoolChannelId::m_outputPair
unsigned int m_outputPair
Definition: L1CaloRxCoolChannelId.h:49
L1CaloRxCoolChannelId::setId
void setId(unsigned int crate, unsigned int module, unsigned int inputConn, unsigned int inputPair)
Set the CoolChannelId value from its component fields.
Definition: L1CaloRxCoolChannelId.cxx:93
L1CaloRxCoolChannelId::inputConn
unsigned int inputConn() const
Definition: L1CaloRxCoolChannelId.h:24
L1CaloRxCoolChannelId::outputConn
unsigned int outputConn() const
Definition: L1CaloRxCoolChannelId.cxx:122
L1CaloRxCoolChannelId::inputPair
unsigned int inputPair() const
Definition: L1CaloRxCoolChannelId.h:25
L1CaloRxCoolChannelId::outputAttributes
void outputAttributes(unsigned int conn, unsigned int pair)
Definition: L1CaloRxCoolChannelId.cxx:112
L1CaloRxCoolChannelId::crate
unsigned int crate() const
Definition: L1CaloRxCoolChannelId.h:22
merge.output
output
Definition: merge.py:17
L1CaloRxCoolChannelId::module
unsigned int module() const
Definition: L1CaloRxCoolChannelId.h:23
L1CaloRxCoolChannelId::m_bOutputIsSet
bool m_bOutputIsSet
Definition: L1CaloRxCoolChannelId.h:47
L1CaloRxCoolChannelId::m_outputConn
unsigned int m_outputConn
Definition: L1CaloRxCoolChannelId.h:48