]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONRawWriter.h
Adding mask handling
[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
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>
a19e2543 16#include "AliMUONSubEventTracker.h"
2cbb173f 17#include "TStopwatch.h"
a19e2543 18
a19e2543 19class AliMUONDDLTracker;
20class AliMUONDDLTrigger;
2cbb173f 21class AliMUONData;
22class AliMUONDigit;
a19e2543 23class AliMUONGlobalTrigger;
24class AliMUONSubEventTrigger;
2cbb173f 25class AliMpBusPatch;
a19e2543 26class AliMpSegFactory;
27
28class AliMUONRawWriter : public TObject
29{
30 public:
2cbb173f 31 AliMUONRawWriter(AliMUONData* data); // Constructor
a19e2543 32 virtual ~AliMUONRawWriter(void); // Destructor
33
34 // write raw data
2cbb173f 35 Int_t Digits2Raw();
a19e2543 36
2cbb173f 37 void SetScalerEvent() {fScalerEvent = kTRUE;}
38
39private:
a19e2543 40
2cbb173f 41 void AddData(const AliMUONSubEventTracker& event)
42 {
a19e2543 43 TClonesArray &temp = *fSubEventArray;
2cbb173f 44 new(temp[temp.GetEntriesFast()]) AliMUONSubEventTracker(event);
a19e2543 45 }
46
2cbb173f 47 Int_t GetBusPatch(const AliMUONDigit& digit);
48
a19e2543 49 Int_t GetGlobalTriggerPattern(const AliMUONGlobalTrigger* gloTrg) const;
50
2cbb173f 51protected:
a19e2543 52 AliMUONRawWriter(); // Default constructor
53 AliMUONRawWriter (const AliMUONRawWriter& rhs); // copy constructor
54 AliMUONRawWriter& operator=(const AliMUONRawWriter& rhs); // assignment operator
55
2cbb173f 56 // writing raw data
57 Int_t WriteTrackerDDL(Int_t iCh);
58 Int_t WriteTriggerDDL();
59
a19e2543 60 private:
61
62 AliMUONData* fMUONData; //! Data container for MUON subsystem
63
a19e2543 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
ced309a5 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
2cbb173f 80
81 TStopwatch fTrackerTimer; //!
82 TStopwatch fTriggerTimer; //!
83 TStopwatch fMappingTimer; //!
84
85 AliMpSegFactory* fSegFactory; //!
86
87 ClassDef(AliMUONRawWriter,0) // MUON cluster reconstructor in ALICE
a19e2543 88};
89
90#endif