X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PHOS%2FAliPHOSLoader.h;h=fec7377cf3ef67b193fb4e092fe0f6ae4b50a99b;hb=bd8f520e269b288b425382d411bd92777ee4af82;hp=453ed14996c4f0ccec9d6dbc78dfdc57c05be11f;hpb=88cb7938ca21d4a80991d4e7aa564008c29340f7;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/AliPHOSLoader.h b/PHOS/AliPHOSLoader.h index 453ed14996c..fec7377cf3e 100644 --- a/PHOS/AliPHOSLoader.h +++ b/PHOS/AliPHOSLoader.h @@ -5,6 +5,20 @@ /* $Id$ */ +/* History of cvs commits: + * + * $Log$ + * Revision 1.12 2006/08/25 16:00:53 kharlov + * Compliance with Effective C++AliPHOSHit.cxx + * + * Revision 1.11 2006/08/01 12:15:03 cvetan + * Adding a constructor from TFolder. Needed by AliReconstruction plugin scheme + * + * Revision 1.10 2005/05/28 14:19:04 schutz + * Compilation warnings fixed by T.P. + * + */ + //_________________________________________________________________________ // A singleton that returns various objects // Should be used on the analysis stage to avoid confusing between different @@ -12,58 +26,45 @@ // another set of RecPoints. // // The objects are retrived from folders. -//*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH) +//-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH) // // --- ROOT system --- -#include "TClonesArray.h" -#include "TFolder.h" -#include "TTree.h" class TString ; class TParticle ; -class TTask ; +#include +#include // --- Standard library --- -#include -#include // --- AliRoot header files --- - #include "AliRun.h" #include "AliLoader.h" #include "AliRunLoader.h" -#include "AliPHOS.h" -#include "AliPHOSHit.h" -#include "AliPHOSDigit.h" -#include "AliPHOSEmcRecPoint.h" -#include "AliPHOSCpvRecPoint.h" -#include "AliPHOSTrackSegment.h" -#include "AliPHOSRecParticle.h" -class AliPHOSGeometry ; -#include "AliPHOSDigitizer.h" -#include "AliPHOSSDigitizer.h" #include "AliPHOSClusterizer.h" #include "AliPHOSTrackSegmentMaker.h" #include "AliPHOSPID.h" -class AliPHOSCalibrationDB ; - - -// - +class AliPHOS ; +class AliPHOSHit ; +class AliPHOSDigit ; +class AliPHOSEmcRecPoint ; +class AliPHOSCpvRecPoint ; +class AliPHOSTrackSegment ; +class AliPHOSRecParticle ; +class AliPHOSSDigitizer ; +class AliPHOSDigitizer ; + class AliPHOSLoader : public AliLoader { - public: +public: AliPHOSLoader(); - AliPHOSLoader(const AliPHOSLoader & obj){} AliPHOSLoader(const Char_t *detname,const Char_t *eventfoldername); + AliPHOSLoader(const Char_t *detname,TFolder *topfolder); virtual ~AliPHOSLoader() ; - // assignement operator requested by coding convention, but not needed - AliPHOSLoader & operator = (const AliPHOSLoader & ) {return *this;} - Int_t GetEvent();//extends the method on PHOS RecPart posting Int_t SetEvent();//extends the method on PHOS RecPart posting @@ -75,28 +76,22 @@ class AliPHOSLoader : public AliLoader { Int_t LoadTracks(Option_t* opt=""); //reads Tracks from disk and sends them to folder; array as well as tree Int_t LoadRecParticles(Option_t* opt=""); - Int_t PostHits(); //Posts the - Int_t PostSDigits(); - Int_t PostDigits(); - Int_t PostRecPoints(); - Int_t PostTracks(); - Int_t PostRecParticles(); + Int_t PostHits()const; //Posts the + Int_t PostSDigits()const; + Int_t PostDigits()const; + Int_t PostRecPoints()const; + Int_t PostTracks()const; + Int_t PostRecParticles()const; void CleanFolders();//cleans all the stuff loaded by this detector + calls AliLoader::Clean - void CleanHits(); - void CleanSDigits(); - void CleanDigits(); - void CleanRecPoints(); - void CleanTracks(); + void CleanHits()const; + void CleanSDigits()const; + void CleanDigits()const; + void CleanRecPoints()const; + void CleanTracks()const; void CleanRecParticles(); -//up to now it is only here -> no definition about global/incremental tracking/PID - -// Int_t WriteRecParticles(Option_t* opt="");//writes the reconstructed particles -// Int_t WritePID(Option_t* opt="");//writes the task for PID to file -// Bool_t PostPID (AliPHOSPID * pid) const {return kTRUE;} -// Bool_t PostQA (void) const ; //it was empty anyway /*******************************************************************/ /*******************************************************************/ @@ -112,18 +107,16 @@ class AliPHOSLoader : public AliLoader { TObject** AlarmsRef(){return GetDetectorDataRef(Alarms());} void Track(Int_t itrack) ; - static AliPHOSGeometry* GetPHOSGeometry(); static AliPHOSLoader* GetPHOSLoader(const char* eventfoldername); - //Method to be used when digitizing under AliRunDigitizer, who opens all files etc. + //Method to be used when digitizing under AliDigitizationInput, who opens all files etc. Int_t EventNumber() { return (Int_t) GetRunLoader()->GetEventNumber();} Int_t MaxEvent() { return (Int_t) GetRunLoader()->TreeE()->GetEntries();} - const AliPHOS * PHOS(); - const AliPHOSGeometry *PHOSGeometry() ; +/* const AliPHOS * PHOS(); */ // Alarms // TFolder * Alarms() const { return (TFolder*)(ReturnO("Alarms", 0)); } - TObjArray * Alarms(); + TObjArray * Alarms() {return 0x0;} /*********************************************/ /************ TClonesArrays ***********/ @@ -154,43 +147,22 @@ class AliPHOSLoader : public AliLoader { TClonesArray * RecParticles() ; const AliPHOSRecParticle * RecParticle(Int_t index); void MakeRecParticlesArray(); - - /*********************************************/ - /************ T A S K S **************/ - /*********************************************/ - // - // AliPHOSSDigitizer* PHOSSDigitizer(TString name = AliConfig::fgkDefaultEventFolderName); - //AliPHOSDigitizer* PHOSDigitizer() { return dynamic_cast(Digitizer()) ;} - - AliPHOSClusterizer* Clusterizer () {return dynamic_cast(Reconstructioner()) ;} - Int_t PostClusterizer(TTask* clust){return PostReconstructioner(clust);} - Int_t LoadClusterizer(Option_t * opt="") {return LoadReconstructioner(opt);} - Int_t WriteClusterizer(Option_t * opt="") {return WriteReconstructioner(opt);} - - AliPHOSPID * PID (){return dynamic_cast(PIDTask()) ;} - Int_t PostPID(TTask* pid){return PostPIDTask(pid);} - Int_t LoadPID(Option_t * opt="") {return LoadPIDTask(opt);} - Int_t WritePID(Option_t * opt="") {return WritePIDTask(opt);} - - - AliPHOSTrackSegmentMaker * TrackSegmentMaker () { return dynamic_cast(Tracker()) ;} - Int_t PostTrackSegmentMaker(TTask* segmaker){return PostTracker(segmaker);} - Int_t LoadTrackSegmentMaker(Option_t * opt="") {return LoadTracker(opt);} - Int_t WriteTrackSegmentMaker(Option_t * opt="") {return WriteTracker(opt);} - void SetDebug(Int_t level) {fDebug = level;} // Set debug level void SetBranchTitle(const TString& btitle); - - AliPHOSCalibrationDB * CalibrationDB(){return fcdb; } - void ReadCalibrationDB(const char * name, const char * filename); + + Int_t GetDebug() const {return fDebug; } + TString GetBranchTitle() const {return fBranchTitle;} protected: TString fBranchTitle; //Title of the branch - AliPHOSCalibrationDB * fcdb ; //! private: + // assignement operator requested by coding convention, but not needed + AliPHOSLoader(const AliPHOSLoader &); //Not implemented + AliPHOSLoader & operator = (const AliPHOSLoader & ); //Not implemented + Int_t ReadHits(); Int_t ReadDigits(); Int_t ReadSDigits(); @@ -198,10 +170,8 @@ private: Int_t ReadTracks(); Int_t ReadRecParticles(); - void ReadTreeQA() ; Int_t fDebug ; // Debug level - - public: + TClonesArray *fTmpHits; //! Temporary array of hits per track static const TString fgkHitsName;//Name for TClonesArray with hits from one event static const TString fgkSDigitsName;//Name for TClonesArray @@ -216,7 +186,8 @@ private: static const TString fgkTrackSegmentsBranchName;//Name for branch static const TString fgkRecParticlesBranchName;//Name for branch - ClassDef(AliPHOSLoader,3) // Algorithm class that provides methods to retrieve objects from a list knowing the index + + ClassDef(AliPHOSLoader,4) // Algorithm class that provides methods to retrieve objects from a list knowing the index }; @@ -327,8 +298,5 @@ inline const AliPHOSRecParticle* AliPHOSLoader::RecParticle(Int_t index) return (const AliPHOSRecParticle*) tcarr->At(index); return 0x0; } -/******************************************************************************/ -inline TObjArray * AliPHOSLoader::Alarms() -{ return (TObjArray*)(GetQAFolder()->FindObject(fDetectorName));} #endif // AliPHOSLOADER_H