reverting coverity fix
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALLoader.h
CommitLineData
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"
24class TString ;
25class TParticle ;
26class TTask ;
27
88cb7938 28// --- AliRoot header files ---
5dee926e 29#include "AliLoader.h"
f565d89d 30#include "AliEMCALCalibData.h"
64c98165 31//#include "AliCaloCalibPedestal.h"
6569f329 32#include "AliEMCALSimParam.h"
f565d89d 33
d64c959b 34class AliLoader ;
35class AliEMCAL ;
5dee926e 36class AliEMCALDigit ;
37class AliEMCALSDigit ;
38class AliEMCALRecPoint ;
88cb7938 39
40class 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; }
bcdecbbe 88 AliEMCALCalibData * CalibData(); // to get the calibration CDB object
64c98165 89
90 // void SetPedestalData(AliCaloCalibPedestal* caloped) { fgCaloPed = caloped; }
91 // AliCaloCalibPedestal* PedestalData(); // to get the pedestal CDB object
92
6569f329 93 void SetSimParam(AliEMCALSimParam* simparam) { fgSimParam = simparam; }
94 AliEMCALSimParam* SimulationParameters(); // to get the simulation parameter CDB object
64c98165 95
96
97 private:
98
dc86eb51 99 // assignement operator requested by coding convention, but not needed
100 AliEMCALLoader(const AliEMCALLoader &); //Not implemented
101 const AliEMCALLoader & operator = (const AliEMCALLoader &); //Not implemented
64c98165 102
64c98165 103 static const TString fgkECASDigitsBranchName; //! Name of branch with ECA SDigits
104 static const TString fgkECADigitsBranchName; //! Name of branch with ECA Digits
5dee926e 105 static const TString fgkECARecPointsBranchName; //! Name of branch with ECA Reconstructed Points
64c98165 106
d64c959b 107 Int_t fDebug ; // Debug level
0c978ad5 108
40164976 109 static AliEMCALCalibData * fgCalibData; // calibration data
64c98165 110 // static AliCaloCalibPedestal * fgCaloPed; // dead map
6569f329 111 static AliEMCALSimParam * fgSimParam; // sim param
64c98165 112
e44d51bd 113 ClassDef(AliEMCALLoader,7) // Algorithm class that provides methods to retrieve objects from a list knowing the index
64c98165 114
88cb7938 115};
116
88cb7938 117#endif // AliEMCALLOADER_H