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