Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
Decoder::THaCrateMap Class Reference

Definition at line 33 of file THaCrateMap.h.

Classes

class  CrateInfo_t
 
class  SlotInfo_t
 

Public Member Functions

bool crateUsed (UInt_t crate) const
 
Int_t getBank (UInt_t crate, UInt_t slot) const
 
const char * getConfigStr (UInt_t crate, UInt_t slot) const
 
UInt_t getHeader (UInt_t crate, UInt_t slot) const
 
UInt_t getMask (UInt_t crate, UInt_t slot) const
 
UInt_t getMaxSlot (UInt_t crate) const
 
UInt_t getMinSlot (UInt_t crate) const
 
Int_t getModel (UInt_t crate, UInt_t slot) const
 
const char * GetName () const
 
UInt_t getNchan (UInt_t crate, UInt_t slot) const
 
UInt_t getNdata (UInt_t crate, UInt_t slot) const
 
UInt_t getNslot (UInt_t crate) const
 
UInt_t getScalerCrate (UInt_t word) const
 
const char * getScalerLoc (UInt_t crate) const
 
UInt_t getTSROC () const
 
const std::vector< UInt_t > & GetUsedCrates () const
 
const std::vector< UInt_t > & GetUsedSlots (UInt_t crate) const
 
int init (const std::string &the_map)
 
int init (FILE *fi, const char *fname)
 
int init (ULong64_t time=0)
 
bool isAllBanks (UInt_t crate) const
 
bool isBankStructure (UInt_t crate) const
 
bool isCamac (UInt_t crate) const
 
bool isFastBus (UInt_t crate) const
 
bool isScalerCrate (UInt_t crate) const
 
bool isVme (UInt_t crate) const
 
void print (std::ostream &os=std::cout) const
 
void setUnused (UInt_t crate)
 
void setUnused (UInt_t crate, UInt_t slot)
 
bool slotClear (UInt_t crate, UInt_t slot) const
 
bool slotUsed (UInt_t crate, UInt_t slot) const
 
 THaCrateMap (const char *db="cratemap")
 
virtual ~THaCrateMap ()=default
 

Static Public Attributes

static const Int_t CM_ERR = -1
 
static const Int_t CM_OK = 1
 
static const UInt_t DEFAULT_TSROC = 21
 
static const UInt_t MAXCHAN = 8192
 
static const UInt_t MAXDATA = 65536
 

Private Types

enum  ECrateCode {
  kUnknown , kFastbus , kVME , kScaler ,
  kCamac
}
 

Private Member Functions

Int_t loadConfig (std::string &line, std::string &cfgstr)
 
Int_t ParseCrateInfo (const std::string &line, UInt_t &crate)
 
Int_t resetCrate (UInt_t crate)
 
Int_t SetBankInfo ()
 
Int_t setCrateType (UInt_t crate, const char *stype)
 
Int_t setModel (UInt_t crate, UInt_t slot, Int_t mod, UInt_t nchan=MAXCHAN, UInt_t ndata=MAXDATA)
 
Int_t SetModelSize (UInt_t crate, UInt_t slot, UInt_t model)
 
void setUsed (UInt_t crate, UInt_t slot)
 

Static Private Member Functions

static Int_t readFile (FILE *fi, std::string &text)
 

Private Attributes

std::vector< CrateInfo_tcrdat
 
std::string fDBfileName
 
TDatime fInitTime
 
UInt_t fTSROC
 
std::vector< UInt_tused_crates
 

#include <THaCrateMap.h>

Member Enumeration Documentation

◆ ECrateCode

Enumerator
kUnknown 
kFastbus 
kVME 
kScaler 
kCamac 

Definition at line 84 of file THaCrateMap.h.

Constructor & Destructor Documentation

◆ THaCrateMap()

Decoder::THaCrateMap::THaCrateMap ( const char *  db = "cratemap")
explicit

Definition at line 74 of file THaCrateMap.cxx.

◆ ~THaCrateMap()

virtual Decoder::THaCrateMap::~THaCrateMap ( )
virtualdefault

Member Function Documentation

◆ crateUsed()

bool Decoder::THaCrateMap::crateUsed ( UInt_t  crate) const
inline

Definition at line 184 of file THaCrateMap.h.

◆ getBank()

Int_t Decoder::THaCrateMap::getBank ( UInt_t  crate,
UInt_t  slot 
) const
inline

Definition at line 221 of file THaCrateMap.h.

◆ getConfigStr()

const char * Decoder::THaCrateMap::getConfigStr ( UInt_t  crate,
UInt_t  slot 
) const
inline

Definition at line 256 of file THaCrateMap.h.

◆ getHeader()

UInt_t Decoder::THaCrateMap::getHeader ( UInt_t  crate,
UInt_t  slot 
) const
inline

Definition at line 287 of file THaCrateMap.h.

◆ getMask()

UInt_t Decoder::THaCrateMap::getMask ( UInt_t  crate,
UInt_t  slot 
) const
inline

Definition at line 214 of file THaCrateMap.h.

◆ getMaxSlot()

UInt_t Decoder::THaCrateMap::getMaxSlot ( UInt_t  crate) const
inline

Definition at line 272 of file THaCrateMap.h.

◆ getMinSlot()

UInt_t Decoder::THaCrateMap::getMinSlot ( UInt_t  crate) const
inline

Definition at line 263 of file THaCrateMap.h.

◆ getModel()

Int_t Decoder::THaCrateMap::getModel ( UInt_t  crate,
UInt_t  slot 
) const
inline

Definition at line 207 of file THaCrateMap.h.

◆ GetName()

const char * Decoder::THaCrateMap::GetName ( ) const
inline

Definition at line 80 of file THaCrateMap.h.

◆ getNchan()

UInt_t Decoder::THaCrateMap::getNchan ( UInt_t  crate,
UInt_t  slot 
) const
inline

Definition at line 228 of file THaCrateMap.h.

◆ getNdata()

UInt_t Decoder::THaCrateMap::getNdata ( UInt_t  crate,
UInt_t  slot 
) const
inline

Definition at line 235 of file THaCrateMap.h.

◆ getNslot()

UInt_t Decoder::THaCrateMap::getNslot ( UInt_t  crate) const
inline

Definition at line 242 of file THaCrateMap.h.

◆ getScalerCrate()

UInt_t Decoder::THaCrateMap::getScalerCrate ( UInt_t  word) const

Definition at line 88 of file THaCrateMap.cxx.

◆ getScalerLoc()

const char * Decoder::THaCrateMap::getScalerLoc ( UInt_t  crate) const
inline

Definition at line 249 of file THaCrateMap.h.

◆ getTSROC()

UInt_t Decoder::THaCrateMap::getTSROC ( ) const
inline

Definition at line 281 of file THaCrateMap.h.

◆ GetUsedCrates()

const std::vector< UInt_t > & Decoder::THaCrateMap::GetUsedCrates ( ) const
inline

Definition at line 294 of file THaCrateMap.h.

◆ GetUsedSlots()

const std::vector< UInt_t > & Decoder::THaCrateMap::GetUsedSlots ( UInt_t  crate) const
inline

Definition at line 300 of file THaCrateMap.h.

◆ init() [1/3]

int Decoder::THaCrateMap::init ( const std::string &  the_map)

Definition at line 473 of file THaCrateMap.cxx.

◆ init() [2/3]

int Decoder::THaCrateMap::init ( FILE *  fi,
const char *  fname 
)

Definition at line 257 of file THaCrateMap.cxx.

◆ init() [3/3]

int Decoder::THaCrateMap::init ( ULong64_t  time = 0)

Definition at line 285 of file THaCrateMap.cxx.

◆ isAllBanks()

bool Decoder::THaCrateMap::isAllBanks ( UInt_t  crate) const
inline

Definition at line 177 of file THaCrateMap.h.

◆ isBankStructure()

bool Decoder::THaCrateMap::isBankStructure ( UInt_t  crate) const
inline

Definition at line 170 of file THaCrateMap.h.

◆ isCamac()

bool Decoder::THaCrateMap::isCamac ( UInt_t  crate) const
inline

Definition at line 156 of file THaCrateMap.h.

◆ isFastBus()

bool Decoder::THaCrateMap::isFastBus ( UInt_t  crate) const
inline

Definition at line 141 of file THaCrateMap.h.

◆ isScalerCrate()

bool Decoder::THaCrateMap::isScalerCrate ( UInt_t  crate) const
inline

Definition at line 163 of file THaCrateMap.h.

◆ isVme()

bool Decoder::THaCrateMap::isVme ( UInt_t  crate) const
inline

Definition at line 148 of file THaCrateMap.h.

◆ loadConfig()

Int_t Decoder::THaCrateMap::loadConfig ( std::string &  line,
std::string &  cfgstr 
)
private

Definition at line 324 of file THaCrateMap.cxx.

◆ ParseCrateInfo()

Int_t Decoder::THaCrateMap::ParseCrateInfo ( const std::string &  line,
UInt_t crate 
)
private

Definition at line 368 of file THaCrateMap.cxx.

◆ print()

void Decoder::THaCrateMap::print ( std::ostream &  os = std::cout) const

Definition at line 297 of file THaCrateMap.cxx.

◆ readFile()

Int_t Decoder::THaCrateMap::readFile ( FILE *  fi,
std::string &  text 
)
staticprivate

Definition at line 233 of file THaCrateMap.cxx.

◆ resetCrate()

Int_t Decoder::THaCrateMap::resetCrate ( UInt_t  crate)
private

Definition at line 105 of file THaCrateMap.cxx.

◆ SetBankInfo()

Int_t Decoder::THaCrateMap::SetBankInfo ( )
private

Definition at line 458 of file THaCrateMap.cxx.

◆ setCrateType()

int Decoder::THaCrateMap::setCrateType ( UInt_t  crate,
const char *  stype 
)
private

Definition at line 116 of file THaCrateMap.cxx.

◆ setModel()

int Decoder::THaCrateMap::setModel ( UInt_t  crate,
UInt_t  slot,
Int_t  mod,
UInt_t  nchan = MAXCHAN,
UInt_t  ndata = MAXDATA 
)
private

Definition at line 141 of file THaCrateMap.cxx.

◆ SetModelSize()

int Decoder::THaCrateMap::SetModelSize ( UInt_t  crate,
UInt_t  slot,
UInt_t  model 
)
private

Definition at line 158 of file THaCrateMap.cxx.

◆ setUnused() [1/2]

void Decoder::THaCrateMap::setUnused ( UInt_t  crate)

Definition at line 210 of file THaCrateMap.cxx.

◆ setUnused() [2/2]

void Decoder::THaCrateMap::setUnused ( UInt_t  crate,
UInt_t  slot 
)

Definition at line 219 of file THaCrateMap.cxx.

◆ setUsed()

void Decoder::THaCrateMap::setUsed ( UInt_t  crate,
UInt_t  slot 
)
private

Definition at line 196 of file THaCrateMap.cxx.

◆ slotClear()

bool Decoder::THaCrateMap::slotClear ( UInt_t  crate,
UInt_t  slot 
) const
inline

Definition at line 200 of file THaCrateMap.h.

◆ slotUsed()

bool Decoder::THaCrateMap::slotUsed ( UInt_t  crate,
UInt_t  slot 
) const
inline

Definition at line 191 of file THaCrateMap.h.

Member Data Documentation

◆ CM_ERR

const Int_t Decoder::THaCrateMap::CM_ERR = -1
static

Definition at line 76 of file THaCrateMap.h.

◆ CM_OK

const Int_t Decoder::THaCrateMap::CM_OK = 1
static

Definition at line 75 of file THaCrateMap.h.

◆ crdat

std::vector<CrateInfo_t> Decoder::THaCrateMap::crdat
private

Definition at line 119 of file THaCrateMap.h.

◆ DEFAULT_TSROC

const UInt_t Decoder::THaCrateMap::DEFAULT_TSROC = 21
static

Definition at line 78 of file THaCrateMap.h.

◆ fDBfileName

std::string Decoder::THaCrateMap::fDBfileName
private

Definition at line 86 of file THaCrateMap.h.

◆ fInitTime

TDatime Decoder::THaCrateMap::fInitTime
private

Definition at line 87 of file THaCrateMap.h.

◆ fTSROC

UInt_t Decoder::THaCrateMap::fTSROC
private

Definition at line 88 of file THaCrateMap.h.

◆ MAXCHAN

const UInt_t Decoder::THaCrateMap::MAXCHAN = 8192
static

Definition at line 35 of file THaCrateMap.h.

◆ MAXDATA

const UInt_t Decoder::THaCrateMap::MAXDATA = 65536
static

Definition at line 36 of file THaCrateMap.h.

◆ used_crates

std::vector<UInt_t> Decoder::THaCrateMap::used_crates
private

Definition at line 121 of file THaCrateMap.h.

Collaboration diagram for Decoder::THaCrateMap:

The documentation for this class was generated from the following files: