#ifndef _TATOFdatFbus_H #define _TATOFdatFbus_H /*! \file \version $Id: TAGdatFbus.hxx,v 1.2 2003/06/22 10:39:40 mueller Exp $ \brief Declaration of TATOFdatFbus. */ /*------------------------------------------+---------------------------------*/ #include #include "TATOFdata.h" class TATOFdatFbusHit { public: TATOFdatFbusHit(Int_t i_addr=0, Int_t i_combo=0, Float_t f_cal=0.); virtual ~TATOFdatFbusHit(); Int_t Address() const; Int_t GeoAddr() const; Int_t ChaAddr() const; Int_t RawCombo() const; Bool_t RawRange() const; Int_t RawValue() const; Int_t RawScaled() const; Float_t CalValue() const; ClassDef(TATOFdatFbusHit,1) private: Short_t fiAddr; // address (geo,cha pair) Short_t fiRaw; // raw value (range, value pair) Float_t ffCal; // calibrated value }; //############################################################################## class TATOFdatFbus : public TATOFdata { public: TATOFdatFbus(); virtual ~TATOFdatFbus(); void AddHit(Int_t i_addr, Int_t i_combo, Float_t f_cal); void SetCounter(Int_t i_ndrop); Int_t NHit() const; const TATOFdatFbusHit& Hit(Int_t i_ind) const; Int_t NDrop() const; virtual void Clear(Option_t* opt=""); virtual void ToStream(ostream& os=cout, Option_t* option="") const; static Int_t PackAddress(Int_t i_g, Int_t i_c); static Int_t GeoFromAddress(Int_t i_addr); static Int_t ChaFromAddress(Int_t i_addr); static Int_t PackCombo(Bool_t b_ran, Int_t i_val); static Bool_t RangeFromCombo(Int_t i_combo); static Int_t ValueFromCombo(Int_t i_combo); ClassDef(TATOFdatFbus,1) private: Int_t fiNDrop; // number of droped raw items vector fHit; // FBus raw data hits }; #include "TATOFdatFbus.icc" #endif