ATLAS Offline Software
Loading...
Searching...
No Matches
TCS::BaseTOB Class Referenceabstract

#include <BaseTOB.h>

Inherited by TCS::ClusterTOB, TCS::GenericTOB, TCS::JetTOB, TCS::LateMuonTOB, TCS::MetTOB, TCS::MuonNextBCTOB, TCS::MuonTOB, TCS::cTauTOB, TCS::eEmTOB, TCS::eTauTOB, TCS::gJetTOB, TCS::gLJetTOB, TCS::gTETOB, TCS::gXETOB, TCS::jEmTOB, TCS::jJetTOB, TCS::jLJetTOB, TCS::jTETOB, TCS::jTauTOB, and TCS::jXETOB.

Collaboration diagram for TCS::BaseTOB:

Public Member Functions

 BaseTOB (uint32_t roiWord, const std::string &tobType)
virtual ~BaseTOB ()
virtual void print (std::ostream &) const =0
virtual inputTOBType_t tobType () const =0
uint32_t roiWord () const
const std::string & tobName () const

Static Public Member Functions

static size_t instances ()

Protected Member Functions

int sizeCheck (int value, unsigned int size) const
int sizeCheckM (int value, unsigned int size) const
unsigned int sizeCheck (unsigned int value, unsigned int size) const

Private Attributes

uint32_t m_roiWord
std::string m_tobName

Detailed Description

Definition at line 12 of file BaseTOB.h.

Constructor & Destructor Documentation

◆ BaseTOB()

TCS::BaseTOB::BaseTOB ( uint32_t roiWord,
const std::string & tobType )

Definition at line 11 of file BaseTOB.cxx.

11 :
14{}
const std::string & tobName() const
Definition BaseTOB.h:23
uint32_t roiWord() const
Definition BaseTOB.h:21
std::string m_tobName
Definition BaseTOB.h:37
uint32_t m_roiWord
Definition BaseTOB.h:36

◆ ~BaseTOB()

TCS::BaseTOB::~BaseTOB ( )
virtualdefault

Member Function Documentation

◆ instances()

size_t TCS::BaseTOB::instances ( )
inlinestatic

Definition at line 25 of file BaseTOB.h.

25{ return 0; }

◆ print()

◆ roiWord()

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

Definition at line 21 of file BaseTOB.h.

21{ return m_roiWord; }

◆ sizeCheck() [1/2]

int TCS::BaseTOB::sizeCheck ( int value,
unsigned int size ) const
protected

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

◆ sizeCheck() [2/2]

unsigned int TCS::BaseTOB::sizeCheck ( unsigned int value,
unsigned int size ) const
protected

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
protected

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
inline

Definition at line 23 of file BaseTOB.h.

23{ return m_tobName; }

◆ tobType()

Member Data Documentation

◆ m_roiWord

uint32_t TCS::BaseTOB::m_roiWord
private

Definition at line 36 of file BaseTOB.h.

◆ m_tobName

std::string TCS::BaseTOB::m_tobName
private

Definition at line 37 of file BaseTOB.h.


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