X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALSDigitizer.h;h=3c6fd6d512180c0f6869693733a1888d7f26b6fe;hb=bf37515ff858b7fce001ff700114648ba2e2d64a;hp=543b9e45c8111b094b15cd6a4fe96e0ee7b6e18a;hpb=61e0abb5c9bbd6e578ed6769602e4d9bb80ba13e;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALSDigitizer.h b/EMCAL/AliEMCALSDigitizer.h index 543b9e45c81..3c6fd6d5121 100644 --- a/EMCAL/AliEMCALSDigitizer.h +++ b/EMCAL/AliEMCALSDigitizer.h @@ -2,63 +2,82 @@ #define ALIEMCALSDigitizer_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ - /* $Id$ */ - //_________________________________________________________________________ // Task Class for making SDigits in EMCAL // -//*-- Author: Dmitri Peressounko(SUBATECH & KI) - - +//*-- Author: Sahal Yacoob (LBL) +// based on : AliPHOSSDigitizer +//_________________________________________________________________________ +// +// Modif: +// August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction +// July 2003 Yves Schutz: new IO (à la PHOS) + // --- ROOT system --- #include "TTask.h" -#include "TString.h" +class TFile ; +class TList; +class TBrowser; +//class TBrowser; + // --- Standard library --- // --- AliRoot header files --- +#include "AliConfig.h" class AliEMCALSDigitizer: public TTask { public: AliEMCALSDigitizer() ; // ctor - AliEMCALSDigitizer(const char* HeaderFile,const char *SdigitsTitle = 0) ; - virtual ~AliEMCALSDigitizer() ; // dtor - - Float_t Calibrate(Int_t amp)const {return (amp - fA)/fB ; } - Int_t Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); } + AliEMCALSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::GetDefaultEventFolderName()) ; + AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) ; + virtual ~AliEMCALSDigitizer(); // dtor + Float_t Calibrate(Int_t amp)const {return (amp - fA)/fB ; } + Int_t Digitize(Float_t energy)const; virtual void Exec(Option_t *option); - - Float_t GetPedestalParameter()const {return fA;} - Float_t GetCalibrationParameter()const{return fB;} - char * GetSDigitsBranch()const{return (char*) fSDigitsTitle.Data();} - - virtual void Print(Option_t* option) const ; - - void SetPedestalParameter(Float_t A){fA = A ;} - void SetSlopeParameter(Float_t B){fB = B ;} - void SetSDigitsBranch(const char * title ) ; - - Bool_t operator == (const AliEMCALSDigitizer & sd) const ; + Int_t GetSDigitsInRun() const {return fSDigitsInRun ;} + virtual void Print(Option_t *option="") const; + void Print1(Option_t *option="all"); // *MENU* + void SetEventFolderName(TString name) { fEventFolderName = name ; } + void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; } + + Bool_t operator == (const AliEMCALSDigitizer & sd) const ; + const AliEMCALSDigitizer & operator = (const AliEMCALSDigitizer & /*sd*/) {return *this ;} + + virtual void Browse(TBrowser* b); + // hists + void SetControlHists(Int_t var=0) {fControlHists=var;} + Int_t GetControlHist() const {return fControlHists;} + TList *GetListOfHists() {return fHists;} + TList* BookControlHists(int var=0); + void SaveHists(const char* name="RF/TRD1/Digitizations/SDigiVar?", + Bool_t kSingleKey=kTRUE, const char* opt="RECREATE"); // *MENU* private: void Init() ; + void InitParameters() ; void PrintSDigits(Option_t * option) ; + void Unload() const ; private: - Float_t fA ; //Pedestal parameter - Float_t fB ; //Slope Digitizition parameters - Int_t fNevents ; // Number of events to digitize - Float_t fPrimThreshold ; // To store primari if Elos > threshold - TString fSDigitsTitle ; // title of SDigits branch - TString fHeadersFile ; //input file - Bool_t fIsInitialized ; - TClonesArray * fSDigits ; //! list of SDigits - TClonesArray * fHits ; //! - - ClassDef(AliEMCALSDigitizer,1) // description - + Float_t fA ; // Pedestal parameter + Float_t fB ; // Slope Digitizition parameters + Float_t fECPrimThreshold ; // To store primary if EC Shower Elos > threshold + Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) + TString fEventFolderName; // event folder name + Bool_t fInit ; //! tells if initialisation went OK, will revent exec if not + Int_t fSDigitsInRun ; //! Total number of sdigits in one run + Int_t fFirstEvent; // first event to process + Int_t fLastEvent; // last event to process + Float_t fSampling; // See AliEMCALGeometry + // Control hists + Int_t fControlHists; //! + TList *fHists; //! + + ClassDef(AliEMCALSDigitizer,5) // description }; #endif // AliEMCALSDigitizer_H +