ATLAS Offline Software
Loading...
Searching...
No Matches
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
11 friend std::ostream& operator<<(std::ostream& output, const L1CaloCoolChannelId& r);
12
13public:
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);
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
38private:
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
Encapsulates the ID of one channel of conditions data in COOL, ie the ID of a row in a table.
L1CaloModuleType moduleType() const
Return module type of this channel ID.
unsigned int physicalToLogicalModule(L1CaloModuleType mType, unsigned int module) const
unsigned int id() const
L1CaloCoolChannelId & operator=(const L1CaloCoolChannelId &id)
Copy a L1CaloCoolChannelId.
unsigned int subModule() const
bool operator==(const L1CaloCoolChannelId &id) const
bool operator<(const L1CaloCoolChannelId &id) const
friend std::ostream & operator<<(std::ostream &output, const L1CaloCoolChannelId &r)
L1CaloCoolChannelId()
Create a L1CaloCoolChannelId from the integer ID field.
~L1CaloCoolChannelId()=default
unsigned int module(bool logical=true) const
Convert a typeId to a L1CaloModuleType.
unsigned int crate() const
void setId(unsigned int crate, L1CaloModuleType mType, unsigned int module, unsigned int submodule, unsigned int channel)
Set the CoolChannelId value from its component fields.
unsigned int logicalToPhysicalModule(L1CaloModuleType mType, unsigned int module) const
unsigned int channel() const
Infrastructure class encapsulating our known module types.
int r
Definition globals.cxx:22