ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
L1CaloModuleType Class Referencefinal

#include <L1CaloModuleType.h>

Collaboration diagram for L1CaloModuleType:

Public Types

enum  L1CaloModuleEnum {
  None = 0, Ppm = 1, Cpm =2, Jem =3,
  Cmm =4, Tcm =5, L1CaloRod =6, Cam =7,
  CtpEmulation, Dss, L1CaloBusy, L1CaloLtp,
  L1CaloLtpi, L1CaloRosInterface, Lrm, Lsm,
  Ttcvi
}
 

Public Member Functions

 L1CaloModuleType (const L1CaloModuleEnum mEnum)
 Construct a L1CaloModuleType given its type value. More...
 
 L1CaloModuleType (const std::string &mTypeName)
 Construct a L1CaloModuleType given its type name. More...
 
 L1CaloModuleType (const L1CaloModuleType &mType)
 Copy a L1CaloModuleType. More...
 
L1CaloModuleTypeoperator= (const L1CaloModuleType &mType)
 Assign a L1CaloModuleType. More...
 
 ~L1CaloModuleType ()=default
 
const std::string toString () const
 Compare with type value. More...
 
bool operator== (const L1CaloModuleEnum mEnum) const
 Compare with type value. More...
 
bool operator== (const L1CaloModuleType &mType) const
 Compare with another L1CaloModuleType. More...
 
bool operator!= (const L1CaloModuleEnum mEnum) const
 
bool operator!= (const L1CaloModuleType &mType) const
 
 operator unsigned int ()
 

Private Member Functions

L1CaloModuleEnum moduleEnum () const
 

Private Attributes

L1CaloModuleEnum m_type
 

Detailed Description

Infrastructure class encapsulating our known module types.

This class is a very close adaptation of the online infraL1Calo/L1CaloModuleType class

Definition at line 11 of file L1CaloModuleType.h.

Member Enumeration Documentation

◆ L1CaloModuleEnum

Enumerator
None 
Ppm 
Cpm 
Jem 
Cmm 
Tcm 
L1CaloRod 
Cam 
CtpEmulation 
Dss 
L1CaloBusy 
L1CaloLtp 
L1CaloLtpi 
L1CaloRosInterface 
Lrm 
Lsm 
Ttcvi 

Definition at line 15 of file L1CaloModuleType.h.

Constructor & Destructor Documentation

◆ L1CaloModuleType() [1/3]

L1CaloModuleType::L1CaloModuleType ( const L1CaloModuleEnum  mEnum)

Construct a L1CaloModuleType given its type value.

Definition at line 20 of file L1CaloModuleType.cxx.

21 {
22  m_type = mEnum;
23 }

◆ L1CaloModuleType() [2/3]

L1CaloModuleType::L1CaloModuleType ( const std::string &  mTypeName)

Construct a L1CaloModuleType given its type name.

Definition at line 31 of file L1CaloModuleType.cxx.

32 {
33  if (mTypeName == "Cam") { m_type = Cam; }
34  else if (mTypeName == "Cmm") { m_type = Cmm; }
35  else if (mTypeName == "Cpm") { m_type = Cpm; }
36  else if (mTypeName == "CtpEmulation") { m_type = CtpEmulation; }
37  else if (mTypeName == "Jem") { m_type = Jem; }
38  else if (mTypeName == "L1CaloBusy") { m_type = L1CaloBusy; }
39  else if (mTypeName == "L1CaloLtp") { m_type = L1CaloLtp; }
40  else if (mTypeName == "L1CaloLtpi") { m_type = L1CaloLtpi; }
41  else if (mTypeName == "L1CaloRod") { m_type = L1CaloRod; }
42  else if (mTypeName == "L1CaloRosInterface") { m_type = L1CaloRosInterface; }
43  else if (mTypeName == "Lrm") { m_type = Lrm; }
44  else if (mTypeName == "Lsm") { m_type = Lsm; }
45  else if (mTypeName == "Ppm") { m_type = Ppm; }
46  else if (mTypeName == "Tcm") { m_type = Tcm; }
47  else if (mTypeName == "Ttcvi") { m_type = Ttcvi; }
48  else { m_type = None; }
49 }

◆ L1CaloModuleType() [3/3]

L1CaloModuleType::L1CaloModuleType ( const L1CaloModuleType mType)

Copy a L1CaloModuleType.

Definition at line 57 of file L1CaloModuleType.cxx.

58 {
59  m_type = mType.moduleEnum();
60 }

◆ ~L1CaloModuleType()

L1CaloModuleType::~L1CaloModuleType ( )
default

Member Function Documentation

◆ moduleEnum()

L1CaloModuleEnum L1CaloModuleType::moduleEnum ( ) const
inlineprivate

Definition at line 40 of file L1CaloModuleType.h.

40 { return m_type; }

◆ operator unsigned int()

L1CaloModuleType::operator unsigned int ( )
inline

Definition at line 36 of file L1CaloModuleType.h.

36 {return (unsigned int) this->moduleEnum();};

◆ operator!=() [1/2]

bool L1CaloModuleType::operator!= ( const L1CaloModuleEnum  mEnum) const
inline

Definition at line 33 of file L1CaloModuleType.h.

33 { return !((*this) == mEnum); }

◆ operator!=() [2/2]

bool L1CaloModuleType::operator!= ( const L1CaloModuleType mType) const
inline

Definition at line 34 of file L1CaloModuleType.h.

34 { return !((*this) == mType); }

◆ operator=()

L1CaloModuleType & L1CaloModuleType::operator= ( const L1CaloModuleType mType)

Assign a L1CaloModuleType.

Definition at line 69 of file L1CaloModuleType.cxx.

70 {
71  if (this != &mType) m_type = mType.moduleEnum();
72  return *this;
73 }

◆ operator==() [1/2]

bool L1CaloModuleType::operator== ( const L1CaloModuleEnum  mEnum) const

Compare with type value.

Definition at line 113 of file L1CaloModuleType.cxx.

114 {
115  return (this->moduleEnum() == mEnum);
116 }

◆ operator==() [2/2]

bool L1CaloModuleType::operator== ( const L1CaloModuleType mType) const

Compare with another L1CaloModuleType.

Definition at line 125 of file L1CaloModuleType.cxx.

126 {
127  return (this->moduleEnum() == mType.moduleEnum());
128 }

◆ toString()

const std::string L1CaloModuleType::toString ( ) const

Compare with type value.

Definition at line 82 of file L1CaloModuleType.cxx.

83 {
84  std::string s;
85  switch (this->moduleEnum()) {
86  case Cam: s = "Cam"; break;
87  case Cmm: s = "Cmm"; break;
88  case Cpm: s = "Cpm"; break;
89  case CtpEmulation: s = "CtpEmulation"; break;
90  case Jem: s = "Jem"; break;
91  case L1CaloBusy: s = "L1CaloBusy"; break;
92  case L1CaloLtp: s = "L1CaloLtp"; break;
93  case L1CaloLtpi: s = "L1CaloLtpi"; break;
94  case L1CaloRod: s = "L1CaloRod"; break;
95  case L1CaloRosInterface: s = "L1CaloRosInterface"; break;
96  case Lrm: s = "Lrm"; break;
97  case Lsm: s = "Lsm"; break;
98  case Ppm: s = "Ppm"; break;
99  case Tcm: s = "Tcm"; break;
100  case Ttcvi: s = "Ttcvi"; break;
101  default: s = "Unknown"; break;
102  }
103  return s;
104 }

Member Data Documentation

◆ m_type

L1CaloModuleEnum L1CaloModuleType::m_type
private

Definition at line 43 of file L1CaloModuleType.h.


The documentation for this class was generated from the following files:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
L1CaloModuleType::Cmm
@ Cmm
Definition: L1CaloModuleType.h:17
L1CaloModuleType::Cam
@ Cam
Definition: L1CaloModuleType.h:17
L1CaloModuleType::Lrm
@ Lrm
Definition: L1CaloModuleType.h:17
L1CaloModuleType::Lsm
@ Lsm
Definition: L1CaloModuleType.h:17
L1CaloModuleType::Tcm
@ Tcm
Definition: L1CaloModuleType.h:17
L1CaloModuleType::Jem
@ Jem
Definition: L1CaloModuleType.h:17
L1CaloModuleType::m_type
L1CaloModuleEnum m_type
Definition: L1CaloModuleType.h:43
L1CaloModuleType::L1CaloBusy
@ L1CaloBusy
Definition: L1CaloModuleType.h:17
L1CaloModuleType::Dss
@ Dss
Definition: L1CaloModuleType.h:17
L1CaloModuleType::L1CaloLtp
@ L1CaloLtp
Definition: L1CaloModuleType.h:17
L1CaloModuleType::Cpm
@ Cpm
Definition: L1CaloModuleType.h:17
L1CaloModuleType::L1CaloRod
@ L1CaloRod
Definition: L1CaloModuleType.h:17
L1CaloModuleType::Ppm
@ Ppm
Definition: L1CaloModuleType.h:17
L1CaloModuleType::L1CaloLtpi
@ L1CaloLtpi
Definition: L1CaloModuleType.h:17
L1CaloModuleType::None
@ None
Definition: L1CaloModuleType.h:16
L1CaloModuleType::moduleEnum
L1CaloModuleEnum moduleEnum() const
Definition: L1CaloModuleType.h:40
L1CaloModuleType::Ttcvi
@ Ttcvi
Definition: L1CaloModuleType.h:17
L1CaloModuleType::L1CaloRosInterface
@ L1CaloRosInterface
Definition: L1CaloModuleType.h:17
L1CaloModuleType::CtpEmulation
@ CtpEmulation
Definition: L1CaloModuleType.h:17