#ifndef HiTOFRAW_H #define HiTOFRAW_H #include "TObject.h" #define NCHANPERCELL 15 #define DEFVAL -1000000 class HiTofRaw : public TObject { protected: Float16_t ftime [NCHANPERCELL]; // 12 tdc time + 3 tot Float16_t fwidth [NCHANPERCELL]; // width Int_t fsector; // sector number Int_t fmodule; // module number Int_t fcell; // paddle number public: HiTofRaw(void) { clear(); } void setTime (const Int_t i, const Float_t v) { if(i >= 0 && i < NCHANPERCELL) ftime[i] = v; } void setWidth (const Int_t i, const Float_t v) { if(i >= 0 && i < NCHANPERCELL) fwidth[i] = v; } void setTimeAndWidth (const Int_t i, const Float_t t,const Float_t w) { if(i >= 0 && i < NCHANPERCELL) {ftime[i] = t; fwidth[i] = w; }} void setSector (const Int_t n) { fsector= n; } void setModule (const Int_t n) { fmodule= n; } void setCell (const Int_t n) { fcell = n; } void setAddress(const Int_t s, const Int_t m, const Int_t c) { fsector = s; fmodule = m; fcell = c; } Float_t getTime (Int_t i) const { return (i >= 0 && i < NCHANPERCELL)? ftime [i] : DEFVAL; } Float_t getWidth(Int_t i) const { return (i >= 0 && i < NCHANPERCELL)? fwidth [i] : DEFVAL; } void getTimeAndWidth(Int_t i, Float_t& t, Float_t& w) const { if(i >= 0 && i < NCHANPERCELL){ t = ftime[i]; w = fwidth[i];} else { t = DEFVAL; w = DEFVAL; }} Int_t getSector(void) const { return fsector; } Int_t getModule(void) const { return fmodule; } Int_t getCell (void) const { return fcell; } void getAddress(Int_t& s,Int_t& m, Int_t& c) { s = fsector; m = fmodule; c = fcell; } void clear(void) { for(Int_t i = 0; i