]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliAltroBufferV3.h
Increasing histo clu. lay.1 upper lim.
[u/mrichter/AliRoot.git] / RAW / AliAltroBufferV3.h
index 886f7333c71562ce85780be749f7b2c36d4b0e3e..c234b123d8df9d5d39bb8903e42e22e47bb44850 100644 (file)
@@ -30,12 +30,42 @@ class AliAltroBufferV3: public AliAltroBuffer {
   virtual void  WriteTrailer(Int_t wordsNumber, Short_t hwAddress); 
   //this method is used to write the trailer
 
-  virtual void  WriteRCUTrailer(Int_t rcuId);
+  virtual UChar_t WriteRCUTrailer(Int_t rcuId);
   //this method is used to write the RCU trailer
 
+  void  SetFECERRA(UInt_t v) { fFECERRA = v; }
+  void  SetFECERRB(UInt_t v) { fFECERRB = v; }
+  void  SetERRREG2(UInt_t v) { fERRREG2 = v; }
+  void  SetERRREG3(UInt_t v) { fERRREG3 = v; }
+  void  SetActiveFECsA(UShort_t m) { fActiveFECsA = m; }
+  void  SetActiveFECsB(UShort_t m) { fActiveFECsB = m; }
+  void  SetALTROCFG1(UInt_t cfg1) { fALTROCFG1 = cfg1; }
+  void  SetALTROCFG2(UInt_t cfg2) { fALTROCFG2 = cfg2; }
+  void  SetTSample(Double_t v) { fTSample = v; }
+  void  SetL1Phase(Double_t v) { fL1Phase = v; }
+
+  void SetNChAddrMismatch(UShort_t v) { SetField(fERRREG3, 0, 0xFFF, v); }
+  void SetNChLengthMismatch(UShort_t v) { SetField(fERRREG3, 12, 0x1FFF, v); }
+  
+  void SetBaselineCorr(UChar_t v) { SetField(fALTROCFG1, 0, 0xF, v); }
+  void SetPolarity(Bool_t v) { SetField(fALTROCFG1, 4, 0x1, v); }
+  void SetNPresamples(UChar_t v) { SetField(fALTROCFG1, 5, 0x3, v); }
+  void SetNPostsamples(UChar_t v) { SetField(fALTROCFG1, 7, 0xF, v); }
+  void SetSecondBaselineCorr(Bool_t v) { SetField(fALTROCFG1, 11, 0x1, v); }
+  void SetGlitchFilter(UChar_t v) { SetField(fALTROCFG1, 12, 0x3, v); }
+  void SetNNonZSPostsamples(UChar_t v) { SetField(fALTROCFG1, 14, 0x7, v); }
+  void SetNNonZSPresamples(UChar_t v) { SetField(fALTROCFG1, 17, 0x3, v); }
+  void SetZeroSupp(Bool_t v) { SetField(fALTROCFG1, 19, 0x1, v); }
+  void SetNAltroBuffers(Bool_t v) { SetField(fALTROCFG2, 24, 0x1, v); }
+  void SetNPretriggerSamples(UChar_t  v) { SetField(fALTROCFG2, 20, 0xF, v); }
+  void SetNSamplesPerCh(UShort_t v) { SetField(fALTROCFG2, 10, 0x3FF, v); }
+  void SetSparseRO(Bool_t v) { SetField(fALTROCFG2, 9, 0x1, v); }
+
+
   enum { kMaxWords = 1024 };
 
  protected:
+  UInt_t        SetField(UInt_t& input, UShort_t start, UInt_t mask, UInt_t val) const;
   void          ReverseAndWrite();
   //this method reverse the altro data order and write the buffer to the file
 
@@ -44,6 +74,16 @@ class AliAltroBufferV3: public AliAltroBuffer {
 
   UShort_t fArray[kMaxWords]; // Temporary array needed in reverting data order
   Int_t    fN;                // Size of the temporary array
+  UInt_t   fFECERRA;   // FECERRA
+  UInt_t   fFECERRB;   // FECERRB
+  UInt_t   fERRREG2;   // ERRREG2
+  UInt_t   fERRREG3;   // ERRREG3
+  UShort_t fActiveFECsA;// ActiveFECsA
+  UShort_t fActiveFECsB;// ActiveFECsB
+  UInt_t   fALTROCFG1; // ALTROCFG1
+  UInt_t   fALTROCFG2; // ALTROCFG2
+  Double_t fTSample;   // TSample
+  Double_t fL1Phase;   // L1Phase
 
   ClassDef(AliAltroBufferV3,0)  // Interface to the Altro format
 };