]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONRawWriter.h
bugfix: AliTPCCalibPulser.h dependency and protection corrected
[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 base
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 #include "AliFstream.h"
17
18 class AliMUONBlockHeader;
19 class AliMUONBusStruct;
20 class AliMUONDarcHeader;
21 class AliMUONVDigit;
22 class AliMUONDspHeader;
23 class AliMUONGlobalTrigger;
24 class AliMUONLocalStruct;
25 class AliMUONRegHeader;
26 class AliMUONVDigitStore;
27 class AliMUONVTriggerStore;
28 class AliMpDDLStore;
29 class AliMpExMap;
30
31 class AliMUONRawWriter : public TObject 
32 {
33  public:
34   AliMUONRawWriter(); // Constructor
35   virtual ~AliMUONRawWriter(); // Destructor
36     
37   // write raw data
38   Int_t Digits2Raw(AliMUONVDigitStore* digitStore, AliMUONVTriggerStore* triggerStore);
39   
40   void SetScalersNumbers();
41
42 private:
43
44   void Digits2BusPatchMap(const AliMUONVDigitStore& digitStore, AliMpExMap& busPatchMap);
45   void WriteTrackerDDL(AliMpExMap& busPatchMap, Int_t iDDL);
46
47   //void WriteBusPatch(AliMUONLocalBusStruct* busStruct);
48   
49   Int_t WriteTriggerDDL(const AliMUONVTriggerStore& triggerStore, AliFstream* file[2]);
50   
51   Int_t GetBusPatch(const AliMUONVDigit& digit) const;
52
53 private:
54   /// Not implemented copy constructor
55   AliMUONRawWriter (const AliMUONRawWriter& rhs); // copy constructor
56   /// Not implemented assignment operator
57   AliMUONRawWriter& operator=(const AliMUONRawWriter& rhs);
58
59  static void LocalWordPacking(UInt_t &word, UInt_t locId, UInt_t locDec, 
60                               UInt_t trigY, UInt_t posY, UInt_t posX, 
61                               UInt_t sdevX, UInt_t devX);
62
63   AliMUONBlockHeader* fBlockHeader;  //!< DDL block header class pointers
64   AliMUONDspHeader*   fDspHeader;    //!< DDL Dsp header class pointers
65   AliMUONDarcHeader*  fDarcHeader;   //!< DDL darc header class pointers
66   AliMUONRegHeader*   fRegHeader;    //!< DDL regional header class pointers
67   AliMUONLocalStruct* fLocalStruct;  //!< DDL local structure class pointers
68
69   AliMpDDLStore*            fDDLStore;     //!< DDL store pointer
70
71   Bool_t fScalerEvent;               ///< flag to generates scaler event
72
73   AliRawDataHeader    fHeader;           ///< header of DDL
74   
75   Int_t fBufferSize; //!< size of internal data buffer
76   Int_t* fBuffer; //!< internal data buffer
77
78   ClassDef(AliMUONRawWriter,4) // MUON cluster reconstructor in ALICE
79 };
80         
81 #endif