ATLAS Offline Software
Loading...
Searching...
No Matches
TCS::gTETOB Class Reference

#include <gTETOB.h>

Inheritance diagram for TCS::gTETOB:
Collaboration diagram for TCS::gTETOB:

Public Member Functions

 gTETOB ()
 gTETOB (unsigned int sumEt, inputTOBType_t tobType=NONE)
 gTETOB (const gTETOB &gte)
virtual ~gTETOB ()
unsigned int sumEt () const
double sumEtDouble () const
void setSumEt (unsigned int sumEt)
void setSumEtDouble (double sumEt)
virtual void print (std::ostream &o) const
void setTobType (inputTOBType_t tobType)
inputTOBType_t tobType () const
uint32_t roiWord () const
const std::string & tobName () const

Static Public Member Functions

static gTETOBcreateOnHeap (const gTETOB &gte)
static void clearHeap ()
static const Heap< TCS::gTETOB > & 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

unsigned int m_sumEt {0}
double m_sumEtDouble {0}
inputTOBType_t m_tobType { NONE }
uint32_t m_roiWord
std::string m_tobName

Static Private Attributes

static thread_local Heap< TCS::gTETOBfg_heap

Detailed Description

Definition at line 13 of file gTETOB.h.

Constructor & Destructor Documentation

◆ gTETOB() [1/3]

TCS::gTETOB::gTETOB ( )

Definition at line 8 of file gTETOB.cxx.

8 : BaseTOB(0,"gTETOB")
9{}
BaseTOB(uint32_t roiWord, const std::string &tobType)
Definition BaseTOB.cxx:11

◆ gTETOB() [2/3]

TCS::gTETOB::gTETOB ( unsigned int sumEt,
inputTOBType_t tobType = NONE )

Definition at line 12 of file gTETOB.cxx.

12 : BaseTOB(0,"gTETOB")
13 , m_sumEt( sumEt )
15{}
unsigned int m_sumEt
Definition gTETOB.h:52
inputTOBType_t tobType() const
Definition gTETOB.h:48
inputTOBType_t m_tobType
Definition gTETOB.h:56
unsigned int sumEt() const
Definition gTETOB.h:30

◆ gTETOB() [3/3]

TCS::gTETOB::gTETOB ( const gTETOB & gte)
default

◆ ~gTETOB()

TCS::gTETOB::~gTETOB ( )
virtualdefault

Member Function Documentation

◆ clearHeap()

void TCS::gTETOB::clearHeap ( )
static

Definition at line 31 of file gTETOB.cxx.

31 {
32 return fg_heap.clear();
33}
static thread_local Heap< TCS::gTETOB > fg_heap
Definition gTETOB.h:58

◆ createOnHeap()

TCS::gTETOB * TCS::gTETOB::createOnHeap ( const gTETOB & gte)
static

Definition at line 26 of file gTETOB.cxx.

26 {
27 return fg_heap.create(gte);
28}

◆ heap()

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

Definition at line 42 of file gTETOB.h.

42{ return fg_heap; }

◆ instances()

size_t TCS::BaseTOB::instances ( )
inlinestaticinherited

Definition at line 25 of file BaseTOB.h.

25{ return 0; }

◆ print()

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

Implements TCS::BaseTOB.

Definition at line 35 of file gTETOB.cxx.

35 {
36 o << "gTE type: " << tobType() << ", sumEt: " << sumEt();
37}

◆ 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

◆ setSumEt()

void TCS::gTETOB::setSumEt ( unsigned int sumEt)
inline

Definition at line 35 of file gTETOB.h.

35{ m_sumEt = sumEt; }

◆ setSumEtDouble()

void TCS::gTETOB::setSumEtDouble ( double sumEt)
inline

Definition at line 37 of file gTETOB.h.

double m_sumEtDouble
Definition gTETOB.h:54

◆ setTobType()

void TCS::gTETOB::setTobType ( inputTOBType_t tobType)
inline

Definition at line 46 of file gTETOB.h.

46{ m_tobType = tobType; }

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

◆ sumEt()

unsigned int TCS::gTETOB::sumEt ( ) const
inline

Definition at line 30 of file gTETOB.h.

30{ return m_sumEt; }

◆ sumEtDouble()

double TCS::gTETOB::sumEtDouble ( ) const
inline

Definition at line 32 of file gTETOB.h.

32{ return m_sumEtDouble; }

◆ 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::gTETOB::tobType ( ) const
inlinevirtual

Implements TCS::BaseTOB.

Definition at line 48 of file gTETOB.h.

48{ return m_tobType; }

Member Data Documentation

◆ fg_heap

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

Definition at line 58 of file gTETOB.h.

◆ m_roiWord

uint32_t TCS::BaseTOB::m_roiWord
privateinherited

Definition at line 36 of file BaseTOB.h.

◆ m_sumEt

unsigned int TCS::gTETOB::m_sumEt {0}
private

Definition at line 52 of file gTETOB.h.

52{0};

◆ m_sumEtDouble

double TCS::gTETOB::m_sumEtDouble {0}
private

Definition at line 54 of file gTETOB.h.

54{0};

◆ m_tobName

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

Definition at line 37 of file BaseTOB.h.

◆ m_tobType

inputTOBType_t TCS::gTETOB::m_tobType { NONE }
private

Definition at line 56 of file gTETOB.h.


The documentation for this class was generated from the following files: