ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LVL1::RoIDecoder Class Referenceabstract

A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word. More...

#include <RoIDecoder.h>

Inheritance diagram for LVL1::RoIDecoder:
Collaboration diagram for LVL1::RoIDecoder:

Public Member Functions

 RoIDecoder ()
 
virtual ~RoIDecoder ()
 
virtual CoordinateRange coordinate (const unsigned int word) const =0
 

Protected Member Functions

unsigned int extractBits (unsigned int word, const unsigned int start, const unsigned int length) const
 returns the value of bits in word between bit "start" and bit "start" + "length" More...
 

Protected Attributes

bool m_DEBUG
 

Detailed Description

A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.

Author
E.Moyse
Todo:
this should probably be a static class.

Definition at line 46 of file RoIDecoder.h.

Constructor & Destructor Documentation

◆ RoIDecoder()

LVL1::RoIDecoder::RoIDecoder ( )

Definition at line 24 of file RoIDecoder.cxx.

24  :
25  m_DEBUG( false ) {
26 
27 }

◆ ~RoIDecoder()

LVL1::RoIDecoder::~RoIDecoder ( )
virtual

Definition at line 29 of file RoIDecoder.cxx.

29  {
30 
31 }

Member Function Documentation

◆ coordinate()

virtual CoordinateRange LVL1::RoIDecoder::coordinate ( const unsigned int  word) const
pure virtual

◆ extractBits()

unsigned int LVL1::RoIDecoder::extractBits ( unsigned int  word,
const unsigned int  start,
const unsigned int  length 
) const
protected

returns the value of bits in word between bit "start" and bit "start" + "length"

Definition at line 34 of file RoIDecoder.cxx.

35  {
36 
37  // this works as follows. Imagine start=3, bits=4 and word=11011100
38  // so this routine should return 0111
39  // now:
40  // word>>(first-1) = 110111
41  // (1<<length) = 010000
42  // (1<<length)-1 = 001111
43  word = ( word >> ( start - 1 ) );
44 
45  unsigned int bitmask = ( 1 << length ) - 1;
46  // and finally:
47  // 110111&001111 = 0111
48  return ( word & bitmask ); // return only bits in bitmask
49 }

Member Data Documentation

◆ m_DEBUG

bool LVL1::RoIDecoder::m_DEBUG
protected

Definition at line 63 of file RoIDecoder.h.


The documentation for this class was generated from the following files:
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
LVL1::RoIDecoder::m_DEBUG
bool m_DEBUG
Definition: RoIDecoder.h:63
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26