Rewritten using new VDigitStore and VDigit interfaces (Laurent)
[u/mrichter/AliRoot.git] / MUON / AliMUONDigitMaker.h
CommitLineData
a3283a4c 1#ifndef ALIMUONDIGITMAKER_H
2#define ALIMUONDIGITMAKER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/*$Id$*/
7
241560c2 8/// \ingroup base
a3283a4c 9/// \class AliMUONDigitMaker
78649106 10/// \brief Reading Raw data class for trigger and tracker chambers
a3283a4c 11///
78649106 12// Author: Ch, Finck
a3283a4c 13
14#include <TObject.h>
15#include "TStopwatch.h"
8a91c35f 16
17class TList;
7771752e 18class TArrayS;
8a91c35f 19
00e86732 20class AliRawReader;
a3283a4c 21class AliMUONData;
22class AliMUONDigit;
23class AliMUONGlobalTrigger;
24class AliMUONLocalTrigger;
d53fb0de 25class AliMUONTriggerCrateStore;
d2d759cf 26class AliMUONLocalStruct;
a3283a4c 27
a3283a4c 28class AliMUONRawStreamTracker;
29class AliMUONRawStreamTrigger;
30
31class AliMUONDigitMaker : public TObject
32{
33 public:
241560c2 34 AliMUONDigitMaker(Bool_t digit = kTRUE); // Constructor
a3283a4c 35 virtual ~AliMUONDigitMaker(void); // Destructor
36
37 // write raw data
38 Int_t Raw2Digits(AliRawReader* rawReader);
39
40 Int_t ReadTrackerDDL(AliRawReader* rawReader);
41 Int_t ReadTriggerDDL(AliRawReader* rawReader);
9265505b 42
43 /// Return MUON data
a3283a4c 44 AliMUONData* GetMUONData() const {return fMUONData;}
9265505b 45 /// Set MUON data
a3283a4c 46 void SetMUONData(AliMUONData* data) {fMUONData = data;}
47
48 Int_t GetMapping(Int_t buspatchId, UShort_t manuId,
49 UChar_t channelId, AliMUONDigit* digit );
50
7771752e 51 Int_t TriggerDigits(Int_t nBoard, TArrayS* xyPattern, TList& digitList );
d2d759cf 52
9265505b 53 /// Set flag to generates scaler event
a3283a4c 54 void SetScalerEvent() {fScalerEvent = kTRUE;}
55
e604ac4c 56 /// Disable trigger rawdata reading
57 void DisableTrigger() {fTriggerFlag = kFALSE;}
58
9265505b 59 /// Set Crate array
fe5010dd 60 void SetCrateManager(AliMUONTriggerCrateStore* crateManager) {fCrateManager = crateManager;}
61
d000f173 62 /// enable only list of digits for the display
63 void SetDisplayFlag() { fDisplayFlag = kTRUE; fDigitFlag = kFALSE;}
8a91c35f 64
8a91c35f 65
a3283a4c 66 private:
71a2d3aa 67 /// Not implemented
68 AliMUONDigitMaker (const AliMUONDigitMaker& rhs); // copy constructor
69 /// Not implemented
70 AliMUONDigitMaker& operator=(const AliMUONDigitMaker& rhs); // assignment operator
71
72 void GetCrateName(Char_t* name, Int_t iDDL, Int_t iReg) const;
a3283a4c 73
829425a5 74 AliMUONData* fMUONData; //!< Data container for MUON subsystem
a3283a4c 75
829425a5 76 Bool_t fScalerEvent; //!< flag to generates scaler event
a3283a4c 77
8a91c35f 78 Bool_t fDigitFlag; //!< true for Digit, false for SDigit
241560c2 79
e604ac4c 80 Bool_t fTriggerFlag; //!< true for reading also trigger rawdata
81
8a91c35f 82 Bool_t fDisplayFlag; //!< true for returning digits list to the display
83
829425a5 84 AliMUONRawStreamTracker* fRawStreamTracker; //!< pointer of raw stream for tracker
85 AliMUONRawStreamTrigger* fRawStreamTrigger; //!< pointer of raw stream for trigger
a3283a4c 86
ce373c77 87 AliMUONDigit* fDigit; //!< pointer to digits
a3283a4c 88
ce373c77 89 AliMUONLocalTrigger* fLocalTrigger; //!< pointer to local trigger
90 AliMUONGlobalTrigger* fGlobalTrigger; //!< pointer to local trigger
a3283a4c 91
d53fb0de 92 AliMUONTriggerCrateStore* fCrateManager; //!< Crate array
93
ce373c77 94 TStopwatch fTrackerTimer; //!< time watcher for tracker part
95 TStopwatch fTriggerTimer; //!< time watcher for trigger part
96 TStopwatch fMappingTimer; //!< time watcher for mapping-tracker part
a3283a4c 97
98 ClassDef(AliMUONDigitMaker,1) // MUON digit maker from rawdata
99};
100
101#endif