]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONRawWriter.h
remoe duplicate QA initialisation and do ESD QA for same detectors as RecPoint QA
[u/mrichter/AliRoot.git] / MUON / AliMUONRawWriter.h
index 426e90b88dd2a0621e99a5ae3567439c2c3e92cc..006766f7da4374f18d9e78b57a0bb60e58cf3843 100644 (file)
@@ -5,95 +5,80 @@
 
 /*$Id$*/
 
-/// \ingroup rec
+/// \ingroup base
 /// \class AliMUONRawWriter
 /// \brief Raw data class for trigger and tracker chambers
 ///
-/// Writring Raw data class for trigger and tracker chambers
+//  Author Christian Finck and Laurent Aphecetche, Subatech
 
 #include <TObject.h>
-#include <TClonesArray.h>
-#include "AliMUONBusStruct.h"
-#include "AliRawDataHeader.h"
-#include "TStopwatch.h"
+#include "AliFstream.h"
 
-class AliMUONData;
-class AliMUONDigit;
-class AliMUONDspHeader;
 class AliMUONBlockHeader;
+class AliMUONBusStruct;
 class AliMUONDarcHeader;
-class AliMUONRegHeader;
-class AliMUONLocalStruct;
+class AliMUONVDigit;
+class AliMUONDspHeader;
 class AliMUONGlobalTrigger;
-class AliMpBusPatch;
-class AliMpSegFactory;
+class AliMUONLocalStruct;
+class AliMUONRegHeader;
+class AliMUONVDigitStore;
+class AliMUONVTriggerStore;
+class AliMpDDLStore;
+class AliMpExMap;
+class AliRawDataHeaderSim;
 
 class AliMUONRawWriter : public TObject 
 {
  public:
-  AliMUONRawWriter(AliMUONData* data); // Constructor
+  AliMUONRawWriter(); // Constructor
   virtual ~AliMUONRawWriter(); // Destructor
     
   // write raw data
-  Int_t Digits2Raw();
-
-  void  SetScalerEvent() {fScalerEvent = kTRUE;}
+  Int_t Digits2Raw(AliMUONVDigitStore* digitStore, AliMUONVTriggerStore* triggerStore);
   
-protected:
-  AliMUONRawWriter();                  // Default constructor
-  AliMUONRawWriter (const AliMUONRawWriter& rhs); // copy constructor
-  AliMUONRawWriter& operator=(const AliMUONRawWriter& rhs); // assignment operator
+  void SetScalersNumbers();
+
+  /// Set the header of DDL
+  void SetHeader(AliRawDataHeaderSim& header) {fHeader = &header;}
 
-  // writing raw data
-  Int_t WriteTrackerDDL(Int_t iCh);
-  Int_t WriteTriggerDDL();
-  
 private:
 
-  void AddData(const AliMUONBusStruct& event)
-  {
-    TClonesArray &temp = *fBusArray;
-    new(temp[temp.GetEntriesFast()]) AliMUONBusStruct(event); 
-  }
+  void Digits2BusPatchMap(const AliMUONVDigitStore& digitStore, AliMpExMap& busPatchMap);
+  void WriteTrackerDDL(AliMpExMap& busPatchMap, Int_t iDDL);
 
-  Int_t GetBusPatch(const AliMUONDigit& digit);
+  //void WriteBusPatch(AliMUONLocalBusStruct* busStruct);
+  
+  Int_t WriteTriggerDDL(const AliMUONVTriggerStore& triggerStore, AliFstream* file[2]);
   
-  Int_t GetGlobalTriggerPattern(const AliMUONGlobalTrigger* gloTrg) const;
+  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[2];            //!< DDL binary file pointer one per 1/2 chamber
+ 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);
 
-  TClonesArray* fBusArray;           //!< array to sub event tracker
-   
   AliMUONBlockHeader* fBlockHeader;  //!< DDL block header class pointers
   AliMUONDspHeader*   fDspHeader;    //!< DDL Dsp header class pointers
-  AliMUONBusStruct*   fBusStruct;    //!< DDL bus patch structure class pointers
   AliMUONDarcHeader*  fDarcHeader;   //!< DDL darc header class pointers
   AliMUONRegHeader*   fRegHeader;    //!< DDL regional header class pointers
   AliMUONLocalStruct* fLocalStruct;  //!< DDL local structure class pointers
 
-  AliMpBusPatch* fBusPatchManager;   //!< buspatch versus DE's & DDL
+  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 fTrackerTimer;             //!< 
-  TStopwatch fTriggerTimer;             //!< 
-  TStopwatch fMappingTimer;             //!< 
+  AliRawDataHeaderSim*    fHeader;           ///< header of DDL
   
-  AliMpSegFactory* fSegFactory;         //!< mapping segmentation factory
-  
-  ClassDef(AliMUONRawWriter,1) // MUON cluster reconstructor in ALICE
+  Int_t fBufferSize; //!< size of internal data buffer
+  Int_t* fBuffer; //!< internal data buffer
+
+  ClassDef(AliMUONRawWriter,5) // MUON cluster reconstructor in ALICE
 };
        
 #endif