///////////////////////////////////////////////////////////////////////////
//
// The ACDTile class contains the information about a single ACD tile.
// This includes the PHA value, and above thresh information.
//
///////////////////////////////////////////////////////////////////////////
#include "ACDTile.h"
ClassImp(ACDTile)
///________________________________________________________________________
ACDTile::ACDTile() : m_tag(0){
// Default constructor
m_tileID = 0;
}
///________________________________________________________________________
ACDTile::ACDTile(TileID* id) : m_tag(0) {
// Create a ACDTile object with tileID of id
m_tileID = id;
}
//_________________________________________________________________________
ACDTile::~ACDTile(){
// Destructor
if (m_tileID)
delete m_tileID;
}
//_________________________________________________________________________
UChar_t ACDTile::getHit() {
// Returns 1 if tile above thresh, 0 otherwise
return ((m_tag >> ACD_V_HIT) & ACD_M_HIT);
}
//_________________________________________________________________________
UShort_t ACDTile::getPMT() {
// Returns the PMT value for this tile
return ((m_tag >> ACD_V_PMT) & ACD_M_PMT);
}
//_________________________________________________________________________
Bool_t ACDTile::setPMT(UShort_t pmtVal)
{
// Set the PMT value for this tile
// Valid PMT values are in the range of [0,2047]
if (pmtVal & ~ACD_M_PMT)
return kFALSE;
else {
m_tag &= ~(ACD_M_PMT << ACD_V_PMT);
m_tag |= pmtVal;
return kTRUE;
}
}
//_________________________________________________________________________
Bool_t ACDTile::setHit(UChar_t hitVal)
{
// Set the 'hit' status of this tile
// 1 == above thresh, 0 == below
if (hitVal & ~ACD_M_HIT)
return kFALSE;
else {
m_tag &= ~(ACD_M_HIT << ACD_V_HIT);
m_tag |= hitVal;
return kTRUE;
}
}
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.