Thread libraries filtered out
[u/mrichter/AliRoot.git] / TOF / AliTOFMerger.h
CommitLineData
517b7f8f 1#ifndef ALITOFMERGER_H
2#define ALITOFMERGER_H
3/* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6// #include "AliMerger.h"
7// #include "AliMergable.h"
8#include "TRandom.h"
9#include "AliDetector.h"
bd0c63ae 10#include "AliTOF.h"
517b7f8f 11
12typedef enum {kDigitize=0, kMerge = 1} MergeMode_t;
13
14class AliTOFMerger {
15 public:
16
17 AliTOFMerger();
18 virtual ~AliTOFMerger();
19
20
21 // Initialize merging and digitisation
22 virtual void Init();
23
24 // Do the main work
25 void Digitise() ;
517b7f8f 26 TClonesArray *SDigits() const {return fSDigits;}
27
bd0c63ae 28 void ReadWriteDigit(Int_t);
517b7f8f 29
30 // Setters -> Later Communication with gAlice
31 void SetSignalEventNumber(Int_t i) {fEvNrSig = i;}
32 void SetBackgroundEventNumber(Int_t i) {fEvNrBgr = i;}
33 void SetBackgroundFileName(char* file) {fFnBgr = file;}
34 void SetSignalFileName(char* file) {fFnSig = file;}
35 void SetMode(MergeMode_t mode) {fMerge = mode;}
36
517b7f8f 37 enum {kBgTag = -1};
38
39 private:
40 // Open the bgr file
41 TFile *InitBgr();
42
43
44 private:
45 TClonesArray *fDigits; // ! array with digits
46 TClonesArray *fSDigits ; // List of summable digits
bd0c63ae 47 Int_t fNDigits; // number of digits
517b7f8f 48 Int_t fEvNrSig; // signal event number
49 Int_t fEvNrBgr; // background event number
50 MergeMode_t fMerge; // merging type kDigitize, kMerge
51 char *fFnBgr; // background file name
52 char *fFnSig; // signal file name
53 TFile *fBgrFile; // Pointer to background file
54
55 ClassDef(AliTOFMerger,0)
56};
57#endif
58