ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
TCS::MetTOB Class Reference

#include <MetTOB.h>

Inheritance diagram for TCS::MetTOB:
Collaboration diagram for TCS::MetTOB:

Public Member Functions

 MetTOB ()
 
 MetTOB (int ex, int ey, unsigned int et)
 
 MetTOB (const MetTOB &met)
 
virtual ~MetTOB ()
 
int Ex () const
 
int Ey () const
 
unsigned int Et () const
 
double ExDouble () const
 
double EyDouble () const
 
double EtDouble () const
 
void setEx (int ex)
 
void setEy (int ey)
 
void setEt (unsigned int et)
 
void setExDouble (double ex)
 
void setEyDouble (double ey)
 
void setEtDouble (double et)
 
inputTOBType_t tobType () const
 
virtual void print (std::ostream &o) const
 
uint32_t roiWord () const
 
const std::string & tobName () const
 

Static Public Member Functions

static unsigned int nBitsEx ()
 
static unsigned int nBitsEy ()
 
static unsigned int nBitsEt ()
 
static MetTOBcreateOnHeap (const MetTOB &cl)
 
static void clearHeap ()
 
static const Heap< TCS::MetTOB > & heap ()
 
static size_t instances ()
 

Protected Member Functions

int sizeCheck (int value, unsigned int size) const
 
unsigned int sizeCheck (unsigned int value, unsigned int size) const
 
int sizeCheckM (int value, unsigned int size) const
 

Private Attributes

int m_Ex {0}
 
int m_Ey {0}
 
unsigned int m_Et {0}
 
double m_ExDouble {0}
 
double m_EyDouble {0}
 
double m_EtDouble {0}
 
uint32_t m_roiWord
 
std::string m_tobName
 

Static Private Attributes

static const unsigned int g_nBitsEx = 15
 
static const unsigned int g_nBitsEy = 15
 
static const unsigned int g_nBitsEt = 15
 
static thread_local Heap< TCS::MetTOBfg_heap
 

Detailed Description

Definition at line 13 of file MetTOB.h.

Constructor & Destructor Documentation

◆ MetTOB() [1/3]

TCS::MetTOB::MetTOB ( )

Definition at line 12 of file MetTOB.cxx.

12  : BaseTOB(0,"MetTOB")
13 {}

◆ MetTOB() [2/3]

TCS::MetTOB::MetTOB ( int  ex,
int  ey,
unsigned int  et 
)

Definition at line 16 of file MetTOB.cxx.

16  : BaseTOB(0,"MetTOB")
17  , m_Ex( ex )
18  , m_Ey( ey )
19  , m_Et( et )
20 {}

◆ MetTOB() [3/3]

TCS::MetTOB::MetTOB ( const MetTOB met)

Definition at line 23 of file MetTOB.cxx.

23  : BaseTOB(0,"MetTOB")
24  , m_Ex( met.m_Ex )
25  , m_Ey( met.m_Ey )
26  , m_Et( met.m_Et )
27 {}

◆ ~MetTOB()

TCS::MetTOB::~MetTOB ( )
virtualdefault

Member Function Documentation

◆ clearHeap()

void TCS::MetTOB::clearHeap ( )
static

Definition at line 38 of file MetTOB.cxx.

38  {
39  return fg_heap.clear();
40 }

◆ createOnHeap()

TCS::MetTOB * TCS::MetTOB::createOnHeap ( const MetTOB cl)
static

Definition at line 33 of file MetTOB.cxx.

33  {
34  return fg_heap.create(cl);
35 }

◆ Et()

unsigned int TCS::MetTOB::Et ( ) const
inline

Definition at line 36 of file MetTOB.h.

36 { return m_Et; }

◆ EtDouble()

double TCS::MetTOB::EtDouble ( ) const
inline

Definition at line 40 of file MetTOB.h.

40 { return m_EtDouble; }

◆ Ex()

int TCS::MetTOB::Ex ( ) const
inline

Definition at line 34 of file MetTOB.h.

34 { return m_Ex; }

◆ ExDouble()

double TCS::MetTOB::ExDouble ( ) const
inline

Definition at line 38 of file MetTOB.h.

38 { return m_ExDouble; }

◆ Ey()

int TCS::MetTOB::Ey ( ) const
inline

Definition at line 35 of file MetTOB.h.

35 { return m_Ey; }

◆ EyDouble()

double TCS::MetTOB::EyDouble ( ) const
inline

Definition at line 39 of file MetTOB.h.

39 { return m_EyDouble; }

◆ heap()

static const Heap<TCS::MetTOB>& TCS::MetTOB::heap ( )
inlinestatic

Definition at line 56 of file MetTOB.h.

56 { return fg_heap; }

◆ instances()

static size_t TCS::BaseTOB::instances ( )
inlinestaticinherited

Definition at line 25 of file BaseTOB.h.

25 { return 0; }

◆ nBitsEt()

static unsigned int TCS::MetTOB::nBitsEt ( )
inlinestatic

Definition at line 18 of file MetTOB.h.

18 { return g_nBitsEt; }

◆ nBitsEx()

static unsigned int TCS::MetTOB::nBitsEx ( )
inlinestatic

Definition at line 16 of file MetTOB.h.

16 { return g_nBitsEx; }

◆ nBitsEy()

static unsigned int TCS::MetTOB::nBitsEy ( )
inlinestatic

Definition at line 17 of file MetTOB.h.

17 { return g_nBitsEy; }

◆ print()

void TCS::MetTOB::print ( std::ostream &  o) const
virtual

Implements TCS::BaseTOB.

Definition at line 42 of file MetTOB.cxx.

42  {
43  o << "MET signed Ex: " << Ex() << ", signed Ey: " << Ey() << ", sum Et: " << Et();
44 }

◆ roiWord()

uint32_t TCS::BaseTOB::roiWord ( ) const
inlineinherited

Definition at line 21 of file BaseTOB.h.

21 { return m_roiWord; }

◆ setEt()

void TCS::MetTOB::setEt ( unsigned int  et)
inline

Definition at line 45 of file MetTOB.h.

45 { m_Et = sizeCheck(et, nBitsEt()); }

◆ setEtDouble()

void TCS::MetTOB::setEtDouble ( double  et)
inline

Definition at line 49 of file MetTOB.h.

49 { m_EtDouble = et; }

◆ setEx()

void TCS::MetTOB::setEx ( int  ex)
inline

Definition at line 43 of file MetTOB.h.

43 { m_Ex = sizeCheckM(ex, nBitsEx()); }

◆ setExDouble()

void TCS::MetTOB::setExDouble ( double  ex)
inline

Definition at line 47 of file MetTOB.h.

47 { m_ExDouble = ex; }

◆ setEy()

void TCS::MetTOB::setEy ( int  ey)
inline

Definition at line 44 of file MetTOB.h.

44 { m_Ey = sizeCheckM(ey, nBitsEy()); }

◆ setEyDouble()

void TCS::MetTOB::setEyDouble ( double  ey)
inline

Definition at line 48 of file MetTOB.h.

48 { m_EyDouble = ey; }

◆ sizeCheck() [1/2]

int TCS::BaseTOB::sizeCheck ( int  value,
unsigned int  size 
) const
protectedinherited

Definition at line 32 of file BaseTOB.cxx.

33 {
34  int max(0x1 << (size-1));
35  int min(~max + 1);
36  --max;
37  if(value>max || value<min) {
38  TCS_EXCEPTION("Integer value " << value << " outside firmware specifications. Maximum number of bits is " << size << " -> range ["<<min<<" - "<<max<<"]" << ", for " << m_tobName);
39  }
40  return value;
41 }

◆ sizeCheck() [2/2]

unsigned int TCS::BaseTOB::sizeCheck ( unsigned int  value,
unsigned int  size 
) const
protectedinherited

Definition at line 44 of file BaseTOB.cxx.

45 {
46  unsigned int max( (0x1 << size)-1 );
47  if(value>max) {
48  TCS_EXCEPTION("Unsigned integer value " << value << " outside firmware specifications. Maximum number of bits is " << size << " -> range [0"<<" - "<<max<<"]" << ", for " << m_tobName);
49  }
50  return value;
51 }

◆ sizeCheckM()

int TCS::BaseTOB::sizeCheckM ( int  value,
unsigned int  size 
) const
protectedinherited

Definition at line 19 of file BaseTOB.cxx.

20 {
21  int max(0x1 << (size-1));
22  int min(~max + 1);
23  --max;
24  if( (-value)>max || (-value)<min) {
25  TCS_EXCEPTION("Integer value " << -value << " outside firmware specifications. Maximum number of bits is " << size << " -> range ["<<min<<" - "<<max<<"]" << ", for " << m_tobName);
26  }
27  return value;
28 }

◆ tobName()

const std::string& TCS::BaseTOB::tobName ( ) const
inlineinherited

Definition at line 23 of file BaseTOB.h.

23 { return m_tobName; }

◆ tobType()

inputTOBType_t TCS::MetTOB::tobType ( ) const
inlinevirtual

Implements TCS::BaseTOB.

Definition at line 51 of file MetTOB.h.

51 { return MET; }

Member Data Documentation

◆ fg_heap

thread_local TCS::Heap< TCS::MetTOB > TCS::MetTOB::fg_heap
staticprivate

Definition at line 73 of file MetTOB.h.

◆ g_nBitsEt

const unsigned int TCS::MetTOB::g_nBitsEt = 15
staticprivate

Definition at line 63 of file MetTOB.h.

◆ g_nBitsEx

const unsigned int TCS::MetTOB::g_nBitsEx = 15
staticprivate

Definition at line 61 of file MetTOB.h.

◆ g_nBitsEy

const unsigned int TCS::MetTOB::g_nBitsEy = 15
staticprivate

Definition at line 62 of file MetTOB.h.

◆ m_Et

unsigned int TCS::MetTOB::m_Et {0}
private

Definition at line 67 of file MetTOB.h.

◆ m_EtDouble

double TCS::MetTOB::m_EtDouble {0}
private

Definition at line 71 of file MetTOB.h.

◆ m_Ex

int TCS::MetTOB::m_Ex {0}
private

Definition at line 65 of file MetTOB.h.

◆ m_ExDouble

double TCS::MetTOB::m_ExDouble {0}
private

Definition at line 69 of file MetTOB.h.

◆ m_Ey

int TCS::MetTOB::m_Ey {0}
private

Definition at line 66 of file MetTOB.h.

◆ m_EyDouble

double TCS::MetTOB::m_EyDouble {0}
private

Definition at line 70 of file MetTOB.h.

◆ m_roiWord

uint32_t TCS::BaseTOB::m_roiWord
privateinherited

Definition at line 36 of file BaseTOB.h.

◆ m_tobName

std::string TCS::BaseTOB::m_tobName
privateinherited

Definition at line 37 of file BaseTOB.h.


The documentation for this class was generated from the following files:
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
et
Extra patterns decribing particle interation process.
TCS::Heap::clear
void clear()
Definition: Heap.h:32
TCS::MetTOB::m_Ex
int m_Ex
Definition: MetTOB.h:65
TCS::MetTOB::fg_heap
static thread_local Heap< TCS::MetTOB > fg_heap
Definition: MetTOB.h:73
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
TCS::MetTOB::m_EyDouble
double m_EyDouble
Definition: MetTOB.h:70
TCS::MetTOB::Ex
int Ex() const
Definition: MetTOB.h:34
athena.value
value
Definition: athena.py:124
TCS::MetTOB::m_ExDouble
double m_ExDouble
Definition: MetTOB.h:69
TCS::MetTOB::nBitsEy
static unsigned int nBitsEy()
Definition: MetTOB.h:17
TCS::BaseTOB::sizeCheck
int sizeCheck(int value, unsigned int size) const
Definition: BaseTOB.cxx:32
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TCS::MetTOB::g_nBitsEy
static const unsigned int g_nBitsEy
Definition: MetTOB.h:62
TCS::MetTOB::m_Ey
int m_Ey
Definition: MetTOB.h:66
met
Definition: IMETSignificance.h:24
TCS::BaseTOB::BaseTOB
BaseTOB(uint32_t roiWord, const std::string &tobType)
Definition: BaseTOB.cxx:11
TCS::MetTOB::g_nBitsEx
static const unsigned int g_nBitsEx
Definition: MetTOB.h:61
TCS::MetTOB::nBitsEt
static unsigned int nBitsEt()
Definition: MetTOB.h:18
TCS::BaseTOB::m_roiWord
uint32_t m_roiWord
Definition: BaseTOB.h:36
TCS::MET
@ MET
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:16
TCS_EXCEPTION
#define TCS_EXCEPTION(MSG)
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Exception.h:14
TCS::MetTOB::m_Et
unsigned int m_Et
Definition: MetTOB.h:67
TCS::MetTOB::m_EtDouble
double m_EtDouble
Definition: MetTOB.h:71
TCS::Heap::create
T * create(const T &obj)
create an object on the heap
Definition: Heap.h:50
TCS::BaseTOB::sizeCheckM
int sizeCheckM(int value, unsigned int size) const
Definition: BaseTOB.cxx:19
TCS::MetTOB::nBitsEx
static unsigned int nBitsEx()
Definition: MetTOB.h:16
TCS::MetTOB::g_nBitsEt
static const unsigned int g_nBitsEt
Definition: MetTOB.h:63
TCS::MetTOB::Et
unsigned int Et() const
Definition: MetTOB.h:36
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
TCS::MetTOB::Ey
int Ey() const
Definition: MetTOB.h:35
TCS::BaseTOB::m_tobName
std::string m_tobName
Definition: BaseTOB.h:37