ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
InDet::BeamSpotStatusCode Class Reference

Class to hold the definition and accessor methods for the beamspot status-word. More...

#include <BeamSpotStatusCode.h>

Collaboration diagram for InDet::BeamSpotStatusCode:

Public Member Functions

 BeamSpotStatusCode ()
 
 ~BeamSpotStatusCode ()
 
bool isOnline () const
 
void setOnlineStatus (bool isOnline)
 
int fitStatus () const
 
void setFitStatus (int status)
 
int algType () const
 
void setAlgType (int type)
 
bool fitWidth () const
 
void setFitWidth (bool fitWidth)
 
void clearWord ()
 
void setWord (int word)
 
int getWord () const
 

Static Public Member Functions

static bool isOnline (int word)
 
static void setOnlineStatus (bool isOnline, int &word)
 
static int fitStatus (int word)
 
static void setFitStatus (int status, int &word)
 
static int algType (int word)
 
static void setAlgType (int type, int &word)
 
static bool fitWidth (int word)
 
static void setFitWidth (bool fitWidth, int &word)
 

Private Member Functions

int getItem (int bit, int length) const
 

Static Private Member Functions

static int getItem (int word, int bit, int length)
 
static int formBit (int bit, int word)
 
static void setWordBit (int flag, int &word)
 

Private Attributes

int m_word
 

Static Private Attributes

static const int m_onlineBit = 2
 
static const int m_onlineLength = 1
 
static const int m_fitStatusBit = 0
 
static const int m_fitStatusLength = 2
 
static const int m_algorithmTypeBit = 4
 
static const int m_algorithmTypeLength = 4
 
static const int m_widthBit = 3
 
static const int m_widthLength = 1
 

Detailed Description

Class to hold the definition and accessor methods for the beamspot status-word.

As well as position etc., meta-data is also required, i.e. beamspot fit result status, beamspot algorithm type, online/offline mode. This class defines the meaning of the word and supplies the necessary methods to access/set the information.

Definition at line 19 of file BeamSpotStatusCode.h.

Constructor & Destructor Documentation

◆ BeamSpotStatusCode()

InDet::BeamSpotStatusCode::BeamSpotStatusCode ( )
inline

Definition at line 21 of file BeamSpotStatusCode.h.

21  :
22  m_word(0)
23  {}

◆ ~BeamSpotStatusCode()

InDet::BeamSpotStatusCode::~BeamSpotStatusCode ( )
inline

Definition at line 24 of file BeamSpotStatusCode.h.

24 {}

Member Function Documentation

◆ algType() [1/2]

int InDet::BeamSpotStatusCode::algType ( ) const
inline

Definition at line 43 of file BeamSpotStatusCode.h.

43 { return algType(m_word);}

◆ algType() [2/2]

static int InDet::BeamSpotStatusCode::algType ( int  word)
inlinestatic

Definition at line 44 of file BeamSpotStatusCode.h.

◆ clearWord()

void InDet::BeamSpotStatusCode::clearWord ( )
inline

Definition at line 57 of file BeamSpotStatusCode.h.

57 { m_word = 0;}

◆ fitStatus() [1/2]

int InDet::BeamSpotStatusCode::fitStatus ( ) const
inline

Definition at line 36 of file BeamSpotStatusCode.h.

36 {return fitStatus(m_word);}

◆ fitStatus() [2/2]

static int InDet::BeamSpotStatusCode::fitStatus ( int  word)
inlinestatic

Definition at line 37 of file BeamSpotStatusCode.h.

37 { return getItem(word, m_fitStatusBit, m_fitStatusLength);}

◆ fitWidth() [1/2]

bool InDet::BeamSpotStatusCode::fitWidth ( ) const
inline

Definition at line 50 of file BeamSpotStatusCode.h.

50 {return fitWidth(m_word);}

◆ fitWidth() [2/2]

static bool InDet::BeamSpotStatusCode::fitWidth ( int  word)
inlinestatic

Definition at line 51 of file BeamSpotStatusCode.h.

51 { return getItem(word, m_widthBit, m_widthLength);}

◆ formBit()

static int InDet::BeamSpotStatusCode::formBit ( int  bit,
int  word 
)
inlinestaticprivate

Definition at line 71 of file BeamSpotStatusCode.h.

71  {
72  return (word << bit);
73  }

◆ getItem() [1/2]

int InDet::BeamSpotStatusCode::getItem ( int  bit,
int  length 
) const
inlineprivate

Definition at line 62 of file BeamSpotStatusCode.h.

62 {return getItem(m_word, bit,length);}

◆ getItem() [2/2]

static int InDet::BeamSpotStatusCode::getItem ( int  word,
int  bit,
int  length 
)
inlinestaticprivate

Definition at line 63 of file BeamSpotStatusCode.h.

63  {
64  int temp = 0;
65  for (int i =0; i < length; ++i) {
66  temp = (temp << 1) + 1;
67  }
68  return (word >> bit) & temp;
69  }

◆ getWord()

int InDet::BeamSpotStatusCode::getWord ( ) const
inline

Definition at line 59 of file BeamSpotStatusCode.h.

59 {return m_word;}

◆ isOnline() [1/2]

bool InDet::BeamSpotStatusCode::isOnline ( ) const
inline

Definition at line 26 of file BeamSpotStatusCode.h.

26 {return isOnline(m_word);}

◆ isOnline() [2/2]

static bool InDet::BeamSpotStatusCode::isOnline ( int  word)
inlinestatic

Definition at line 27 of file BeamSpotStatusCode.h.

27  {
28  int i = getItem(word, m_onlineBit, m_onlineLength);
29  return ( i > 0 ? true : false );
30  }

◆ setAlgType() [1/2]

void InDet::BeamSpotStatusCode::setAlgType ( int  type)
inline

Definition at line 45 of file BeamSpotStatusCode.h.

◆ setAlgType() [2/2]

static void InDet::BeamSpotStatusCode::setAlgType ( int  type,
int &  word 
)
inlinestatic

Definition at line 46 of file BeamSpotStatusCode.h.

46  {

◆ setFitStatus() [1/2]

void InDet::BeamSpotStatusCode::setFitStatus ( int  status)
inline

Definition at line 38 of file BeamSpotStatusCode.h.

◆ setFitStatus() [2/2]

static void InDet::BeamSpotStatusCode::setFitStatus ( int  status,
int &  word 
)
inlinestatic

Definition at line 39 of file BeamSpotStatusCode.h.

39  {

◆ setFitWidth() [1/2]

void InDet::BeamSpotStatusCode::setFitWidth ( bool  fitWidth)
inline

Definition at line 52 of file BeamSpotStatusCode.h.

◆ setFitWidth() [2/2]

static void InDet::BeamSpotStatusCode::setFitWidth ( bool  fitWidth,
int &  word 
)
inlinestatic

Definition at line 53 of file BeamSpotStatusCode.h.

53  {
54  setWordBit( formBit( m_widthBit, (fitWidth?1:0)),word); }

◆ setOnlineStatus() [1/2]

void InDet::BeamSpotStatusCode::setOnlineStatus ( bool  isOnline)
inline

Definition at line 31 of file BeamSpotStatusCode.h.

◆ setOnlineStatus() [2/2]

static void InDet::BeamSpotStatusCode::setOnlineStatus ( bool  isOnline,
int &  word 
)
inlinestatic

Definition at line 32 of file BeamSpotStatusCode.h.

32  {
33  setWordBit( formBit( m_onlineBit, (isOnline?1:0)), word);}

◆ setWord()

void InDet::BeamSpotStatusCode::setWord ( int  word)
inline

Definition at line 58 of file BeamSpotStatusCode.h.

58 { m_word = word;}

◆ setWordBit()

static void InDet::BeamSpotStatusCode::setWordBit ( int  flag,
int &  word 
)
inlinestaticprivate

Definition at line 74 of file BeamSpotStatusCode.h.

74  {
75  word = (word | flag);
76  }

Member Data Documentation

◆ m_algorithmTypeBit

const int BeamSpotStatusCode::m_algorithmTypeBit = 4
staticprivate

Definition at line 80 of file BeamSpotStatusCode.h.

◆ m_algorithmTypeLength

const int BeamSpotStatusCode::m_algorithmTypeLength = 4
staticprivate

Definition at line 80 of file BeamSpotStatusCode.h.

◆ m_fitStatusBit

const int BeamSpotStatusCode::m_fitStatusBit = 0
staticprivate

Definition at line 79 of file BeamSpotStatusCode.h.

◆ m_fitStatusLength

const int BeamSpotStatusCode::m_fitStatusLength = 2
staticprivate

Definition at line 79 of file BeamSpotStatusCode.h.

◆ m_onlineBit

const int BeamSpotStatusCode::m_onlineBit = 2
staticprivate

Definition at line 78 of file BeamSpotStatusCode.h.

◆ m_onlineLength

const int BeamSpotStatusCode::m_onlineLength = 1
staticprivate

Definition at line 78 of file BeamSpotStatusCode.h.

◆ m_widthBit

const int BeamSpotStatusCode::m_widthBit = 3
staticprivate

Definition at line 81 of file BeamSpotStatusCode.h.

◆ m_widthLength

const int BeamSpotStatusCode::m_widthLength = 1
staticprivate

Definition at line 81 of file BeamSpotStatusCode.h.

◆ m_word

int InDet::BeamSpotStatusCode::m_word
private

Definition at line 83 of file BeamSpotStatusCode.h.


The documentation for this class was generated from the following files:
InDet::BeamSpotStatusCode::getItem
int getItem(int bit, int length) const
Definition: BeamSpotStatusCode.h:62
InDet::BeamSpotStatusCode::m_onlineBit
static const int m_onlineBit
Definition: BeamSpotStatusCode.h:78
InDet::BeamSpotStatusCode::formBit
static int formBit(int bit, int word)
Definition: BeamSpotStatusCode.h:71
InDet::BeamSpotStatusCode::setAlgType
void setAlgType(int type)
Definition: BeamSpotStatusCode.h:45
InDet::BeamSpotStatusCode::m_algorithmTypeBit
static const int m_algorithmTypeBit
Definition: BeamSpotStatusCode.h:80
InDet::BeamSpotStatusCode::setWordBit
static void setWordBit(int flag, int &word)
Definition: BeamSpotStatusCode.h:74
InDet::BeamSpotStatusCode::m_widthLength
static const int m_widthLength
Definition: BeamSpotStatusCode.h:81
InDet::BeamSpotStatusCode::m_fitStatusLength
static const int m_fitStatusLength
Definition: BeamSpotStatusCode.h:79
InDet::BeamSpotStatusCode::isOnline
bool isOnline() const
Definition: BeamSpotStatusCode.h:26
InDet::BeamSpotStatusCode::fitStatus
int fitStatus() const
Definition: BeamSpotStatusCode.h:36
InDet::BeamSpotStatusCode::m_word
int m_word
Definition: BeamSpotStatusCode.h:83
InDet::BeamSpotStatusCode::m_algorithmTypeLength
static const int m_algorithmTypeLength
Definition: BeamSpotStatusCode.h:80
InDet::BeamSpotStatusCode::setFitStatus
void setFitStatus(int status)
Definition: BeamSpotStatusCode.h:38
lumiFormat.i
int i
Definition: lumiFormat.py:85
master.flag
bool flag
Definition: master.py:29
InDet::BeamSpotStatusCode::fitWidth
bool fitWidth() const
Definition: BeamSpotStatusCode.h:50
InDet::BeamSpotStatusCode::m_widthBit
static const int m_widthBit
Definition: BeamSpotStatusCode.h:81
InDet::BeamSpotStatusCode::setFitWidth
void setFitWidth(bool fitWidth)
Definition: BeamSpotStatusCode.h:52
InDet::BeamSpotStatusCode::m_fitStatusBit
static const int m_fitStatusBit
Definition: BeamSpotStatusCode.h:79
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
InDet::BeamSpotStatusCode::setOnlineStatus
void setOnlineStatus(bool isOnline)
Definition: BeamSpotStatusCode.h:31
merge.status
status
Definition: merge.py:17
InDet::BeamSpotStatusCode::algType
int algType() const
Definition: BeamSpotStatusCode.h:43
InDet::BeamSpotStatusCode::m_onlineLength
static const int m_onlineLength
Definition: BeamSpotStatusCode.h:78
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26