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

#include <BaseTOB.h>

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

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

◆ ~BaseTOB()

TCS::BaseTOB::~BaseTOB ( )
virtualdefault

Member Function Documentation

◆ instances()

static size_t TCS::BaseTOB::instances ( )
inlinestatic

Definition at line 25 of file BaseTOB.h.

25 { return 0; }

◆ print()

virtual void TCS::BaseTOB::print ( std::ostream &  ) const
pure virtual

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

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

virtual inputTOBType_t TCS::BaseTOB::tobType ( ) const
pure virtual

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:
TCS::BaseTOB::tobName
const std::string & tobName() const
Definition: BaseTOB.h:23
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
athena.value
value
Definition: athena.py:124
TCS::BaseTOB::roiWord
uint32_t roiWord() const
Definition: BaseTOB.h:21
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
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::BaseTOB::m_tobName
std::string m_tobName
Definition: BaseTOB.h:37