Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

AcdId Class Reference

encapsulate the id for an ACD tile. More...

#include <AcdId.h>

Inheritance diagram for AcdId:

TObject List of all members.

Public Methods

 AcdId ()
 AcdId (const AcdId& id)
 AcdId (short l, short f, short r, short c)
 AcdId (UInt_t i, short base=10, short used=1)
virtual ~AcdId ()
UInt_t getId (short base = 10) const
 retrieve the id, either in base 2, or in base 10, denoting the matrix number. More...

void setId (UInt_t newVal, short used = 1, short base=10)
 set the id, specifying whether this is in base 10 or base 2. More...

bool isTop () const
 is this a top tile? More...

bool isSide () const
 is this a side tile? More...

short getLayer () const
 which layer is this tile in (1st(0 - closer to center of GLAST) or 2nd (1)). More...

short getFace () const
 which face number? More...

short getRow () const
 which row number? More...

short getColumn () const
 which column? More...

bool wasConnected () const
 was this PMT actually connected to a tile? More...

void setConnected (Char_t c)
 set the bit to denote whether this PMT was connected 0 == not connected,1 is connected. More...

UShort_t getReadoutIndex () const
 retrieve the readout index. More...

void setReadoutIndex (UShort_t i)
 set the readout index for this tile. More...

void base10ToAcdId (UInt_t val, short &lay, short &face, short &row, short &col)
 convert a value in base 10, to the appropriate layer, face, row, column. More...


Static Public Attributes

UShort_t badId

Private Types

enum  {
  _layermask = 0x1800, _facemask = 0x0700, _rowmask = 0x00F0, _colmask = 0x000F,
  layerShift = 11
}

Private Methods

void setLayer ( unsigned int val )
 set layer. More...

void setFace (unsigned int f)
 set the face number. More...

void setRow ( unsigned int r )
 set the row. More...

void setColumn ( unsigned int c )
 set the column. More...

short int word ( short i, const UInt_t& v ) const
void set_word ( short i, UInt_t& v, const UInt_t& s )

Private Attributes

UInt_t m_id
 Proper Ritz index number for this tile. More...

Char_t m_used
 Denotes whether the PMT was truly connected to a tile. More...

UShort_t m_readoutIndex
 Readout order - starting from 0. More...


Detailed Description

encapsulate the id for an ACD tile.

ACD tile numbering Layer 0 - 3, where 0 corresponds to the inner layer Face 0 - 4 Face 0 == top (hat) Face 1 == -X side Face 2 == -Y side Face 3 == +X side Face 4 == +Y side Row 0 - 9 On Face 0 (top) rows are numbering along +x (or +y) axis On the sides, the rows are numbered from the front of the instrument (closest to the top)

Column 0 - 9 On the sides, columns are numbered along +x (or +y) axis

One could imagine that an ACD id could be represented by 13 bits.

__ __ __ __ __ __ __ __ __ __ __ __ __ LAYER FACE ROW COLUMN where the layer bits are the most significant bits

Some routines in this class have a default parameter denoted as "base" This refers to those instances where an input parameter could be in base 10 or base 2. In all cases, the default is base 10. If a user desires to use base 2, the parameter called "base" should be supplied and set equal to 2.

Jun 2001 Heather Kelly - renamed from TileID to AcdId Apr 2000 Daniel Flath - Minor changes to function names, etc. Jan 1999 Daniel Flath - ROOT HTML Documentation added Dec 1999 Daniel Flath - Rewrite for GLAST Version 1.1 25 Oct 1999 R.Dubois Clone from LCD towerID

Definition at line 44 of file AcdId.h.


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
_layermask  
_facemask  
_rowmask  
_colmask  
layerShift  

Definition at line 63 of file AcdId.h.


Constructor & Destructor Documentation

AcdId::AcdId ( )
 

AcdId::AcdId ( const AcdId & id )
 

Definition at line 23 of file AcdId.cxx.

AcdId::AcdId ( short l,
short f,
short r,
short c )
 

Definition at line 27 of file AcdId.cxx.

AcdId::AcdId ( UInt_t i,
short base = 10,
short used = 1 )
 

Definition at line 36 of file AcdId.cxx.

AcdId::~AcdId ( ) [inline, virtual]
 

Definition at line 76 of file AcdId.h.


Member Function Documentation

void AcdId::base10ToAcdId ( UInt_t val,
short & lay,
short & face,
short & row,
short & col )
 

convert a value in base 10, to the appropriate layer, face, row, column.

Definition at line 142 of file AcdId.cxx.

Referenced by setId().

short AcdId::getColumn ( ) const
 

which column?

Definition at line 99 of file AcdId.cxx.

Referenced by getId().

short AcdId::getFace ( ) const
 

which face number?

Definition at line 89 of file AcdId.cxx.

Referenced by getId(), isSide(), and isTop().

UInt_t AcdId::getId ( short base = 10 ) const
 

retrieve the id, either in base 2, or in base 10, denoting the matrix number.

Definition at line 41 of file AcdId.cxx.

Referenced by AcdTile::Compare(), and DigiEvent::getAcdTile().

short AcdId::getLayer ( ) const
 

which layer is this tile in (1st(0 - closer to center of GLAST) or 2nd (1)).

Definition at line 84 of file AcdId.cxx.

Referenced by getId().

UShort_t AcdId::getReadoutIndex ( ) const [inline]
 

retrieve the readout index.

Definition at line 99 of file AcdId.h.

short AcdId::getRow ( ) const
 

which row number?

Definition at line 94 of file AcdId.cxx.

Referenced by getId().

bool AcdId::isSide ( ) const
 

is this a side tile?

Definition at line 79 of file AcdId.cxx.

bool AcdId::isTop ( ) const
 

is this a top tile?

Definition at line 74 of file AcdId.cxx.

void AcdId::setColumn ( unsigned int c ) [private]
 

set the column.

Definition at line 127 of file AcdId.cxx.

Referenced by AcdId(), and setId().

void AcdId::setConnected ( Char_t c )
 

set the bit to denote whether this PMT was connected 0 == not connected,1 is connected.

Definition at line 138 of file AcdId.cxx.

void AcdId::setFace ( unsigned int f ) [private]
 

set the face number.

Definition at line 114 of file AcdId.cxx.

Referenced by AcdId(), and setId().

void AcdId::setId ( UInt_t newVal,
short used = 1,
short base = 10 )
 

set the id, specifying whether this is in base 10 or base 2.

Definition at line 48 of file AcdId.cxx.

Referenced by AcdId(), and AcdTile::AcdTile().

void AcdId::setLayer ( unsigned int val ) [private]
 

set layer.

Definition at line 104 of file AcdId.cxx.

Referenced by AcdId(), and setId().

void AcdId::setReadoutIndex ( UShort_t i ) [inline]
 

set the readout index for this tile.

Definition at line 101 of file AcdId.h.

void AcdId::setRow ( unsigned int r ) [private]
 

set the row.

Definition at line 121 of file AcdId.cxx.

Referenced by AcdId(), and setId().

void AcdId::set_word ( short i,
UInt_t & v,
const UInt_t & s ) [inline, private]
 

Definition at line 115 of file AcdId.h.

Referenced by setColumn(), setFace(), and setRow().

bool AcdId::wasConnected ( ) const
 

was this PMT actually connected to a tile?

Definition at line 133 of file AcdId.cxx.

short int AcdId::word ( short i,
const UInt_t & v ) const [inline, private]
 

Definition at line 108 of file AcdId.h.

Referenced by getColumn(), getFace(), and getRow().


Member Data Documentation

UShort_t AcdId::badId [static]
 

Definition at line 105 of file AcdId.h.

UInt_t AcdId::m_id [private]
 

Proper Ritz index number for this tile.

Definition at line 48 of file AcdId.h.

UShort_t AcdId::m_readoutIndex [private]
 

Readout order - starting from 0.

Definition at line 52 of file AcdId.h.

Char_t AcdId::m_used [private]
 

Denotes whether the PMT was truly connected to a tile.

Definition at line 50 of file AcdId.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 14 20:41:47 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000