ATLAS Offline Software
L1CaloCoolChannelId.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef L1CALOCOOLCHANNELID_H
6 #define L1CALOCOOLCHANNELID_H
7 
9 
10 class L1CaloCoolChannelId final {
11  friend std::ostream& operator<<(std::ostream& output, const L1CaloCoolChannelId& r);
12 
13 public:
14 
16  L1CaloCoolChannelId(unsigned int crate,
17  L1CaloModuleType mType,
18  unsigned int module,
19  unsigned int submodule,
20  unsigned int channel, bool logical = true);
21  L1CaloCoolChannelId(unsigned int id);
23  ~L1CaloCoolChannelId() = default;
24 
25  unsigned int crate() const { return (m_id & 0xff000000) >> 24; }
27 
28  unsigned int module(bool logical=true) const;
29  unsigned int subModule() const { return (m_id & 0x0000ff00) >> 8; }
30  unsigned int channel() const { return (m_id & 0x000000ff); }
31 
32  unsigned int id() const { return m_id; }
33 
35  bool operator==(const L1CaloCoolChannelId& id) const;
36  bool operator<(const L1CaloCoolChannelId& id) const;
37 
38 private:
39  //L1CaloModuleType moduleType(unsigned int mTypeId) const;
40  //unsigned int moduleTypeId(L1CaloModuleType mType) const;
41 
42  unsigned int logicalToPhysicalModule(L1CaloModuleType mType, unsigned int module) const;
43  unsigned int physicalToLogicalModule(L1CaloModuleType mType, unsigned int module) const;
44 
45 
46  void setId(unsigned int crate,
47  L1CaloModuleType mType,
48  unsigned int module,
49  unsigned int submodule,
50  unsigned int channel);
51  unsigned int m_id;
52 
53 };
54 
55 #endif
beamspotman.r
def r
Definition: beamspotman.py:676
L1CaloCoolChannelId::operator<
bool operator<(const L1CaloCoolChannelId &id) const
Definition: L1CaloCoolChannelId.cxx:205
L1CaloCoolChannelId::physicalToLogicalModule
unsigned int physicalToLogicalModule(L1CaloModuleType mType, unsigned int module) const
L1CaloCoolChannelId::logicalToPhysicalModule
unsigned int logicalToPhysicalModule(L1CaloModuleType mType, unsigned int module) const
L1CaloCoolChannelId::crate
unsigned int crate() const
Definition: L1CaloCoolChannelId.h:25
L1CaloModuleType
Definition: L1CaloModuleType.h:11
L1CaloCoolChannelId::operator=
L1CaloCoolChannelId & operator=(const L1CaloCoolChannelId &id)
Definition: L1CaloCoolChannelId.cxx:199
L1CaloCoolChannelId::m_id
unsigned int m_id
Definition: L1CaloCoolChannelId.h:51
L1CaloCoolChannelId::operator==
bool operator==(const L1CaloCoolChannelId &id) const
Definition: L1CaloCoolChannelId.cxx:209
L1CaloCoolChannelId::L1CaloCoolChannelId
L1CaloCoolChannelId()
Create a L1CaloCoolChannelId from the integer ID field.
Definition: L1CaloCoolChannelId.cxx:34
L1CaloCoolChannelId::moduleType
L1CaloModuleType moduleType() const
Return module type of this channel ID.
Definition: L1CaloCoolChannelId.cxx:120
L1CaloCoolChannelId::channel
unsigned int channel() const
Definition: L1CaloCoolChannelId.h:30
L1CaloCoolChannelId::setId
void setId(unsigned int crate, L1CaloModuleType mType, unsigned int module, unsigned int submodule, unsigned int channel)
Set the CoolChannelId value from its component fields.
Definition: L1CaloCoolChannelId.cxx:89
L1CaloCoolChannelId::id
unsigned int id() const
Definition: L1CaloCoolChannelId.h:32
L1CaloCoolChannelId::operator<<
friend std::ostream & operator<<(std::ostream &output, const L1CaloCoolChannelId &r)
Definition: L1CaloCoolChannelId.cxx:213
L1CaloCoolChannelId::~L1CaloCoolChannelId
~L1CaloCoolChannelId()=default
merge.output
output
Definition: merge.py:17
L1CaloModuleType.h
L1CaloCoolChannelId
Definition: L1CaloCoolChannelId.h:10
L1CaloCoolChannelId::subModule
unsigned int subModule() const
Definition: L1CaloCoolChannelId.h:29
L1CaloCoolChannelId::module
unsigned int module(bool logical=true) const