]>
Commit | Line | Data |
---|---|---|
88cb7938 | 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 */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //_________________________________________________________________________ | |
64c98165 | 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. | |
12 | // | |
13 | // It also provides acces methods to the calibration and simulation OCDB parameters | |
14 | // | |
15 | ||
88cb7938 | 16 | //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH) |
17 | // | |
18 | ||
19 | ||
20 | // --- ROOT system --- | |
21 | #include "TClonesArray.h" | |
22 | #include "TFolder.h" | |
23 | #include "TTree.h" | |
24 | class TString ; | |
25 | class TParticle ; | |
88cb7938 | 26 | |
88cb7938 | 27 | // --- AliRoot header files --- |
5dee926e | 28 | #include "AliLoader.h" |
f565d89d | 29 | #include "AliEMCALCalibData.h" |
6cc75819 | 30 | #include "AliCaloCalibPedestal.h" |
6569f329 | 31 | #include "AliEMCALSimParam.h" |
6cc75819 | 32 | #include "AliEMCALRecParam.h" |
f565d89d | 33 | |
d64c959b | 34 | class AliLoader ; |
35 | class AliEMCAL ; | |
5dee926e | 36 | class AliEMCALDigit ; |
37 | class AliEMCALSDigit ; | |
38 | class AliEMCALRecPoint ; | |
88cb7938 | 39 | |
40 | class AliEMCALLoader : public AliLoader { | |
41 | ||
42 | public: | |
43 | ||
44 | AliEMCALLoader(); | |
88cb7938 | 45 | AliEMCALLoader(const Char_t *detname,const Char_t *eventfoldername); |
6b299d9e | 46 | AliEMCALLoader(const Char_t *name,TFolder *topfolder); |
88cb7938 | 47 | |
48 | virtual ~AliEMCALLoader() ; | |
49 | ||
5dee926e | 50 | virtual Int_t GetEvent(); // Overload to fill TClonesArray |
51 | ||
64c98165 | 52 | //Clean arrays methods |
53 | virtual void CleanHits() const {GetHitsDataLoader()->Clean();} | |
54 | virtual void CleanSDigits() const {GetSDigitsDataLoader()->Clean();} | |
55 | virtual void CleanDigits() const {GetDigitsDataLoader()->Clean();} | |
56 | virtual void CleanRecPoints() const {GetRecPointsDataLoader()->Clean();} | |
57 | ||
58 | // Initialize arrays methods | |
59 | void MakeSDigitsArray() ; | |
64c98165 | 60 | void MakeDigitsArray() ; |
61 | void MakeRecPointsArray() ; | |
62 | ||
5dee926e | 63 | // ************ TClonesArrays Access functions |
64c98165 | 64 | |
64c98165 | 65 | TClonesArray* SDigits() {return (TClonesArray*)GetDetectorData(fgkECASDigitsBranchName);} //const { return fSDigits;} |
5dee926e | 66 | const AliEMCALDigit* SDigit(Int_t index) { |
64c98165 | 67 | if (SDigits())return (const AliEMCALDigit*) SDigits()->At(index); |
5dee926e | 68 | return 0x0; |
69 | } | |
64c98165 | 70 | |
71 | TClonesArray* Digits() {return (TClonesArray*)GetDetectorData(fgkECADigitsBranchName);}//const { return fDigits;} | |
5dee926e | 72 | const AliEMCALDigit * Digit(Int_t index) { |
64c98165 | 73 | if (Digits()) return (const AliEMCALDigit*) Digits()->At(index); |
5dee926e | 74 | return 0x0; |
75 | } | |
64c98165 | 76 | |
77 | TObjArray * RecPoints() {return (TObjArray*)GetDetectorData(fgkECARecPointsBranchName);}//const { return fRecPoints;} | |
5dee926e | 78 | const AliEMCALRecPoint * RecPoint(Int_t index) { |
64c98165 | 79 | if (RecPoints())return (const AliEMCALRecPoint*) RecPoints()->At(index); |
5dee926e | 80 | return 0x0; |
81 | } | |
64c98165 | 82 | |
88cb7938 | 83 | void SetDebug(Int_t level) {fDebug = level;} // Set debug level |
64c98165 | 84 | |
85 | //OCDB access methods | |
86 | ||
14ce0a6e | 87 | void SetCalibData(AliEMCALCalibData* calibda) { fgCalibData = calibda; } |
6cc75819 | 88 | AliEMCALCalibData * CalibData(); // to get the calibration CDB object |
64c98165 | 89 | |
6cc75819 | 90 | void SetPedestalData(AliCaloCalibPedestal* caloped) { fgCaloPed = caloped; } |
91 | AliCaloCalibPedestal* PedestalData(); // to get the pedestal CDB object | |
64c98165 | 92 | |
6569f329 | 93 | void SetSimParam(AliEMCALSimParam* simparam) { fgSimParam = simparam; } |
6cc75819 | 94 | AliEMCALSimParam* SimulationParameters(); // to get the simulation parameter CDB object |
64c98165 | 95 | |
6cc75819 | 96 | void SetRecParam(AliEMCALRecParam* recparam) { fgRecParam = recparam; } |
97 | AliEMCALRecParam* ReconstructionParameters(Int_t eventType); // to get the reconstruction parameter CDB object | |
98 | ||
64c98165 | 99 | private: |
100 | ||
dc86eb51 | 101 | // assignement operator requested by coding convention, but not needed |
102 | AliEMCALLoader(const AliEMCALLoader &); //Not implemented | |
103 | const AliEMCALLoader & operator = (const AliEMCALLoader &); //Not implemented | |
64c98165 | 104 | |
64c98165 | 105 | static const TString fgkECASDigitsBranchName; //! Name of branch with ECA SDigits |
106 | static const TString fgkECADigitsBranchName; //! Name of branch with ECA Digits | |
5dee926e | 107 | static const TString fgkECARecPointsBranchName; //! Name of branch with ECA Reconstructed Points |
64c98165 | 108 | |
d64c959b | 109 | Int_t fDebug ; // Debug level |
0c978ad5 | 110 | |
40164976 | 111 | static AliEMCALCalibData * fgCalibData; // calibration data |
6cc75819 | 112 | static AliCaloCalibPedestal * fgCaloPed; // dead map |
6569f329 | 113 | static AliEMCALSimParam * fgSimParam; // sim param |
6cc75819 | 114 | static AliEMCALRecParam * fgRecParam; // rec param |
115 | ||
e44d51bd | 116 | ClassDef(AliEMCALLoader,7) // Algorithm class that provides methods to retrieve objects from a list knowing the index |
64c98165 | 117 | |
88cb7938 | 118 | }; |
119 | ||
88cb7938 | 120 | #endif // AliEMCALLOADER_H |