]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New methods to retrieve altro hardware address information - branch, fec, altro chip...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Dec 2006 13:22:43 +0000 (13:22 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Dec 2006 13:22:43 +0000 (13:22 +0000)
RAW/AliAltroRawStream.cxx
RAW/AliAltroRawStream.h

index a8dfca6b0803ce3ea8391af820afb729e50f94b9..4232d9e49b8ee724054efe3ab4c10fdafd6a158c 100644 (file)
@@ -457,3 +457,51 @@ void AliAltroRawStream::PrintDebug() const
 
   AliError("End of debug printout\n--------------------");
 }
+
+//_____________________________________________________________________________
+Int_t AliAltroRawStream::GetBranch() const
+{
+  // The method provides the RCU branch index (0 or 1)
+  // for the current hardware address.
+  // In case the hardware address has not been yet
+  // initialized, the method returns -1
+  if (fHWAddress == -1) return -1;
+
+  return ((fHWAddress >> 11) & 0x1);
+}
+
+//_____________________________________________________________________________
+Int_t AliAltroRawStream::GetFEC() const
+{
+  // The method provides the front-end card index
+  // for the current hardware address.
+  // In case the hardware address has not been yet
+  // initialized, the method returns -1
+  if (fHWAddress == -1) return -1;
+
+  return ((fHWAddress >> 7) & 0xF);
+}
+
+//_____________________________________________________________________________
+Int_t AliAltroRawStream::GetAltro() const
+{
+  // The method provides the altro chip index
+  // for the current hardware address.
+  // In case the hardware address has not been yet
+  // initialized, the method returns -1
+  if (fHWAddress == -1) return -1;
+
+  return ((fHWAddress >> 4) & 0x7);
+}
+
+//_____________________________________________________________________________
+Int_t AliAltroRawStream::GetChannel() const
+{
+  // The method provides the channel index
+  // for the current hardware address.
+  // In case the hardware address has not been yet
+  // initialized, the method returns -1
+  if (fHWAddress == -1) return -1;
+
+  return (fHWAddress & 0xF);
+}
index 10d126f718f77a8ee92c9bcb2e65beada51fa818..0aba818a43129021908059d417990b297c034b20 100644 (file)
@@ -42,6 +42,11 @@ class AliAltroRawStream: public TObject {
     Int_t GetSignal()     const { return fSignal; }     // Provide signal in ADC counts
     Int_t GetTimeLength() const { return fTimeBunch; }  // Provide total length of current time bunch
 
+    Int_t GetBranch()     const; // Provide the branch index for the current hardware address
+    Int_t GetFEC()        const; // Provide the front-end card index for the current hardware address
+    Int_t GetAltro()      const; // Provide the altro chip index for the current hardware address
+    Int_t GetChannel()    const; // Provide the channel index for the current hardware address
+
     Bool_t  GetRCUTrailerData(UChar_t*& data) const;              // Provide a pointer to RCU trailer
     Int_t   GetRCUTrailerSize() const { return fRCUTrailerSize; } // Provide size of RCU trailer