]>
Commit | Line | Data |
---|---|---|
a19e2543 | 1 | #ifndef ALIMUONRAWWRITER_H |
2 | #define ALIMUONRAWWRITER_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 | ||
8 | /// \ingroup rec | |
9 | /// \class AliMUONRawWriter | |
10 | /// \brief Raw data class for trigger and tracker chambers | |
11 | /// | |
12 | /// Writring Raw data class for trigger and tracker chambers | |
13 | ||
14 | #include <TObject.h> | |
15 | #include <TClonesArray.h> | |
2cf44ef3 | 16 | #include "AliMUONBusStruct.h" |
17 | #include "AliRawDataHeader.h" | |
2cbb173f | 18 | #include "TStopwatch.h" |
a19e2543 | 19 | |
2cbb173f | 20 | class AliMUONData; |
21 | class AliMUONDigit; | |
2cf44ef3 | 22 | class AliMUONDspHeader; |
23 | class AliMUONBlockHeader; | |
24 | class AliMUONDarcHeader; | |
25 | class AliMUONRegHeader; | |
26 | class AliMUONLocalStruct; | |
a19e2543 | 27 | class AliMUONGlobalTrigger; |
2cbb173f | 28 | class AliMpBusPatch; |
a844d67f | 29 | class AliMUONTriggerCrateStore; |
a19e2543 | 30 | class AliMpSegFactory; |
31 | ||
32 | class AliMUONRawWriter : public TObject | |
33 | { | |
34 | public: | |
2cbb173f | 35 | AliMUONRawWriter(AliMUONData* data); // Constructor |
2cf44ef3 | 36 | virtual ~AliMUONRawWriter(); // Destructor |
a19e2543 | 37 | |
38 | // write raw data | |
2cbb173f | 39 | Int_t Digits2Raw(); |
a19e2543 | 40 | |
84ceeb06 | 41 | void SetScalersNumbers(); |
42 | ||
8778870d | 43 | protected: |
44 | AliMUONRawWriter(); // Default constructor | |
45 | AliMUONRawWriter (const AliMUONRawWriter& rhs); // copy constructor | |
46 | AliMUONRawWriter& operator=(const AliMUONRawWriter& rhs); // assignment operator | |
47 | ||
48 | // writing raw data | |
49 | Int_t WriteTrackerDDL(Int_t iCh); | |
50 | Int_t WriteTriggerDDL(); | |
51 | ||
2cbb173f | 52 | private: |
a19e2543 | 53 | |
2cf44ef3 | 54 | void AddData(const AliMUONBusStruct& event) |
2cbb173f | 55 | { |
2cf44ef3 | 56 | TClonesArray &temp = *fBusArray; |
57 | new(temp[temp.GetEntriesFast()]) AliMUONBusStruct(event); | |
a19e2543 | 58 | } |
59 | ||
2cbb173f | 60 | Int_t GetBusPatch(const AliMUONDigit& digit); |
a844d67f | 61 | void GetCrateName(Char_t* name, Int_t iDDL, Int_t iReg); |
62 | ||
a19e2543 | 63 | Int_t GetGlobalTriggerPattern(const AliMUONGlobalTrigger* gloTrg) const; |
64 | ||
8778870d | 65 | private: |
a19e2543 | 66 | |
829425a5 | 67 | AliMUONData* fMUONData; //!< Data container for MUON subsystem |
a19e2543 | 68 | |
1d81a83f | 69 | FILE* fFile[4]; //!< DDL binary file pointer one per 1/2 chamber, 4 for one station |
a19e2543 | 70 | |
829425a5 | 71 | TClonesArray* fBusArray; //!< array to sub event tracker |
a19e2543 | 72 | |
829425a5 | 73 | AliMUONBlockHeader* fBlockHeader; //!< DDL block header class pointers |
74 | AliMUONDspHeader* fDspHeader; //!< DDL Dsp header class pointers | |
75 | AliMUONBusStruct* fBusStruct; //!< DDL bus patch structure class pointers | |
76 | AliMUONDarcHeader* fDarcHeader; //!< DDL darc header class pointers | |
77 | AliMUONRegHeader* fRegHeader; //!< DDL regional header class pointers | |
78 | AliMUONLocalStruct* fLocalStruct; //!< DDL local structure class pointers | |
a19e2543 | 79 | |
a844d67f | 80 | AliMpBusPatch* fBusPatchManager; //!< buspatch versus DE's & DDL |
81 | AliMUONTriggerCrateStore* fCrateManager; //!< Crate array | |
ced309a5 | 82 | |
829425a5 | 83 | Bool_t fScalerEvent; ///< flag to generates scaler event |
ced309a5 | 84 | |
829425a5 | 85 | AliRawDataHeader fHeader; ///< header of DDL |
2cf44ef3 | 86 | |
829425a5 | 87 | static Int_t fgManuPerBusSwp1B[12]; //!< array containing the first manuId for each buspatch st1, Bending |
88 | static Int_t fgManuPerBusSwp1NB[12]; //!< array containing the first manuId for each buspatch st1, NBending | |
ced309a5 | 89 | |
829425a5 | 90 | static Int_t fgManuPerBusSwp2B[12]; //!< array containing the first manuId for each buspatch st2, Bending |
91 | static Int_t fgManuPerBusSwp2NB[12]; //!< array containing the first manuId for each buspatch st2, NBending | |
2cbb173f | 92 | |
ce373c77 | 93 | TStopwatch fTrackerTimer; //!< time watcher for tracker part |
94 | TStopwatch fTriggerTimer; //!< time watcher for trigger part | |
95 | TStopwatch fMappingTimer; //!< time watcher for mapping-tracker part | |
2cbb173f | 96 | |
829425a5 | 97 | AliMpSegFactory* fSegFactory; //!< mapping segmentation factory |
2cbb173f | 98 | |
2cf44ef3 | 99 | ClassDef(AliMUONRawWriter,1) // MUON cluster reconstructor in ALICE |
a19e2543 | 100 | }; |
101 | ||
102 | #endif |