X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALGetter.h;h=8144826e221ff5f6aa621e5bcb6dbae8cc0b44af;hb=5c3fe0ae03ed3307c631de94348ccf5e4462721c;hp=6efde571350b2b0f37cdac7a1715399629b36278;hpb=39200c71b250a8fd59c1489d3d8252d8569c903f;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALGetter.h b/EMCAL/AliEMCALGetter.h index 6efde571350..8144826e221 100644 --- a/EMCAL/AliEMCALGetter.h +++ b/EMCAL/AliEMCALGetter.h @@ -18,13 +18,9 @@ // --- ROOT system --- #include "TObject.h" -#include "TClonesArray.h" -// #include "TFolder.h" -// #include "TTree.h" -// #include "TFile.h" -// class TString ; - class TParticle ; -// class TTask ; +#include "TClonesArray.h" +class TParticle ; +class TTree ; // --- Standard library --- @@ -32,24 +28,20 @@ #include "AliConfig.h" // #include "AliRun.h" -class AliEMCAL ; #include "AliEMCALHit.h" -// #include "AliEMCALDigit.h" -// #include "AliEMCALRecPoint.h" -// #include "AliEMCALRecPoint.h" -// #include "AliEMCALTrackSegment.h" -// #include "AliEMCALRecParticle.h" -class AliEMCALGeometry ; +#include "AliEMCALRecParticle.h" #include "AliEMCALDigitizer.h" #include "AliEMCALSDigitizer.h" -// class AliEMCALClusterizer ; -// class AliEMCALTrackSegmentMaker ; -// class AliEMCALPID ; -// //class AliEMCALCalibrationDB ; -// class AliEMCALConTableDB ; +#include "AliEMCALLoader.h" +class AliEMCAL ; +class AliEMCALGeometry ; +class AliEMCALClusterizer ; +class AliEMCALRecPoint ; +class AliEMCALTrackSegmentMaker ; +class AliEMCALTrackSegment ; +class AliEMCALPID ; class AliEMCALBeamTestEvent ; -#include "AliEMCALLoader.h" class AliEMCALGetter : public TObject { @@ -78,8 +70,8 @@ class AliEMCALGetter : public TObject { static void Print() ; // //=========== General information about run ============== - Bool_t IsLoaded(const TString tree) const { return fLoadingStatus.Contains(tree) ; } - void SetLoaded(const TString tree) { fLoadingStatus += tree ; } + Bool_t IsLoaded(TString tree) const { return fLoadingStatus.Contains(tree) ; } + void SetLoaded(TString tree) { fLoadingStatus += tree ; } Int_t MaxEvent() const ; Int_t EventNumber() const ; @@ -92,8 +84,8 @@ class AliEMCALGetter : public TObject { AliEMCALGeometry * EMCALGeometry() const ; // //========== Methods to read something from file ========== - void Event(const Int_t event, const char * opt = "HSDRP") ; - void Track(const Int_t itrack) ; + void Event(Int_t event, const char * opt = "HSDRP") ; + void Track(Int_t itrack) ; // //-----------------now getter's data-------------------------------------- // // AliEMCALCalibrationDB * CalibrationDB(){return fcdb; } @@ -104,86 +96,82 @@ class AliEMCALGetter : public TObject { TClonesArray * Primaries(void) ; TParticle * Primary(Int_t index) const ; Int_t NPrimaries()const { return fNPrimaries; } - TParticle * Secondary(const TParticle * p, const Int_t index=1) const ; + TParticle * Secondary(const TParticle * p, Int_t index=1) const ; // //=========== Hits ================= // TTree * TreeH(TString filename="") ; - TClonesArray * Hits(void) ; - AliEMCALHit * Hit(const Int_t index) { return dynamic_cast(Hits()->At(index) );} + TClonesArray * Hits(void) const ; + AliEMCALHit * Hit(Int_t index) const { return dynamic_cast(Hits()->At(index) );} TTree * TreeH() const ; //=========== SDigits ============== - TClonesArray * SDigits() ; - AliEMCALDigit * SDigit(const Int_t index) { return static_cast(SDigits()->At(index)) ;} + TClonesArray * SDigits() const ; + AliEMCALDigit * SDigit(Int_t index) const { return static_cast(SDigits()->At(index)) ;} TTree * TreeS() const ; AliEMCALSDigitizer * SDigitizer() ; - TString GetSDigitsFileName() { return EmcalLoader()->GetSDigitsFileName() ; } - Int_t LoadSDigits(Option_t* opt="") { return EmcalLoader()->LoadSDigits(opt) ; } - Int_t LoadSDigitizer(Option_t* opt=""){ return EmcalLoader()->LoadSDigitizer(opt) ; } - Int_t WriteSDigits(Option_t* opt="") { return EmcalLoader()->WriteSDigits(opt) ; } - Int_t WriteSDigitizer(Option_t* opt=""){ + TString GetSDigitsFileName() const { return EmcalLoader()->GetSDigitsFileName() ; } + Int_t LoadSDigits(Option_t* opt="") const { return EmcalLoader()->LoadSDigits(opt) ; } + Int_t LoadSDigitizer(Option_t* opt="") const { return EmcalLoader()->LoadSDigitizer(opt) ; } + Int_t WriteSDigits(Option_t* opt="") const { return EmcalLoader()->WriteSDigits(opt) ; } + Int_t WriteSDigitizer(Option_t* opt="") const { return EmcalLoader()->WriteSDigitizer(opt) ; } //========== Digits ================ - TClonesArray * Digits() ; - AliEMCALDigit * Digit(const Int_t index) { return static_cast(Digits()->At(index)) ;} + TClonesArray * Digits() const ; + AliEMCALDigit * Digit(Int_t index) const { return static_cast(Digits()->At(index)) ;} TTree * TreeD() const ; AliEMCALDigitizer * Digitizer() ; - TString GetDigitsFileName() { return EmcalLoader()->GetDigitsFileName() ; } - Int_t LoadDigits(Option_t* opt="") { return EmcalLoader()->LoadDigits(opt) ; } - Int_t LoadDigitizer(Option_t* opt=""){ + TString GetDigitsFileName() const { return EmcalLoader()->GetDigitsFileName() ; } + Int_t LoadDigits(Option_t* opt="") const { return EmcalLoader()->LoadDigits(opt) ; } + Int_t LoadDigitizer(Option_t* opt="") const { return EmcalLoader()->LoadDigitizer(opt) ; } - Int_t WriteDigits(Option_t* opt="") { return EmcalLoader()->WriteDigits(opt) ; } - Int_t WriteDigitizer(Option_t* opt=""){ + Int_t WriteDigits(Option_t* opt="") const { return EmcalLoader()->WriteDigits(opt) ; } + Int_t WriteDigitizer(Option_t* opt="") const { return EmcalLoader()->WriteDigitizer(opt) ; } //========== RecPoints ============= - TObjArray * PRERecPoints() ; - AliEMCALRecPoint * PRERecPoint(const Int_t index) { return static_cast(PRERecPoints()->At(index)) ;} - TObjArray * ECARecPoints() ; - AliEMCALTowerRecPoint * ECARecPoint(const Int_t index) { return static_cast(ECARecPoints()->At(index)) ;} - TObjArray * HCARecPoints() ; - AliEMCALTowerRecPoint * HCARecPoint(const Int_t index) { return static_cast(HCARecPoints()->At(index)) ;} + TObjArray * ECARecPoints() const; + AliEMCALRecPoint * ECARecPoint(Int_t index) const{ return static_cast(ECARecPoints()->At(index)) ;} TTree * TreeR() const ; AliEMCALClusterizer * Clusterizer() ; - TString GetRecPointsFileName() { return EmcalLoader()->GetRecPointsFileName() ; } - Int_t LoadRecPoints(Option_t* opt="") { return EmcalLoader()->LoadRecPoints(opt) ; } - Int_t LoadClusterizer(Option_t* opt=""){ + TString GetRecPointsFileName() const { return EmcalLoader()->GetRecPointsFileName() ; } + Int_t LoadRecPoints(Option_t* opt="") const { return EmcalLoader()->LoadRecPoints(opt) ; } + Int_t LoadClusterizer(Option_t* opt="") const { return EmcalLoader()->LoadClusterizer(opt) ; } - Int_t WriteRecPoints(Option_t* opt="") { return EmcalLoader()->WriteRecPoints(opt) ; } - Int_t WriteClusterizer(Option_t* opt=""){ + Int_t WriteRecPoints(Option_t* opt="") const { return EmcalLoader()->WriteRecPoints(opt) ; } + Int_t WriteClusterizer(Option_t* opt="") const { return EmcalLoader()->WriteClusterizer(opt) ; } //========== TrackSegments TClonesArray * TrackSegments(const char * name = 0) { - TClonesArray * TrackSegments() ; - AliEMCALTrackSegment * TrackSegments(const Int_t index) { return static_cast(TrackSegments()->At(index)) ;} + TClonesArray * TrackSegments() const ; + AliEMCALTrackSegment * TrackSegments(Int_t index) const { return static_cast(TrackSegments()->At(index)) ;} TTree * TreeT() const ; AliEMCALTrackSegmentMaker * TrackSegmentMaker() ; - TString GetTracksFileName() { return EmcalLoader()->GetTracksFileName() ; } - Int_t LoadTracks(Option_t* opt="") { return EmcalLoader()->LoadTracks(opt) ; } - Int_t LoadTrackSegementMaker(Option_t* opt=""){ + TString GetTracksFileName() const { return EmcalLoader()->GetTracksFileName() ; } + Int_t LoadTracks(Option_t* opt="") const { return EmcalLoader()->LoadTracks(opt) ; } + Int_t LoadTrackSegementMaker(Option_t* opt="") const { return EmcalLoader()->LoadTrackSegmentMaker(opt) ; } - Int_t WriteTracks(Option_t* opt="") { return EmcalLoader()->WriteTracks(opt) ; } - Int_t WriteTrackSegmentMaker(Option_t* opt=""){ + Int_t WriteTracks(Option_t* opt="") const { return EmcalLoader()->WriteTracks(opt) ; } + Int_t WriteTrackSegmentMaker(Option_t* opt="") const { return EmcalLoader()->WriteTracker(opt) ; } //========== RecParticles =========== - TClonesArray * RecParticles() ; - AliEMCALRecParticle * RecPaticles(const Int_t index) { return static_cast(RecParticles()->At(index)) ;} + TClonesArray * RecParticles() const ; + AliEMCALRecParticle * RecParticle(Int_t index) const { return static_cast(RecParticles()->At(index)) ;} TTree * TreeP() const ; AliEMCALPID * PID() ; - TString GetRecParticlesFileName() { return EmcalLoader()->GetRecParticlesFileName() ; } - Int_t LoadRecParticles(Option_t* opt="") { return EmcalLoader()->LoadRecParticles(opt) ; } - Int_t LoadPID(Option_t* opt=""){ + TString GetRecParticlesFileName() const { return EmcalLoader()->GetRecParticlesFileName() ; } + Int_t LoadRecParticles(Option_t* opt="") const { return EmcalLoader()->LoadRecParticles(opt) ; } + Int_t LoadPID(Option_t* opt="") const { return EmcalLoader()->LoadPID(opt) ; } - Int_t WriteRecParticles(Option_t* opt="") { return EmcalLoader()->WriteRecParticles(opt) ; } - Int_t WritePID(Option_t* opt=""){ + Int_t WriteRecParticles(Option_t* opt="") const { return EmcalLoader()->WriteRecParticles(opt) ; } + Int_t WritePID(Option_t* opt="") const { return EmcalLoader()->WritePID(opt) ; } void SetDebug(Int_t level) {fgDebug = level;} // Set debug level - void PostClusterizer(AliEMCALClusterizer * clu) + void PostClusterizer(AliEMCALClusterizer * clu) const{EmcalLoader()->PostClusterizer(clu) ; } void PostPID(AliEMCALPID * pid) const{EmcalLoader()->PostPID(pid) ; } @@ -196,7 +184,8 @@ class AliEMCALGetter : public TObject { TString Version() const { return EmcalLoader()->GetTitle() ; } AliEMCALLoader * EmcalLoader() const { return fgEmcalLoader ; } - + void Reset() ; + private: AliEMCALGetter(const char* headerFile, @@ -227,13 +216,13 @@ private: // AliEMCALCalibrationDB * fcdb ; //! - static AliEMCALLoader * fgEmcalLoader ; + static AliEMCALLoader * fgEmcalLoader ; // pointer to EMCAL Loader static AliEMCALGetter * fgObjGetter; // pointer to the unique instance of the singleton enum EDataTypes{kHits,kSDigits,kDigits,kRecPoints,kTracks,kNDataTypes}; - ClassDef(AliEMCALGetter,2) // Algorithm class that provides methods to retrieve objects from a list knowing the index + ClassDef(AliEMCALGetter,3) // Algorithm class that provides methods to retrieve objects from a list knowing the index };