]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDrawData.h
Use new profiling tools in local mode, set proper name for tasks when running with...
[u/mrichter/AliRoot.git] / TRD / AliTRDrawData.h
index 01bd9acae5ad7bec7adc81300e9b0768fbfe7131..0d4f6e624a45d407024f7333992aac4f1b254c0d 100644 (file)
 
 class TTree;
 
+class AliRunLoader;
+
 class AliRawReader;
 
 class AliTRDdigitsManager;
 class AliTRDgeometry;
 class AliTRDfeeParam;
 class AliTRDarrayADC;
+class AliTRDdigitsParam;
+
+// Some constants:
+const UInt_t kEndoftrackletmarker = 0xAAAAAAAA; /*This marks the end of tracklet data words*/
+const UInt_t kEndofrawdatamarker  = 0x00000000; /*This marks the end of half-chamber-data*/
+const UInt_t kSizeWord            = sizeof(UInt_t);
 
 class AliTRDrawData : public TObject {
 
@@ -32,12 +40,14 @@ class AliTRDrawData : public TObject {
 
   AliTRDrawData &operator=(const AliTRDrawData &/*r*/) { return *this; }
 
-  virtual Bool_t       Digits2Raw(TTree *digits, TTree *tracks = NULL);
+  virtual Bool_t       Digits2Raw(TTree *digits, const TTree *tracks = NULL);
 
   virtual AliTRDdigitsManager *Raw2Digits(AliRawReader *rawReader);
-  virtual AliTRDdigitsManager *Raw2DigitsOLD(AliRawReader *rawReader);
+  //virtual AliTRDdigitsManager *Raw2DigitsOLD(AliRawReader *rawReader);
   static void SetRawFormatVersion(Int_t iver){ fgRawFormatVersion=iver; };
   static void SetSuppressionLevel(Int_t ilevel){ fgDataSuppressionLevel=ilevel; };
+  Bool_t WriteTracklets(Int_t det);
+  Bool_t OpenOutput();
 
   enum FORMATTYPE
     {
@@ -49,6 +59,7 @@ class AliTRDrawData : public TObject {
 
   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);
+  virtual Int_t        ProduceHcDataNoSuppression(Int_t side, Int_t det, UInt_t *buf, Int_t maxSize);
   virtual Int_t        ProduceHcDataV1andV2(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize);
   virtual Int_t        ProduceHcDataV3(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent);
   //virtual Int_t      ProduceHcDataV3(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize);
@@ -60,24 +71,26 @@ class AliTRDrawData : public TObject {
           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
-
-  ClassDef(AliTRDrawData,5)             //  TRD raw data class
+  TTree               *fTrackletTree;        //! Tree for tracklets
+  UInt_t              **fTrackletContainer;  //! tracklet container
 
  private:
 
        static       Int_t  fgRawFormatVersion;                   // simulation raw data version - 0:old , 1:new(real data format)
        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   fSMindexPos;                // Position of SM index word
     Int_t   fStackindexPos;             // Position of SM index word
     UInt_t  fEventCounter;              // Event counter(starting from 1)
+    AliTRDdigitsParam *fDigitsParam;    // Digits parameter
 
-
-
+  ClassDef(AliTRDrawData,6)             //  TRD raw data class
 
 };
 #endif