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

#include <ClusterTOB.h>

Inheritance diagram for TCS::ClusterTOB:
Collaboration diagram for TCS::ClusterTOB:

Public Member Functions

 ClusterTOB (uint32_t roiWord=0, const std::string &tobName="ClusterTOB")
 ClusterTOB (unsigned int et, unsigned int isolation, int eta, int phi, inputTOBType_t tobType=NONE, uint32_t roiWord=0, const std::string &tobName="ClusterTOB")
 ClusterTOB (const ClusterTOB &cluster)
virtual ~ClusterTOB ()
unsigned int Et () const
unsigned int isolation () const
int eta () const
int phi () const
double EtDouble () const
double etaDouble () const
double phiDouble () const
void setEt (unsigned int et)
void setIsolation (unsigned int et)
void setEta (int eta)
void setPhi (int phi)
void setEtDouble (double et)
void setEtaDouble (double eta)
void setPhiDouble (double phi)
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 unsigned int nBitsEt ()
static unsigned int nBitsIsolation ()
static unsigned int nBitsEta ()
static unsigned int nBitsPhi ()
static ClusterTOBcreateOnHeap (const ClusterTOB &cl)
static void clearHeap ()
static const Heap< TCS::ClusterTOB > & 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_Et {0}
unsigned int m_isolation {0}
int m_eta {0}
int m_phi {0}
double m_EtDouble {0}
double m_etaDouble {0}
double m_phiDouble {0}
inputTOBType_t m_tobType { NONE }
uint32_t m_roiWord
std::string m_tobName

Static Private Attributes

static const unsigned int g_nBitsEt = 10
static const unsigned int g_nBitsIsolation = 5
static const unsigned int g_nBitsEta = 6
static const unsigned int g_nBitsPhi = 7
static thread_local Heap< TCS::ClusterTOBfg_heap

Detailed Description

Definition at line 13 of file ClusterTOB.h.

Constructor & Destructor Documentation

◆ ClusterTOB() [1/3]

TCS::ClusterTOB::ClusterTOB ( uint32_t roiWord = 0,
const std::string & tobName = "ClusterTOB" )

Definition at line 13 of file ClusterTOB.cxx.

13 :
15{}
const std::string & tobName() const
Definition BaseTOB.h:23
uint32_t roiWord() const
Definition BaseTOB.h:21
BaseTOB(uint32_t roiWord, const std::string &tobType)
Definition BaseTOB.cxx:11

◆ ClusterTOB() [2/3]

TCS::ClusterTOB::ClusterTOB ( unsigned int et,
unsigned int isolation,
int eta,
int phi,
inputTOBType_t tobType = NONE,
uint32_t roiWord = 0,
const std::string & tobName = "ClusterTOB" )

Definition at line 18 of file ClusterTOB.cxx.

18 :
20 , m_Et( sizeCheck(et, nBitsEt()) )
25{}
float et(const xAOD::jFexSRJetRoI *j)
int sizeCheck(int value, unsigned int size) const
Definition BaseTOB.cxx:32
inputTOBType_t tobType() const
Definition ClusterTOB.h:62
int eta() const
Definition ClusterTOB.h:36
int phi() const
Definition ClusterTOB.h:37
unsigned int isolation() const
Definition ClusterTOB.h:35
static unsigned int nBitsEt()
Definition ClusterTOB.h:16
static unsigned int nBitsEta()
Definition ClusterTOB.h:18
static unsigned int nBitsPhi()
Definition ClusterTOB.h:19
unsigned int m_isolation
Definition ClusterTOB.h:71
unsigned int m_Et
Definition ClusterTOB.h:70
inputTOBType_t m_tobType
Definition ClusterTOB.h:79
static unsigned int nBitsIsolation()
Definition ClusterTOB.h:17

◆ ClusterTOB() [3/3]

TCS::ClusterTOB::ClusterTOB ( const ClusterTOB & cluster)
default

◆ ~ClusterTOB()

TCS::ClusterTOB::~ClusterTOB ( )
virtualdefault

Member Function Documentation

◆ clearHeap()

void TCS::ClusterTOB::clearHeap ( )
static

Definition at line 40 of file ClusterTOB.cxx.

40 {
41 return fg_heap.clear();
42}
static thread_local Heap< TCS::ClusterTOB > fg_heap
Definition ClusterTOB.h:81

◆ createOnHeap()

TCS::ClusterTOB * TCS::ClusterTOB::createOnHeap ( const ClusterTOB & cl)
static

Definition at line 35 of file ClusterTOB.cxx.

35 {
36 return fg_heap.create(cl);
37}

◆ Et()

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

Definition at line 34 of file ClusterTOB.h.

34{ return m_Et; }

◆ eta()

int TCS::ClusterTOB::eta ( ) const
inline

Definition at line 36 of file ClusterTOB.h.

36{ return m_eta; }

◆ etaDouble()

double TCS::ClusterTOB::etaDouble ( ) const
inline

Definition at line 40 of file ClusterTOB.h.

40{ return m_etaDouble; }
double m_etaDouble
Definition ClusterTOB.h:76

◆ EtDouble()

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

Definition at line 39 of file ClusterTOB.h.

39{ return m_EtDouble; }
double m_EtDouble
Definition ClusterTOB.h:75

◆ heap()

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

Definition at line 56 of file ClusterTOB.h.

56{ return fg_heap; }

◆ instances()

size_t TCS::BaseTOB::instances ( )
inlinestaticinherited

Definition at line 25 of file BaseTOB.h.

25{ return 0; }

◆ isolation()

unsigned int TCS::ClusterTOB::isolation ( ) const
inline

Definition at line 35 of file ClusterTOB.h.

35{ return m_isolation; }

◆ nBitsEt()

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

Definition at line 16 of file ClusterTOB.h.

16{ return g_nBitsEt; }
static const unsigned int g_nBitsEt
Definition ClusterTOB.h:65

◆ nBitsEta()

unsigned int TCS::ClusterTOB::nBitsEta ( )
inlinestatic

Definition at line 18 of file ClusterTOB.h.

18{ return g_nBitsEta; }
static const unsigned int g_nBitsEta
Definition ClusterTOB.h:67

◆ nBitsIsolation()

unsigned int TCS::ClusterTOB::nBitsIsolation ( )
inlinestatic

Definition at line 17 of file ClusterTOB.h.

17{ return g_nBitsIsolation; }
static const unsigned int g_nBitsIsolation
Definition ClusterTOB.h:66

◆ nBitsPhi()

unsigned int TCS::ClusterTOB::nBitsPhi ( )
inlinestatic

Definition at line 19 of file ClusterTOB.h.

19{ return g_nBitsPhi; }
static const unsigned int g_nBitsPhi
Definition ClusterTOB.h:68

◆ phi()

int TCS::ClusterTOB::phi ( ) const
inline

Definition at line 37 of file ClusterTOB.h.

37{ return m_phi; }

◆ phiDouble()

double TCS::ClusterTOB::phiDouble ( ) const
inline

Definition at line 41 of file ClusterTOB.h.

41{ return m_phiDouble; }
double m_phiDouble
Definition ClusterTOB.h:77

◆ print()

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

Implements TCS::BaseTOB.

Definition at line 44 of file ClusterTOB.cxx.

44 {
45 o << "cluster energy: " << Et() << ", eta: " << eta() << ", phi: " << phi();
46}
unsigned int Et() const
Definition ClusterTOB.h:34

◆ 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::ClusterTOB::setEt ( unsigned int et)
inline

Definition at line 44 of file ClusterTOB.h.

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

◆ setEta()

void TCS::ClusterTOB::setEta ( int eta)
inline

Definition at line 46 of file ClusterTOB.h.

46{ m_eta = sizeCheck(eta, nBitsEta()); }

◆ setEtaDouble()

void TCS::ClusterTOB::setEtaDouble ( double eta)
inline

Definition at line 50 of file ClusterTOB.h.

50{ m_etaDouble = eta; }

◆ setEtDouble()

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

Definition at line 49 of file ClusterTOB.h.

49{ m_EtDouble = et; }

◆ setIsolation()

void TCS::ClusterTOB::setIsolation ( unsigned int et)
inline

Definition at line 45 of file ClusterTOB.h.

◆ setPhi()

void TCS::ClusterTOB::setPhi ( int phi)
inline

Definition at line 47 of file ClusterTOB.h.

47{ m_phi = sizeCheck(phi, nBitsPhi()); }

◆ setPhiDouble()

void TCS::ClusterTOB::setPhiDouble ( double phi)
inline

Definition at line 51 of file ClusterTOB.h.

51{ m_phiDouble = phi; }

◆ setTobType()

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

Definition at line 60 of file ClusterTOB.h.

60{ 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}

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

Implements TCS::BaseTOB.

Definition at line 62 of file ClusterTOB.h.

62{ return m_tobType; }

Member Data Documentation

◆ fg_heap

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

Definition at line 81 of file ClusterTOB.h.

◆ g_nBitsEt

const unsigned int TCS::ClusterTOB::g_nBitsEt = 10
staticprivate

Definition at line 65 of file ClusterTOB.h.

◆ g_nBitsEta

const unsigned int TCS::ClusterTOB::g_nBitsEta = 6
staticprivate

Definition at line 67 of file ClusterTOB.h.

◆ g_nBitsIsolation

const unsigned int TCS::ClusterTOB::g_nBitsIsolation = 5
staticprivate

Definition at line 66 of file ClusterTOB.h.

◆ g_nBitsPhi

const unsigned int TCS::ClusterTOB::g_nBitsPhi = 7
staticprivate

Definition at line 68 of file ClusterTOB.h.

◆ m_Et

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

Definition at line 70 of file ClusterTOB.h.

70{0};

◆ m_eta

int TCS::ClusterTOB::m_eta {0}
private

Definition at line 72 of file ClusterTOB.h.

72{0};

◆ m_etaDouble

double TCS::ClusterTOB::m_etaDouble {0}
private

Definition at line 76 of file ClusterTOB.h.

76{0};

◆ m_EtDouble

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

Definition at line 75 of file ClusterTOB.h.

75{0};

◆ m_isolation

unsigned int TCS::ClusterTOB::m_isolation {0}
private

Definition at line 71 of file ClusterTOB.h.

71{0};

◆ m_phi

int TCS::ClusterTOB::m_phi {0}
private

Definition at line 73 of file ClusterTOB.h.

73{0};

◆ m_phiDouble

double TCS::ClusterTOB::m_phiDouble {0}
private

Definition at line 77 of file ClusterTOB.h.

77{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.

◆ m_tobType

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

Definition at line 79 of file ClusterTOB.h.


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