1 #ifndef ALIEMCALLOADER_H
2 #define ALIEMCALLOADER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //_________________________________________________________________________
9 // The AliEMCALLoader gets the TClonesArray and TObjArray for reading
10 // Hits, Dgits, SDigits and RecPoints. Filling is managed in the GetEvent()
11 // method. The objects are retrived from the corresponding folders.
13 // It also provides acces methods to the calibration and simulation OCDB parameters
16 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
20 // --- ROOT system ---
21 #include "TClonesArray.h"
28 // --- AliRoot header files ---
29 #include "AliLoader.h"
30 #include "AliEMCALCalibData.h"
31 //#include "AliCaloCalibPedestal.h"
32 #include "AliEMCALSimParam.h"
38 class AliEMCALSDigit ;
39 class AliEMCALRecPoint ;
41 class AliEMCALLoader : public AliLoader {
46 AliEMCALLoader(const Char_t *detname,const Char_t *eventfoldername);
47 AliEMCALLoader(const Char_t *name,TFolder *topfolder);
49 virtual ~AliEMCALLoader() ;
51 virtual Int_t GetEvent(); // Overload to fill TClonesArray
53 //Clean arrays methods
54 virtual void CleanHits() const {GetHitsDataLoader()->Clean();}
55 virtual void CleanSDigits() const {GetSDigitsDataLoader()->Clean();}
56 virtual void CleanDigits() const {GetDigitsDataLoader()->Clean();}
57 virtual void CleanRecPoints() const {GetRecPointsDataLoader()->Clean();}
59 // Initialize arrays methods
60 void MakeSDigitsArray() ;
61 void MakeHitsArray() ;
62 void MakeDigitsArray() ;
63 void MakeRecPointsArray() ;
65 // ************ TClonesArrays Access functions
67 TClonesArray* Hits(void) {return (TClonesArray*)GetDetectorData(fgkECAHitsBranchName);} //{ return fHits;}
68 const AliEMCALHit* Hit(Int_t index) {
69 if (Hits()) return (const AliEMCALHit*) Hits()->At(index);
73 TClonesArray* SDigits() {return (TClonesArray*)GetDetectorData(fgkECASDigitsBranchName);} //const { return fSDigits;}
74 const AliEMCALDigit* SDigit(Int_t index) {
75 if (SDigits())return (const AliEMCALDigit*) SDigits()->At(index);
79 TClonesArray* Digits() {return (TClonesArray*)GetDetectorData(fgkECADigitsBranchName);}//const { return fDigits;}
80 const AliEMCALDigit * Digit(Int_t index) {
81 if (Digits()) return (const AliEMCALDigit*) Digits()->At(index);
85 TObjArray * RecPoints() {return (TObjArray*)GetDetectorData(fgkECARecPointsBranchName);}//const { return fRecPoints;}
86 const AliEMCALRecPoint * RecPoint(Int_t index) {
87 if (RecPoints())return (const AliEMCALRecPoint*) RecPoints()->At(index);
91 void SetDebug(Int_t level) {fDebug = level;} // Set debug level
95 void SetCalibData(AliEMCALCalibData* calibda) { fgCalibData = calibda; }
96 AliEMCALCalibData * CalibData(); // to get the calibration CDB object
98 // void SetPedestalData(AliCaloCalibPedestal* caloped) { fgCaloPed = caloped; }
99 // AliCaloCalibPedestal* PedestalData(); // to get the pedestal CDB object
101 void SetSimParam(AliEMCALSimParam* simparam) { fgSimParam = simparam; }
102 AliEMCALSimParam* SimulationParameters(); // to get the simulation parameter CDB object
107 // assignement operator requested by coding convention, but not needed
108 AliEMCALLoader(const AliEMCALLoader &); //Not implemented
109 const AliEMCALLoader & operator = (const AliEMCALLoader &); //Not implemented
111 static const TString fgkECAHitsBranchName; //! Name of branch with ECA Hits
112 static const TString fgkECASDigitsBranchName; //! Name of branch with ECA SDigits
113 static const TString fgkECADigitsBranchName; //! Name of branch with ECA Digits
114 static const TString fgkECARecPointsBranchName; //! Name of branch with ECA Reconstructed Points
116 Int_t fDebug ; // Debug level
118 static AliEMCALCalibData * fgCalibData; // calibration data
119 // static AliCaloCalibPedestal * fgCaloPed; // dead map
120 static AliEMCALSimParam * fgSimParam; // sim param
122 ClassDef(AliEMCALLoader,5) // Algorithm class that provides methods to retrieve objects from a list knowing the index
126 #endif // AliEMCALLOADER_H