]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONRawWriter.h
Loading libraries needed for reading & decoding rawdata
[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 "AliMUONSubEventTracker.h"
17 #include "TStopwatch.h"
18
19 class AliMUONDDLTracker;
20 class AliMUONDDLTrigger;
21 class AliMUONData;
22 class AliMUONDigit;
23 class AliMUONGlobalTrigger;
24 class AliMUONSubEventTrigger;
25 class AliMpBusPatch;
26 class AliMpSegFactory;
27
28 class AliMUONRawWriter : public TObject 
29 {
30  public:
31   AliMUONRawWriter(AliMUONData* data); // Constructor
32   virtual ~AliMUONRawWriter(void); // Destructor
33     
34   // write raw data
35   Int_t Digits2Raw();
36
37   void  SetScalerEvent() {fScalerEvent = kTRUE;}
38   
39 protected:
40   AliMUONRawWriter();                  // Default constructor
41   AliMUONRawWriter (const AliMUONRawWriter& rhs); // copy constructor
42   AliMUONRawWriter& operator=(const AliMUONRawWriter& rhs); // assignment operator
43
44   // writing raw data
45   Int_t WriteTrackerDDL(Int_t iCh);
46   Int_t WriteTriggerDDL();
47   
48 private:
49
50   void AddData(const AliMUONSubEventTracker& event)
51   {
52     TClonesArray &temp = *fSubEventArray;
53     new(temp[temp.GetEntriesFast()]) AliMUONSubEventTracker(event); 
54   }
55
56   Int_t GetBusPatch(const AliMUONDigit& digit);
57   
58   Int_t GetGlobalTriggerPattern(const AliMUONGlobalTrigger* gloTrg) const;
59
60 private:
61
62   AliMUONData*  fMUONData;           //! Data container for MUON subsystem 
63  
64   FILE*         fFile[2];            //! DDL binary file pointer one per 1/2 chamber
65
66   TClonesArray* fSubEventArray;      //! array to sub event tracker
67    
68   AliMUONDDLTracker* fDDLTracker;    //! DDL tracker class pointers
69   AliMUONDDLTrigger* fDDLTrigger;    //! DDL trigger class pointers
70
71   AliMpBusPatch* fBusPatchManager;   //! buspatch versus DE's & DDL
72
73   Bool_t fScalerEvent;               // flag to generates scaler event
74
75   static Int_t fgManuPerBusSwp1B[12];   //! array containing the first manuId for each buspatch st1, Bending
76   static Int_t fgManuPerBusSwp1NB[12];  //! array containing the first manuId for each buspatch st1, NBending
77
78   static Int_t fgManuPerBusSwp2B[12];   //! array containing the first manuId for each buspatch st2, Bending
79   static Int_t fgManuPerBusSwp2NB[12];  //! array containing the first manuId for each buspatch st2, NBending
80   
81   TStopwatch fTrackerTimer; //!
82   TStopwatch fTriggerTimer; //!
83   TStopwatch fMappingTimer; //!
84   
85   AliMpSegFactory* fSegFactory; //!
86   
87   ClassDef(AliMUONRawWriter,0) // MUON cluster reconstructor in ALICE
88 };
89         
90 #endif