]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDrawData.h
Version where the process for HLT and vdrift on DAQ are off(Raphaelle)
[u/mrichter/AliRoot.git] / TRD / AliTRDrawData.h
index a6e29e719af62cd7f42cba81e5d5382b70a25d63..0fe5cfd92d6d2d20c39ddc17dac1e41fd61c38ba 100644 (file)
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "TObject.h"
+#include "AliLog.h"
+#include "AliTRDgeometry.h"
 
 class TTree;
+class TClonesArray;
+
+class AliRunLoader;
 
 class AliRawReader;
 
 class AliTRDdigitsManager;
-class AliTRDCommonParam;
-class AliTRDcalibDB;
-class AliTRDgeometry;
-class AliTRDdataArrayI;
-
-//
-// The following are defined in AliTRDRawStream.h:
-//const Int_t end_of_tracklet_marker = 0xAAAAAAAA; /*This marks the end of tracklet data words*/
-//const Int_t end_of_event_marker    = 0x00000000; /*This marks the end of half-chamber-data*/
-//
+class AliTRDfeeParam;
+class AliTRDarrayADC;
+class AliTRDdigitsParam;
+class AliTRDmcmSim;
 
 class AliTRDrawData : public TObject {
 
@@ -39,29 +38,49 @@ class AliTRDrawData : public TObject {
 
   AliTRDrawData &operator=(const AliTRDrawData &/*r*/) { return *this; }
 
-  virtual Bool_t       Digits2Raw(TTree *digits, TTree *tracks = NULL);
-  virtual Bool_t       SetRawVersion(Int_t v);
+  virtual Bool_t       Digits2Raw(TTree *digits, const TTree *tracks = NULL);
 
-  virtual AliTRDdigitsManagerRaw2Digits(AliRawReader *rawReader);
+  virtual AliTRDdigitsManager *Raw2Digits(AliRawReader *rawReader);
 
- protected:
+  void                    SetTracklets(TClonesArray*) { AliError("Deprecated, not doing anything."); }
+  void                    SetTracks(TClonesArray*) { AliError("Deprecated, not doing anything"); }
 
-  virtual Bool_t       Digits2RawV0(AliTRDdigitsManager* digitsManager); // for fRawVersion == 0
-  virtual Bool_t       Digits2RawVx(AliTRDdigitsManager* digitsManager); // for fRawVersion > 0
-  virtual Int_t        ProduceHcDataV1andV2(AliTRDdataArrayI *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize);
-  //virtual Int_t        ProduceHcDataV3(AliTRDdataArrayI *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize);
-  //virtual Int_t        ProduceHcDataV4(AliTRDdataArrayI *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize);
+  UInt_t  GetTriggerFlags(const Int_t sector) const { return fTrgFlags[sector]; }
 
-  virtual AliTRDdigitsManager* Raw2DigitsV0(AliRawReader* rawReader);
-  virtual AliTRDdigitsManager* Raw2DigitsVx(AliRawReader* rawReader);
+ protected:
 
-  Int_t                fRawVersion;     //  Which version of raw simulator is used
-  AliTRDCommonParam   *fCommonParam;    //! Common parameters
-  AliTRDcalibDB       *fCalibration;    //! Offline database interface
+  virtual Bool_t       Digits2Raw(AliTRDdigitsManager* digitsManager); // for fRawVersion > 0
+  virtual Int_t        ProduceHcData(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent, Bool_t newSM);
+         void         ProduceSMIndexData(UInt_t *buf, Int_t& nw);                              // SM index words and header - real data format
+          void         WriteIntermediateWords(UInt_t *buf, Int_t& nw, Int_t& of, const Int_t& maxSize, const Int_t& det, const Int_t& side); // real data format
+                 void         AssignStackMask(UInt_t *buf, Int_t nStack);  // re-assignment of stack mask in the SM index word
+          void         AssignLinkMask(UInt_t *buf, Int_t nLayer);   // re-assignment of link mask in the stack index word
+          Int_t        AddStackIndexWords(UInt_t *buf, Int_t nStack, Int_t nMax);   // add stack index words and stack header when there is no data for the stack 
+          Bool_t       ShiftWords(UInt_t *buf, Int_t nStart, Int_t nWords, Int_t nMax); // shifts n words
+  
+  AliRunLoader        *fRunLoader;      //! Run Loader
   AliTRDgeometry      *fGeo;            //! Geometry
+  AliTRDfeeParam      *fFee;            //! Fee Parameters
   Int_t                fNumberOfDDLs;   //  Number of DDLs
+  TTree               *fTrackletTree;   //! Tree for tracklets
+
+  TClonesArray        *fTracklets;      //! Array of online tracklets
+  TClonesArray        *fTracks;         //! Array of GTU tracks
+
+ private:
+
+  static       Int_t  fgDataSuppressionLevel;               // Data suppression level - 0:no su, 1: su, 2: deep suppression 
+  static const UInt_t fgkEndOfTrackletMarker  = 0x10001000; // This marks the end of tracklet data words
+  static const UInt_t fgkEndOfDataMarker      = 0x00000000; // This marks the end of HC data words
+
+  Int_t   fSMindexPos;                // Position of SM index word
+  Int_t   fStackindexPos;             // Position of SM index word
+  UInt_t  fEventCounter;              // Event counter(starting from 1)
+  UInt_t  fTrgFlags[AliTRDgeometry::kNsector]; // trigger flags
+  AliTRDmcmSim      *fMcmSim;         //! MCM simulation for raw data output
+  AliTRDdigitsParam *fDigitsParam;    // Digits parameter
 
-  ClassDef(AliTRDrawData,3)             //  TRD raw data class
+  ClassDef(AliTRDrawData,8)             //  TRD raw data class
 
 };
 #endif