]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONRawWriter.h
Make this class non static, correct a bug (float instead of double) in ReadPCB, and...
[u/mrichter/AliRoot.git] / MUON / AliMUONRawWriter.h
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 sim
9 /// \class AliMUONRawWriter
10 /// \brief Raw data class for trigger and tracker chambers
11 ///
12 /// \author Christian Finck and Laurent Aphecetche, Subatech
13
14 #include <TObject.h>
15 #include "AliRawDataHeader.h"
16
17 class AliMUONData;
18 class AliMUONDigit;
19 class AliMUONDspHeader;
20 class AliMUONBlockHeader;
21 class AliMUONDarcHeader;
22 class AliMUONRegHeader;
23 class AliMUONLocalStruct;
24 class AliMpExMap;
25 class AliMUONBusStruct;
26 class AliMUONGlobalTrigger;
27 class AliMpBusPatch;
28 class AliMUONTriggerCrateStore;
29 class TStopwatch;
30
31 class AliMUONRawWriter : public TObject 
32 {
33  public:
34   AliMUONRawWriter(AliMUONData* data); // Constructor
35   virtual ~AliMUONRawWriter(); // Destructor
36     
37   // write raw data
38   Int_t Digits2Raw();
39
40   void SetScalersNumbers();
41
42 protected:
43   AliMUONRawWriter();                  // Default constructor
44
45   // writing raw data
46   Int_t WriteTrackerDDL(Int_t iCh);
47   Int_t WriteTriggerDDL();
48   
49 private:
50
51     void AddData(const AliMUONBusStruct& event);
52
53   Int_t GetBusPatch(const AliMUONDigit& digit) const;
54   Int_t GetBusPatch(Int_t detElemId, Int_t manuId) const;
55
56   Int_t GetGlobalTriggerPattern(const AliMUONGlobalTrigger* gloTrg) const;
57
58 private:
59
60   AliMUONData*  fMUONData;           //!< Data container for MUON subsystem 
61  
62   FILE*         fFile[4];            //!< DDL binary file pointer one per 1/2 chamber, 4 for one station
63
64   AliMUONBlockHeader* fBlockHeader;  //!< DDL block header class pointers
65   AliMUONDspHeader*   fDspHeader;    //!< DDL Dsp header class pointers
66   AliMUONDarcHeader*  fDarcHeader;   //!< DDL darc header class pointers
67   AliMUONRegHeader*   fRegHeader;    //!< DDL regional header class pointers
68   AliMUONLocalStruct* fLocalStruct;  //!< DDL local structure class pointers
69
70   AliMpBusPatch*            fBusPatchManager; //!< buspatch versus DE's & DDL
71   AliMUONTriggerCrateStore* fCrateManager;    //!< Crate array
72
73   Bool_t fScalerEvent;               ///< flag to generates scaler event
74
75   AliRawDataHeader    fHeader;           ///< header of DDL
76
77   static Int_t fgManuPerBusSwp1B[12];   //!< array containing the first manuId for each buspatch st1, Bending
78   static Int_t fgManuPerBusSwp1NB[12];  //!< array containing the first manuId for each buspatch st1, NBending
79
80   static Int_t fgManuPerBusSwp2B[12];   //!< array containing the first manuId for each buspatch st2, Bending
81   static Int_t fgManuPerBusSwp2NB[12];  //!< array containing the first manuId for each buspatch st2, NBending
82   
83   TStopwatch* fTimers;             //!< time watchers
84   
85   AliMUONRawWriter (const AliMUONRawWriter& rhs); // copy constructor
86   AliMUONRawWriter& operator=(const AliMUONRawWriter& rhs); // assignment operator
87
88   ClassDef(AliMUONRawWriter,2) // MUON cluster reconstructor in ALICE
89 };
90         
91 #endif