--- PamelaLevel2/inc/PamLevel2.h 2006/06/16 16:43:55 1.1 +++ PamelaLevel2/inc/PamLevel2.h 2006/08/04 13:31:34 1.2 @@ -7,7 +7,7 @@ #ifndef pamlevel2_h #define pamlevel2_h -#include +#include #include #include @@ -16,9 +16,15 @@ #include #include #include +#include #include +#include #include +#include +#include +#include +#include #include using namespace std; @@ -53,51 +59,77 @@ * This allows to solve the tracker ambiguity (that is, to choose between track images) by using also information from other detectors. */ -class PamLevel2 : public CaloLevel2, public TrkLevel2, public ToFLevel2, public TrigLevel2, public S4Level2, public NDLevel2, public AcLevel2 { +class PamLevel2 : public CaloLevel2, public TrkLevel2, public ToFLevel2, public TrigLevel2, public S4Level2, public NDLevel2, public AcLevel2, public OrbitalInfo { private: - TrkLevel2* trk_obj; - CaloLevel2* calo_obj; - ToFLevel2* tof_obj; - TrigLevel2* trig_obj; - S4Level2* s4_obj; - NDLevel2* nd_obj; - AcLevel2* ac_obj; + TrkLevel2* trk_obj; + CaloLevel2* calo_obj; + ToFLevel2* tof_obj; + TrigLevel2* trig_obj; + S4Level2* s4_obj; + NDLevel2* nd_obj; + AcLevel2* ac_obj; + OrbitalInfo* orb_obj; + TRefArray* sorted_tracks; // TEMPORANEO ... lo mettero` menbro di TrkLevel2 + public: + Bool_t CAL; + Bool_t TRK; + Bool_t TRG; + Bool_t TOF; + Bool_t S4; + Bool_t ND; + Bool_t AC; + Bool_t ORB; + PamLevel2(); - - TrkLevel2* GetTrkLevel2() {return trk_obj;}; - CaloLevel2* GetCaloLevel2() {return calo_obj;}; - ToFLevel2* GetToFLevel2() {return tof_obj;}; - TrigLevel2* GetTrigLevel2() {return trig_obj;}; - S4Level2* GetS4Level2() {return s4_obj;}; - NDLevel2* GetNDLevel2() {return nd_obj;}; - AcLevel2* GetAcLevel2() {return ac_obj;}; - -// ================================= -// methods needed to ... well I am not shure they are needed -// ================================= - void* GetPointerToTrk() {return &trk_obj;}; - void* GetPointerToCalo() {return &calo_obj;}; - void* GetPointerToToF() {return &tof_obj;}; - void* GetPointerToTrig() {return &trig_obj;}; - void* GetPointerToS4() {return &s4_obj;}; - void* GetPointerToND() {return &nd_obj;}; - void* GetPointerToAc() {return &ac_obj;}; - - TTree* LoadPamTrees(TFile*); + ~PamLevel2(); + + void Clear(); + + TrkLevel2* GetTrkLevel2() { return trk_obj; }; + CaloLevel2* GetCaloLevel2() { return calo_obj; }; + ToFLevel2* GetToFLevel2() { return tof_obj; }; + TrigLevel2* GetTrigLevel2() { return trig_obj; }; + S4Level2* GetS4Level2() { return s4_obj; }; + NDLevel2* GetNDLevel2() { return nd_obj; }; + AcLevel2* GetAcLevel2() { return ac_obj; }; + OrbitalInfo* GetOrbitalInfo(){ return orb_obj; }; + +// ===================================== +// methods needed to read Level2 trees +// ===================================== + void SetWhichTrees(TString); + TList* GetListOfLevel2Files(TString, TString); + Bool_t CheckLevel2File(TString); + TTree* LoadPamTrees(TFile*); + TTree* LoadPamTrees(TFile*,TString); + TChain* LoadPamTrees(TList*,TString); +// ===================================== +// methods needed to set brach addresses +// ===================================== + void* GetPointerToTrk() {return &trk_obj;}; + void* GetPointerToCalo() {return &calo_obj;}; + void* GetPointerToToF() {return &tof_obj;}; + void* GetPointerToTrig() {return &trig_obj;}; + void* GetPointerToS4() {return &s4_obj;}; + void* GetPointerToND() {return &nd_obj;}; + void* GetPointerToAc() {return &ac_obj;}; + void* GetPointerToOrb() {return &orb_obj;}; // ================================= // methods to retrieve pamela tracks // ================================= PamTrack* GetStoredTrack(Int_t itrk); - TClonesArray* GetTracks(); - PamTrack* GetTrack(int); + void SortTracks(); //assign value to variable sorted_tracks + TRefArray* GetTracks(); //return sorted_tracks + PamTrack* GetTrack(int); PamTrack* GetTrackImage(int); + ClassDef(PamLevel2,1); };