ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
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 {}

◆ 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 )
14  , m_tobType( tobType )
15 {}

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

◆ 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()

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

Definition at line 42 of file gTETOB.h.

42 { return fg_heap; }

◆ instances()

static 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; }

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

37 { m_sumEtDouble = sumEt; }

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

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

◆ m_sumEtDouble

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

Definition at line 54 of file gTETOB.h.

◆ 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:
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
TCS::Heap::clear
void clear()
Definition: Heap.h:32
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
TCS::gTETOB::sumEt
unsigned int sumEt() const
Definition: gTETOB.h:30
athena.value
value
Definition: athena.py:124
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TCS::BaseTOB::BaseTOB
BaseTOB(uint32_t roiWord, const std::string &tobType)
Definition: BaseTOB.cxx:11
TCS::BaseTOB::m_roiWord
uint32_t m_roiWord
Definition: BaseTOB.h:36
TCS_EXCEPTION
#define TCS_EXCEPTION(MSG)
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Exception.h:14
TCS::Heap::create
T * create(const T &obj)
create an object on the heap
Definition: Heap.h:50
TCS::gTETOB::tobType
inputTOBType_t tobType() const
Definition: gTETOB.h:48
TCS::gTETOB::fg_heap
static thread_local Heap< TCS::gTETOB > fg_heap
Definition: gTETOB.h:58
TCS::gTETOB::m_tobType
inputTOBType_t m_tobType
Definition: gTETOB.h:56
TCS::gTETOB::m_sumEt
unsigned int m_sumEt
Definition: gTETOB.h:52
TCS::gTETOB::m_sumEtDouble
double m_sumEtDouble
Definition: gTETOB.h:54
TCS::BaseTOB::m_tobName
std::string m_tobName
Definition: BaseTOB.h:37