4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
7 * See cxx source for full Copyright notice
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.
16 //Author: Hans Hjersing Dalsgaard, hans.dalsgaard@cern.ch
20 #include "TObjArray.h"
21 #include "TClonesArray.h"
26 #include "AliRawReader.h"
27 #include "AliFMDDigit.h"
28 #include "AliFMDParameters.h"
31 class AliFMDBaseDA: public TNamed {
35 AliFMDBaseDA(const AliFMDBaseDA & baseDA) ;
36 // AliFMDBaseDA& operator = (const AliFMDBaseDA & baseDA) ;
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 ;}
46 virtual void Init() {};
47 virtual void FillChannels(AliFMDDigit* ) {};
48 virtual void Analyse(UShort_t, Char_t, UShort_t, UShort_t ) {};
49 virtual void WriteHeaderToFile() {};
50 virtual void AddChannelContainer(TObjArray*, UShort_t, Char_t, UShort_t, UShort_t ) {};
51 virtual void FinishEvent() {};
54 Int_t GetCurrentEvent() {return fCurrentEvent;}
56 static const UInt_t kBaseDDL = 3072;
57 Char_t* fDiagnosticsFilename;
58 std::ofstream fOutputFile;
59 std::ofstream fConditionsFile;
60 Bool_t fSaveHistograms;
61 TObjArray fDetectorArray;
66 void WriteConditionsData();
67 void SetCurrentEvent(Int_t currentEvent) {fCurrentEvent = currentEvent; }
69 Int_t fRequiredEvents;
72 ClassDef(AliFMDBaseDA,0)