ATLAS Offline Software
Loading...
Searching...
No Matches
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{}
BaseTOB(uint32_t roiWord, const std::string &tobType)
Definition BaseTOB.cxx:11

◆ 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{}
float et(const xAOD::jFexSRJetRoI *j)
int m_Ex
Definition MetTOB.h:65
unsigned int m_Et
Definition MetTOB.h:67
int m_Ey
Definition MetTOB.h:66

◆ 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}
static thread_local Heap< TCS::MetTOB > fg_heap
Definition MetTOB.h:73

◆ 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; }
double m_EtDouble
Definition MetTOB.h:71

◆ 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; }
double m_ExDouble
Definition MetTOB.h:69

◆ 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; }
double m_EyDouble
Definition MetTOB.h:70

◆ heap()

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

Definition at line 56 of file MetTOB.h.

56{ return fg_heap; }

◆ instances()

size_t TCS::BaseTOB::instances ( )
inlinestaticinherited

Definition at line 25 of file BaseTOB.h.

25{ return 0; }

◆ nBitsEt()

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

Definition at line 18 of file MetTOB.h.

18{ return g_nBitsEt; }
static const unsigned int g_nBitsEt
Definition MetTOB.h:63

◆ nBitsEx()

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

Definition at line 16 of file MetTOB.h.

16{ return g_nBitsEx; }
static const unsigned int g_nBitsEx
Definition MetTOB.h:61

◆ nBitsEy()

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

Definition at line 17 of file MetTOB.h.

17{ return g_nBitsEy; }
static const unsigned int g_nBitsEy
Definition MetTOB.h:62

◆ 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}
unsigned int Et() const
Definition MetTOB.h:36
int Ex() const
Definition MetTOB.h:34
int Ey() const
Definition MetTOB.h:35

◆ roiWord()

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

Definition at line 21 of file BaseTOB.h.

21{ return m_roiWord; }
uint32_t m_roiWord
Definition BaseTOB.h:36

◆ setEt()

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

Definition at line 45 of file MetTOB.h.

45{ m_Et = sizeCheck(et, nBitsEt()); }
int sizeCheck(int value, unsigned int size) const
Definition BaseTOB.cxx:32
static unsigned int nBitsEt()
Definition MetTOB.h:18

◆ 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()); }
int sizeCheckM(int value, unsigned int size) const
Definition BaseTOB.cxx:19
static unsigned int nBitsEx()
Definition MetTOB.h:16

◆ 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()); }
static unsigned int nBitsEy()
Definition MetTOB.h:17

◆ 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}
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
std::string m_tobName
Definition BaseTOB.h:37

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

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.

67{0};

◆ m_EtDouble

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

Definition at line 71 of file MetTOB.h.

71{0};

◆ m_Ex

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

Definition at line 65 of file MetTOB.h.

65{0};

◆ m_ExDouble

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

Definition at line 69 of file MetTOB.h.

69{0};

◆ m_Ey

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

Definition at line 66 of file MetTOB.h.

66{0};

◆ m_EyDouble

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

Definition at line 70 of file MetTOB.h.

70{0};

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