// -*- mode: c++ -*- // // $Id: BrChkvRdo.h,v 1.2 2002/05/14 18:51:36 cholm Exp $ // $Author: cholm $ // $Date: 2002/05/14 18:51:36 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrChkvRdo #define BRAT_BrChkvRdo #ifndef ROOT_TObject #include "TObject.h" #endif #ifndef ROOT_TClonesArray #include "TClonesArray.h" #endif #ifndef BRAT_BrDataObject #include "BrDataObject.h" #endif #ifndef BRAT_BrNestedHack #include "BrNestedHack.h" #endif class BrChkvRdo : public BrDataObject { public: // Nested class for single hits; class BrChkvHit : public TObject { public: BrChkvHit(){ }; BrChkvHit(Int_t, Float_t); virtual ~BrChkvHit() { }; virtual Int_t GetTubeNum() const { return fTubeNum; } virtual Double_t GetEnergy() const { return fEnergy; } virtual void SetTubeNum(Int_t i) { fTubeNum = i; } virtual void SetEnergy(Double_t energy) { fEnergy = energy;} virtual void Clear(Option_t* option=""); virtual void Print(Option_t* option="") const; //*MENU* private: Int_t fTubeNum; // TubeNumber Double_t fEnergy; // calibrated energy (ADC - ped)*gain ClassDefNested(BrChkvHit, 1) // a recontructed tof hit }; // end of nested class; private: TClonesArray fChkvHits; // Array of Chkv hits public: BrChkvRdo(); BrChkvRdo(const char* name, const char* title); virtual ~BrChkvRdo(); virtual void Clear(Option_t* option=""); virtual void Print(Option_t* option="") const; //*MENU* Int_t GetEntries() const { return fChkvHits.GetEntries(); } BrChkvHit* GetHit(Int_t idx) const { return (BrChkvHit*)fChkvHits.At(idx); } void AddHit(Int_t, Float_t); ClassDef(BrChkvRdo,1) // RDO structure for SMA/TMA }; #endif // // $Log: BrChkvRdo.h,v $ // Revision 1.2 2002/05/14 18:51:36 cholm // In the current ROOT CVS head (May 14, 2002) the 'ClassDef' macro has // changed a lot, meaning that it's no longer nessecary to redefine it // for nested classes. Hence, I introduced the header file // BrNestedHack, which only defined ClassDefNested to something else than // ClassDef if the version number of ROOT is less than 3.03/05, and then only // if it's not processed by rootcint. note, that this meant that preprocessing // had to be turned on for these (and other) header (rootcint option -p). // The data classs header files have been changed to include the new // header file BrNestedHack.h (which is ofcourse installed). // // Revision 1.1 2001/08/09 15:58:05 ekman // Added the classes BrChkvRdo and BrChkvRcoModule. // //