Fix Coverity defects
[u/mrichter/AliRoot.git] / TRD / AliTRDdigitizer.h
CommitLineData
dd9a6ee3 1#ifndef ALITRDDIGITIZER_H
2#define ALITRDDIGITIZER_H
f7336fa3 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
4d18a639 8////////////////////////////////////////////////////////////////////////////
9// //
10// Produces digits from the hits information //
11// //
12////////////////////////////////////////////////////////////////////////////
13
85cbec76 14#include "AliDigitizer.h"
f7336fa3 15
793ff80c 16class TFile;
17class TF1;
18
85cbec76 19class AliRunDigitizer;
88cb7938 20class AliRunLoader;
85cbec76 21
793ff80c 22class AliTRD;
6f1e466d 23class AliTRDdigitsManager;
793ff80c 24class AliTRDgeometry;
b65e5048 25class AliTRDarraySignal;
26class AliTRDarrayADC;
50002f37 27class AliTRDmcmSim;
f7336fa3 28
85cbec76 29class AliTRDdigitizer : public AliDigitizer {
f7336fa3 30
31 public:
32
33 AliTRDdigitizer();
4d18a639 34 AliTRDdigitizer(const Text_t *name, const Text_t *title);
35 AliTRDdigitizer(AliRunDigitizer *manager, const Text_t *name, const Text_t *title);
bfc40adc 36 AliTRDdigitizer(AliRunDigitizer *manager);
dd9a6ee3 37 AliTRDdigitizer(const AliTRDdigitizer &d);
625f5260 38 virtual ~AliTRDdigitizer();
39 AliTRDdigitizer &operator=(const AliTRDdigitizer &d);
40
41 virtual void Copy(TObject &d) const;
42 Bool_t InitDetector();
43 void InitOutput(Int_t iEvent);
621310dd 44 virtual void Exec(const Option_t * const option = 0);
625f5260 45
46 virtual Bool_t Open(const Char_t *file, Int_t nEvent = 0);
621310dd 47 virtual Bool_t Open(AliRunLoader * const runLoader, Int_t nEvent = 0);
625f5260 48 virtual Bool_t MakeBranch(TTree *tree) const;
49 virtual Bool_t WriteDigits() const;
50
51 virtual void AddSDigitsManager(AliTRDdigitsManager *manager);
52 virtual void DeleteSDigitsManager();
53
54 virtual Bool_t MakeDigits();
55
56 Bool_t SortHits(Float_t **hits, Int_t *nhit);
621310dd 57 Bool_t ConvertHits(Int_t det, const Float_t * const hits, Int_t nhit, AliTRDarraySignal *signals);
b65e5048 58 Bool_t ConvertSignals(Int_t det, AliTRDarraySignal *signals);
625f5260 59
621310dd 60 Bool_t Digits2SDigits(AliTRDdigitsManager * const manDig, AliTRDdigitsManager * const manSDig);
625f5260 61 Bool_t SDigits2Digits();
62 Bool_t MergeSDigits();
63 Bool_t ConvertSDigits();
64
b65e5048 65 Bool_t Signal2ADC(Int_t det, AliTRDarraySignal *signals);
66 Bool_t Signal2SDigits(Int_t det, AliTRDarraySignal *signals);
625f5260 67 Bool_t CopyDictionary(Int_t det);
b65e5048 68 void CompressOutputArrays(Int_t det);
625f5260 69
621310dd 70 void SetCompress(Int_t c = 1) { fCompress = c; }
71 void SetSDigits(Int_t v = 1) { fSDigits = v; }
72 void SetEvent(Int_t v = 0) { fEvent = v; }
73 void SetManager(AliTRDdigitsManager * const man) { fDigitsManager = man; }
74 void SetGeometry(AliTRDgeometry * const geo) { fGeo = geo; }
75 void SetMergeSignalOnly(Bool_t m = kTRUE) { fMergeSignalOnly = m; }
625f5260 76
621310dd 77 AliTRDdigitsManager *Digits() const { return fDigitsManager; }
625f5260 78
621310dd 79 Bool_t GetCompress() const { return fCompress; }
80 Bool_t GetSDigits() const { return fSDigits; }
625f5260 81 Float_t GetLorentzFactor(Float_t vdrift);
82
625f5260 83 Int_t Diffusion(Float_t vdrift, Double_t absdriftlength
84 , Double_t &lRow, Double_t &lCol, Double_t &lTime);
85 Int_t ExB(Float_t vdrift, Double_t driftlength, Double_t &lRow);
d295185b 86 void RunDigitalProcessing(Int_t det = 0);
b65e5048 87
3becff3c 88 protected:
f7336fa3 89
f4611fed 90 AliRunLoader *fRunLoader; //! Local pointer
abaf1f1d 91 AliTRDdigitsManager *fDigitsManager; //! Manager for the output digits
92 AliTRDdigitsManager *fSDigitsManager; //! Manager for the summed input s-digits
93 TList *fSDigitsManagerList; //! List of managers of input s-digits
94 AliTRD *fTRD; //! TRD detector class
95 AliTRDgeometry *fGeo; //! TRD geometry
4d18a639 96
50002f37 97 AliTRDmcmSim *fMcmSim; //! MCM simulation for digital processing
98
625f5260 99 Int_t fEvent; //! Event number
100 Int_t *fMasks; //! Masks for the merging
101 Bool_t fCompress; // Switch to keep only compressed data in memory
102 Bool_t fSDigits; // Switch for the summable digits
103 Bool_t fMergeSignalOnly; // Merge only detectors that contain a signal
793ff80c 104
966f6939 105 ClassDef(AliTRDdigitizer,20) // Produces TRD-Digits
625f5260 106
107};
f7336fa3 108#endif