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

#include <jTETOB.h>

Inheritance diagram for TCS::jTETOB:
Collaboration diagram for TCS::jTETOB:

Public Member Functions

 jTETOB ()
 
 jTETOB (unsigned int sumEt, inputTOBType_t tobType=NONE)
 
 jTETOB (const jTETOB &jte)
 
virtual ~jTETOB ()
 
unsigned int sumEt () const
 
double sumEtDouble () const
 
bool saturationFlag () const
 
void setSumEt (unsigned int sumEt)
 
void setSumEtDouble (double sumEt)
 
void setSaturationFlag (bool saturationFlag)
 
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 jTETOBcreateOnHeap (const jTETOB &jte)
 
static void clearHeap ()
 
static const Heap< TCS::jTETOB > & 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}
 
bool m_saturationFlag {false}
 
inputTOBType_t m_tobType { NONE }
 
uint32_t m_roiWord
 
std::string m_tobName
 

Static Private Attributes

static thread_local Heap< TCS::jTETOBfg_heap
 

Detailed Description

Definition at line 13 of file jTETOB.h.

Constructor & Destructor Documentation

◆ jTETOB() [1/3]

TCS::jTETOB::jTETOB ( )

Definition at line 8 of file jTETOB.cxx.

8  : BaseTOB(0,"jTETOB")
9 {}

◆ jTETOB() [2/3]

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

Definition at line 12 of file jTETOB.cxx.

12  : BaseTOB(0,"jTETOB")
13  , m_sumEt( sumEt )
14  , m_tobType( tobType )
15 {}

◆ jTETOB() [3/3]

TCS::jTETOB::jTETOB ( const jTETOB jte)
default

◆ ~jTETOB()

TCS::jTETOB::~jTETOB ( )
virtualdefault

Member Function Documentation

◆ clearHeap()

void TCS::jTETOB::clearHeap ( )
static

Definition at line 31 of file jTETOB.cxx.

31  {
32  return fg_heap.clear();
33 }

◆ createOnHeap()

TCS::jTETOB * TCS::jTETOB::createOnHeap ( const jTETOB jte)
static

Definition at line 26 of file jTETOB.cxx.

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

◆ heap()

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

Definition at line 46 of file jTETOB.h.

46 { 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::jTETOB::print ( std::ostream &  o) const
virtual

Implements TCS::BaseTOB.

Definition at line 35 of file jTETOB.cxx.

35  {
36  o << "jTE 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; }

◆ saturationFlag()

bool TCS::jTETOB::saturationFlag ( ) const
inline

Definition at line 34 of file jTETOB.h.

34 { return m_saturationFlag; }

◆ setSaturationFlag()

void TCS::jTETOB::setSaturationFlag ( bool  saturationFlag)
inline

Definition at line 41 of file jTETOB.h.

◆ setSumEt()

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

Definition at line 37 of file jTETOB.h.

37 { m_sumEt = sumEt; }

◆ setSumEtDouble()

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

Definition at line 39 of file jTETOB.h.

39 { m_sumEtDouble = sumEt; }

◆ setTobType()

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

Definition at line 50 of file jTETOB.h.

50 { 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::jTETOB::sumEt ( ) const
inline

Definition at line 30 of file jTETOB.h.

30 { return m_sumEt; }

◆ sumEtDouble()

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

Definition at line 32 of file jTETOB.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::jTETOB::tobType ( ) const
inlinevirtual

Implements TCS::BaseTOB.

Definition at line 52 of file jTETOB.h.

52 { return m_tobType; }

Member Data Documentation

◆ fg_heap

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

Definition at line 64 of file jTETOB.h.

◆ m_roiWord

uint32_t TCS::BaseTOB::m_roiWord
privateinherited

Definition at line 36 of file BaseTOB.h.

◆ m_saturationFlag

bool TCS::jTETOB::m_saturationFlag {false}
private

Definition at line 60 of file jTETOB.h.

◆ m_sumEt

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

Definition at line 56 of file jTETOB.h.

◆ m_sumEtDouble

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

Definition at line 58 of file jTETOB.h.

◆ m_tobName

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

Definition at line 37 of file BaseTOB.h.

◆ m_tobType

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

Definition at line 62 of file jTETOB.h.


The documentation for this class was generated from the following files:
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
TCS::jTETOB::m_sumEtDouble
double m_sumEtDouble
Definition: jTETOB.h:58
TCS::jTETOB::m_tobType
inputTOBType_t m_tobType
Definition: jTETOB.h:62
TCS::Heap::clear
void clear()
Definition: Heap.h:32
max
#define max(a, b)
Definition: cfImp.cxx:41
athena.value
value
Definition: athena.py:124
TCS::jTETOB::tobType
inputTOBType_t tobType() const
Definition: jTETOB.h:52
TCS::jTETOB::sumEt
unsigned int sumEt() const
Definition: jTETOB.h:30
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::jTETOB::fg_heap
static thread_local Heap< TCS::jTETOB > fg_heap
Definition: jTETOB.h:64
TCS_EXCEPTION
#define TCS_EXCEPTION(MSG)
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Exception.h:14
min
#define min(a, b)
Definition: cfImp.cxx:40
TCS::Heap::create
T * create(const T &obj)
create an object on the heap
Definition: Heap.h:50
TCS::jTETOB::m_sumEt
unsigned int m_sumEt
Definition: jTETOB.h:56
TCS::jTETOB::saturationFlag
bool saturationFlag() const
Definition: jTETOB.h:34
TCS::jTETOB::m_saturationFlag
bool m_saturationFlag
Definition: jTETOB.h:60
TCS::BaseTOB::m_tobName
std::string m_tobName
Definition: BaseTOB.h:37