]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONRawWriter.h
- All mapping enums within namespace (AliMp).
[u/mrichter/AliRoot.git] / MUON / AliMUONRawWriter.h
CommitLineData
a19e2543 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
344ef20f 8/// \ingroup sim
a19e2543 9/// \class AliMUONRawWriter
10/// \brief Raw data class for trigger and tracker chambers
11///
344ef20f 12/// \author Christian Finck and Laurent Aphecetche, Subatech
a19e2543 13
14#include <TObject.h>
2cf44ef3 15#include "AliRawDataHeader.h"
a19e2543 16
2cbb173f 17class AliMUONData;
18class AliMUONDigit;
2cf44ef3 19class AliMUONDspHeader;
20class AliMUONBlockHeader;
21class AliMUONDarcHeader;
22class AliMUONRegHeader;
23class AliMUONLocalStruct;
344ef20f 24class AliMpExMap;
25class AliMUONBusStruct;
a19e2543 26class AliMUONGlobalTrigger;
2cbb173f 27class AliMpBusPatch;
a844d67f 28class AliMUONTriggerCrateStore;
344ef20f 29class TStopwatch;
a19e2543 30
31class AliMUONRawWriter : public TObject
32{
33 public:
2cbb173f 34 AliMUONRawWriter(AliMUONData* data); // Constructor
2cf44ef3 35 virtual ~AliMUONRawWriter(); // Destructor
a19e2543 36
37 // write raw data
2cbb173f 38 Int_t Digits2Raw();
a19e2543 39
84ceeb06 40 void SetScalersNumbers();
41
8778870d 42protected:
43 AliMUONRawWriter(); // Default constructor
8778870d 44
45 // writing raw data
46 Int_t WriteTrackerDDL(Int_t iCh);
47 Int_t WriteTriggerDDL();
48
2cbb173f 49private:
a19e2543 50
344ef20f 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;
a844d67f 55
a19e2543 56 Int_t GetGlobalTriggerPattern(const AliMUONGlobalTrigger* gloTrg) const;
57
8778870d 58private:
a19e2543 59
829425a5 60 AliMUONData* fMUONData; //!< Data container for MUON subsystem
a19e2543 61
1d81a83f 62 FILE* fFile[4]; //!< DDL binary file pointer one per 1/2 chamber, 4 for one station
344ef20f 63
829425a5 64 AliMUONBlockHeader* fBlockHeader; //!< DDL block header class pointers
65 AliMUONDspHeader* fDspHeader; //!< DDL Dsp header class pointers
829425a5 66 AliMUONDarcHeader* fDarcHeader; //!< DDL darc header class pointers
67 AliMUONRegHeader* fRegHeader; //!< DDL regional header class pointers
68 AliMUONLocalStruct* fLocalStruct; //!< DDL local structure class pointers
a19e2543 69
a844d67f 70 AliMpBusPatch* fBusPatchManager; //!< buspatch versus DE's & DDL
71 AliMUONTriggerCrateStore* fCrateManager; //!< Crate array
ced309a5 72
829425a5 73 Bool_t fScalerEvent; ///< flag to generates scaler event
ced309a5 74
829425a5 75 AliRawDataHeader fHeader; ///< header of DDL
2cf44ef3 76
829425a5 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
ced309a5 79
829425a5 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
2cbb173f 82
344ef20f 83 TStopwatch* fTimers; //!< time watchers
2cbb173f 84
9f5dcca3 85 AliMUONRawWriter (const AliMUONRawWriter& rhs); // copy constructor
86 AliMUONRawWriter& operator=(const AliMUONRawWriter& rhs); // assignment operator
87
344ef20f 88 ClassDef(AliMUONRawWriter,2) // MUON cluster reconstructor in ALICE
a19e2543 89};
90
91#endif