]>
Commit | Line | Data |
---|---|---|
a3b36d36 | 1 | #ifndef ALIFMDBASEDA_H |
2 | #define ALIFMDBASEDA_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights | |
5 | * reserved. | |
6 | * | |
7 | * See cxx source for full Copyright notice | |
8 | */ | |
9 | // | |
10 | //This class provides a base interface for the Detector Algorithms (DA) of the FMD. | |
11 | //At least three implementations are needed: AliFMDPedestalDA, AliFMDGainDA and AliFMDPhysicsDA . | |
12 | //These classes will provide the calibration data for the AliFMDPreprocessor to be used in the shuttle. | |
13 | //The input for this class are raw data (AliRawReader) and the output is a comma-separated file | |
14 | //(std::ofstream) that contains the values defined in the implementations of this class. | |
15 | // | |
16 | //Author: Hans Hjersing Dalsgaard, hans.dalsgaard@cern.ch | |
17 | // | |
18 | ||
19 | #include "TNamed.h" | |
20 | #include "TObjArray.h" | |
21 | #include "TClonesArray.h" | |
22 | #include "TFile.h" | |
23 | #include "iostream" | |
24 | #include "fstream" | |
25 | ||
26 | #include "AliRawReader.h" | |
27 | #include "AliFMDDigit.h" | |
28 | #include "AliFMDParameters.h" | |
29 | ||
30 | ||
31 | class AliFMDBaseDA: public TNamed { | |
32 | ||
33 | public: | |
34 | AliFMDBaseDA() ; | |
35 | AliFMDBaseDA(const AliFMDBaseDA & baseDA) ; | |
36 | AliFMDBaseDA& operator = (const AliFMDBaseDA & baseDA) ; | |
37 | ||
38 | ~AliFMDBaseDA() ; | |
39 | ||
40 | void Run(AliRawReader* fmdReader); | |
41 | void SetSaveDiagnostics(Bool_t save) {fSaveHistograms = save;} | |
42 | void SetRequiredEvents(Int_t nEvents) {fRequiredEvents = nEvents;} | |
43 | Int_t GetRequiredEvents() {return fRequiredEvents ;} | |
44 | protected: | |
45 | ||
46 | virtual void Init() = 0; | |
47 | virtual void FillChannels(AliFMDDigit* ) = 0; | |
48 | virtual void Analyse(UShort_t, Char_t, UShort_t, UShort_t ) = 0; | |
49 | virtual void WriteHeaderToFile() = 0; | |
50 | virtual void AddChannelContainer(TObjArray*, UShort_t, Char_t, UShort_t, UShort_t ) = 0; | |
51 | virtual void FinishEvent() = 0; | |
52 | ||
53 | ||
54 | Int_t GetCurrentEvent() {return fCurrentEvent;} | |
55 | ||
56 | static const UInt_t kBaseDDL = 3072; | |
57 | Char_t* fDiagnosticsFilename; | |
58 | std::ofstream fOutputFile; | |
59 | Bool_t fSaveHistograms; | |
60 | TObjArray fDetectorArray; | |
61 | ||
62 | ||
63 | private: | |
64 | ||
65 | ||
66 | void SetCurrentEvent(Int_t currentEvent) {fCurrentEvent = currentEvent; } | |
67 | void InitContainer(); | |
68 | Int_t fRequiredEvents; | |
69 | Int_t fCurrentEvent; | |
70 | ||
71 | ClassDef(AliFMDBaseDA,0) | |
72 | ||
73 | }; | |
74 | #endif | |
75 |