]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONRawWriter.h
Fixes in wirting of raw data needed on big-endian platforms (Marco)
[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 AliMUONStopwatchGroup;
27 class AliMUONVDigitStore;
28 class AliMUONVTriggerStore;
29 class AliMpDDLStore;
30 class AliMpExMap;
31
32 class AliMUONRawWriter : public TObject 
33 {
34  public:
35   AliMUONRawWriter(); // Constructor
36   virtual ~AliMUONRawWriter(); // Destructor
37     
38   // write raw data
39   Int_t Digits2Raw(AliMUONVDigitStore* digitStore, AliMUONVTriggerStore* triggerStore);
40   
41   void SetScalersNumbers();
42
43 private:
44
45   void Digits2BusPatchMap(const AliMUONVDigitStore& digitStore, AliMpExMap& busPatchMap);
46   void WriteTrackerDDL(AliMpExMap& busPatchMap, Int_t iDDL);
47
48   //void WriteBusPatch(AliMUONLocalBusStruct* busStruct);
49   
50   Int_t WriteTriggerDDL(const AliMUONVTriggerStore& triggerStore, AliFstream* file[2]);
51   
52   Int_t GetBusPatch(const AliMUONVDigit& digit) const;
53
54 private:
55   /// Not implemented copy constructor
56   AliMUONRawWriter (const AliMUONRawWriter& rhs); // copy constructor
57   /// Not implemented assignment operator
58   AliMUONRawWriter& operator=(const AliMUONRawWriter& rhs);
59
60  static void LocalWordPacking(UInt_t &word, UInt_t locId, UInt_t locDec, 
61                               UInt_t trigY, UInt_t posY, UInt_t posX, 
62                               UInt_t sdevX, UInt_t devX);
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   AliMpDDLStore*            fDDLStore;     //!< DDL store pointer
71
72   Bool_t fScalerEvent;               ///< flag to generates scaler event
73
74   AliRawDataHeader    fHeader;           ///< header of DDL
75   
76   AliMUONStopwatchGroup* fTimers;             //!< time watchers
77
78   Int_t fBufferSize; //!< size of internal data buffer
79   Int_t* fBuffer; //!< internal data buffer
80
81   ClassDef(AliMUONRawWriter,3) // MUON cluster reconstructor in ALICE
82 };
83         
84 #endif