AliRoot Core  ee782a0 (ee782a0)
AliEMCALLoader.h
Go to the documentation of this file.
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 
12 // The AliEMCALLoader gets the TClonesArray and TObjArray for reading
13 // Hits, Digits, SDigits and RecPoints. Filling is managed in the GetEvent()
14 // method. The objects are retrived from the corresponding folders.
15 //
16 // It also provides acces methods to the calibration and simulation OCDB parameters
23 
24 // --- ROOT system ---
25 #include "TClonesArray.h"
26 #include "TFolder.h"
27 #include "TTree.h"
28 class TString ;
29 class TParticle ;
30 
31 // --- AliRoot header files ---
32 #include "AliLoader.h"
33 #include "AliEMCALCalibData.h"
34 #include "AliEMCALCalibTime.h"
35 #include "AliCaloCalibPedestal.h"
36 #include "AliEMCALSimParam.h"
37 #include "AliEMCALRecParam.h"
38 
39 class AliLoader ;
40 class AliEMCAL ;
41 class AliEMCALDigit ;
42 class AliEMCALSDigit ;
43 class AliEMCALRecPoint ;
44 
45 class AliEMCALLoader : public AliLoader
46 {
47 
48  public:
49 
51  AliEMCALLoader(const Char_t *detname,const Char_t *eventfoldername);
52  AliEMCALLoader(const Char_t *name,TFolder *topfolder);
53 
54  virtual ~AliEMCALLoader() ;
55 
56  virtual Int_t GetEvent(); // Overload to fill TClonesArray
57 
58  // Clean arrays methods
59  virtual void CleanHits () const { GetHitsDataLoader ()->Clean() ; }
60  virtual void CleanSDigits () const { GetSDigitsDataLoader ()->Clean() ; }
61  virtual void CleanDigits () const { GetDigitsDataLoader ()->Clean() ; }
62  virtual void CleanRecPoints() const { GetRecPointsDataLoader()->Clean() ; }
63 
64  // Initialize arrays methods
65  void MakeSDigitsArray() ;
66  void MakeDigitsArray() ;
67  void MakeRecPointsArray() ;
68 
69  // ************ TClonesArrays Access functions
70 
71  TClonesArray* SDigits() {return (TClonesArray*)GetDetectorData(fgkECASDigitsBranchName);} //const { return fSDigits;}
72  const AliEMCALDigit* SDigit(Int_t index) {
73  if (SDigits())return (const AliEMCALDigit*) SDigits()->At(index);
74  return 0x0;
75  }
76 
77  TClonesArray* Digits() {return (TClonesArray*)GetDetectorData(fgkECADigitsBranchName);}//const { return fDigits;}
78  const AliEMCALDigit * Digit(Int_t index) {
79  if (Digits()) return (const AliEMCALDigit*) Digits()->At(index);
80  return 0x0;
81  }
82 
83  TObjArray * RecPoints() {return (TObjArray*)GetDetectorData(fgkECARecPointsBranchName);}//const { return fRecPoints;}
84  const AliEMCALRecPoint * RecPoint(Int_t index) {
85  if (RecPoints())return (const AliEMCALRecPoint*) RecPoints()->At(index);
86  return 0x0;
87  }
88 
89  void SetDebug(Int_t level) { fDebug = level ; } // Set debug level
90 
91  // OCDB access methods
92 
93  void SetCalibData(AliEMCALCalibData* calibda) { fgCalibData = calibda; }
94  AliEMCALCalibData * CalibData(); // to get the energy calibration CDB object
95 
96  void SetCalibTime(AliEMCALCalibTime* calibti) { fgCalibTime = calibti; }
97  AliEMCALCalibTime * CalibTime(); // to get the time calibration CDB object
98 
99  void SetPedestalData(AliCaloCalibPedestal* caloped) { fgCaloPed = caloped; }
100  AliCaloCalibPedestal* PedestalData(); // to get the pedestal CDB object
101 
102  void SetSimParam(AliEMCALSimParam* simparam) { fgSimParam = simparam; }
103  AliEMCALSimParam* SimulationParameters(); // to get the simulation parameter CDB object
104 
105  void SetRecParam(AliEMCALRecParam* recparam) { fgRecParam = recparam; }
106  AliEMCALRecParam* ReconstructionParameters(Int_t eventType); // to get the reconstruction parameter CDB object
107 
108  private:
109 
110  // assignement operator requested by coding convention, but not needed
111  AliEMCALLoader (const AliEMCALLoader &); //Not implemented
112  const AliEMCALLoader & operator = (const AliEMCALLoader &); //Not implemented
113 
114  static const TString fgkECASDigitsBranchName;
115  static const TString fgkECADigitsBranchName;
116  static const TString fgkECARecPointsBranchName;
117 
118  Int_t fDebug ;
119 
125 
127  ClassDef(AliEMCALLoader,8) ;
129 
130 };
131 
132 #endif // AliEMCALLOADER_H
void MakeSDigitsArray()
Add SDigits array to the data folder.
AliEMCALRecParam * ReconstructionParameters(Int_t eventType)
static const TString fgkECARecPointsBranchName
! Name of branch with ECA Reconstructed Points
static AliEMCALCalibData * fgCalibData
Energy calibration data.
#define TObjArray
AliCaloCalibPedestal * PedestalData()
void MakeDigitsArray()
Add Digits array to the data folder.
static AliEMCALSimParam * fgSimParam
Sim param.
virtual Int_t GetEvent()
const AliEMCALRecPoint * RecPoint(Int_t index)
virtual void CleanRecPoints() const
TClonesArray * SDigits()
AliEMCALSimParam * SimulationParameters()
void SetPedestalData(AliCaloCalibPedestal *caloped)
Cell energy calibration factors container class.
Int_t fDebug
Debug level.
Container of reconstruction parameters.
void SetRecParam(AliEMCALRecParam *recparam)
EMCal digits object.
Definition: AliEMCALDigit.h:30
TClonesArray * Digits()
TObject * GetDetectorData(const char *name)
Definition: AliLoader.h:275
static AliEMCALCalibTime * fgCalibTime
Time calibration data.
void SetCalibTime(AliEMCALCalibTime *calibti)
Give access to hits, digits, recpoints arrays and OCDB.
virtual void CleanHits() const
static AliEMCALRecParam * fgRecParam
Rec param.
TObjArray * RecPoints()
AliDataLoader * GetDigitsDataLoader() const
Definition: AliLoader.h:54
virtual ~AliEMCALLoader()
Disconnect trees and remove arrays.
const AliEMCALDigit * SDigit(Int_t index)
AliDataLoader * GetSDigitsDataLoader() const
Definition: AliLoader.h:53
EMCal rec_points object.
Container of simulation parameters.
Cell time shifts container class.
AliDataLoader * GetHitsDataLoader() const
Definition: AliLoader.h:52
Base Class for EMCAL description.
Definition: AliEMCAL.h:35
pedestal/bad map monitoring and calibration tools
virtual void CleanSDigits() const
void SetSimParam(AliEMCALSimParam *simparam)
AliEMCALLoader()
Default constructor for EMCAL Loader Class.
void MakeRecPointsArray()
Add RecPoints array to the data folder.
virtual void Clean()
static const TString fgkECASDigitsBranchName
! Name of branch with ECA SDigits
virtual void CleanDigits() const
AliEMCALCalibData * CalibData()
void SetCalibData(AliEMCALCalibData *calibda)
AliEMCALCalibTime * CalibTime()
static const TString fgkECADigitsBranchName
! Name of branch with ECA Digits
const AliEMCALDigit * Digit(Int_t index)
const AliEMCALLoader & operator=(const AliEMCALLoader &)
static AliCaloCalibPedestal * fgCaloPed
Dead map.
void SetDebug(Int_t level)
AliDataLoader * GetRecPointsDataLoader() const
Definition: AliLoader.h:55