/*$Id$*/
-/// \ingroup sim
+/// \ingroup base
/// \class AliMUONRawWriter
/// \brief Raw data class for trigger and tracker chambers
///
-/// \author Christian Finck and Laurent Aphecetche, Subatech
+// Author Christian Finck and Laurent Aphecetche, Subatech
#include <TObject.h>
#include "AliRawDataHeader.h"
+#include "AliFstream.h"
-class AliMUONData;
-class AliMUONDigit;
-class AliMUONDspHeader;
class AliMUONBlockHeader;
+class AliMUONBusStruct;
class AliMUONDarcHeader;
-class AliMUONRegHeader;
+class AliMUONVDigit;
+class AliMUONDspHeader;
+class AliMUONGlobalTrigger;
class AliMUONLocalStruct;
+class AliMUONRegHeader;
+class AliMUONVDigitStore;
+class AliMUONVTriggerStore;
+class AliMpDDLStore;
class AliMpExMap;
-class AliMUONBusStruct;
-class AliMUONGlobalTrigger;
-class AliMpBusPatch;
-class AliMUONTriggerCrateStore;
-class AliMpSegFactory;
-class TStopwatch;
class AliMUONRawWriter : public TObject
{
public:
- AliMUONRawWriter(AliMUONData* data); // Constructor
+ AliMUONRawWriter(); // Constructor
virtual ~AliMUONRawWriter(); // Destructor
// write raw data
- Int_t Digits2Raw();
-
+ Int_t Digits2Raw(AliMUONVDigitStore* digitStore, AliMUONVTriggerStore* triggerStore);
+
void SetScalersNumbers();
-protected:
- AliMUONRawWriter(); // Default constructor
-
- // writing raw data
- Int_t WriteTrackerDDL(Int_t iCh);
- Int_t WriteTriggerDDL();
-
private:
- void AddData(const AliMUONBusStruct& event);
-
- Int_t GetBusPatch(const AliMUONDigit& digit) const;
- Int_t GetBusPatch(Int_t detElemId, Int_t manuId) const;
+ void Digits2BusPatchMap(const AliMUONVDigitStore& digitStore, AliMpExMap& busPatchMap);
+ void WriteTrackerDDL(AliMpExMap& busPatchMap, Int_t iDDL);
- Int_t GetGlobalTriggerPattern(const AliMUONGlobalTrigger* gloTrg) const;
+ //void WriteBusPatch(AliMUONLocalBusStruct* busStruct);
+
+ Int_t WriteTriggerDDL(const AliMUONVTriggerStore& triggerStore, AliFstream* file[2]);
+
+ Int_t GetBusPatch(const AliMUONVDigit& digit) const;
private:
+ /// Not implemented copy constructor
+ AliMUONRawWriter (const AliMUONRawWriter& rhs); // copy constructor
+ /// Not implemented assignment operator
+ AliMUONRawWriter& operator=(const AliMUONRawWriter& rhs);
- AliMUONData* fMUONData; //!< Data container for MUON subsystem
-
- FILE* fFile[4]; //!< DDL binary file pointer one per 1/2 chamber, 4 for one station
+ static void LocalWordPacking(UInt_t &word, UInt_t locId, UInt_t locDec,
+ UInt_t trigY, UInt_t posY, UInt_t posX,
+ UInt_t sdevX, UInt_t devX);
AliMUONBlockHeader* fBlockHeader; //!< DDL block header class pointers
AliMUONDspHeader* fDspHeader; //!< DDL Dsp header class pointers
AliMUONRegHeader* fRegHeader; //!< DDL regional header class pointers
AliMUONLocalStruct* fLocalStruct; //!< DDL local structure class pointers
- AliMpBusPatch* fBusPatchManager; //!< buspatch versus DE's & DDL
- AliMUONTriggerCrateStore* fCrateManager; //!< Crate array
+ AliMpDDLStore* fDDLStore; //!< DDL store pointer
Bool_t fScalerEvent; ///< flag to generates scaler event
AliRawDataHeader fHeader; ///< header of DDL
-
- static Int_t fgManuPerBusSwp1B[12]; //!< array containing the first manuId for each buspatch st1, Bending
- static Int_t fgManuPerBusSwp1NB[12]; //!< array containing the first manuId for each buspatch st1, NBending
-
- static Int_t fgManuPerBusSwp2B[12]; //!< array containing the first manuId for each buspatch st2, Bending
- static Int_t fgManuPerBusSwp2NB[12]; //!< array containing the first manuId for each buspatch st2, NBending
-
- TStopwatch* fTimers; //!< time watchers
- AliMpSegFactory* fSegFactory; //!< mapping segmentation factory
-
- AliMUONRawWriter (const AliMUONRawWriter& rhs); // copy constructor
- AliMUONRawWriter& operator=(const AliMUONRawWriter& rhs); // assignment operator
+ Int_t fBufferSize; //!< size of internal data buffer
+ Int_t* fBuffer; //!< internal data buffer
- ClassDef(AliMUONRawWriter,2) // MUON cluster reconstructor in ALICE
+ ClassDef(AliMUONRawWriter,4) // MUON cluster reconstructor in ALICE
};
#endif