]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONBlockHeader.cxx
Fixes for #86059: Install data when ALICE_ROOT does not point to source (Christian)
[u/mrichter/AliRoot.git] / MUON / AliMUONBlockHeader.cxx
index e1d5104fa6969fed00339199d92f94c86fa28326..c39085751927b8dd6badc24a63001298ebfd80aa 100644 (file)
 #include "AliMUONBlockHeader.h"
 #include "AliMUONDspHeader.h"
 
-/// 
+#include <Riostream.h>
+
+//-----------------------------------------------------------------------------
+/// \class AliMUONBlockHeader
 /// Block structure for tracker raw data
 /// each DDL contains two blocks,
 /// each block contains at most 5 dsp structure.
 /// Beside the total length and length of the below data
 /// the header of the block contains the front end DSP id, trigger words and paddind word
 ///
+/// \author Christian Finck
+//-----------------------------------------------------------------------------
 
 /// \cond CLASSIMP
 ClassImp(AliMUONBlockHeader)
 /// \endcond
 
-const Int_t  AliMUONBlockHeader::fgkHeaderLength = 8;
+const Int_t  AliMUONBlockHeader::fgkHeaderLength   = 8;
 const UInt_t AliMUONBlockHeader::fgkDefaultDataKey = 0xFC0000FC;
+const UInt_t AliMUONBlockHeader::fgkDdlDataKey     = 0xD000000D;
+
+//___________________________________________
+AliMUONBlockHeader::AliMUONBlockHeader(TRootIOCtor* /*dummy*/)
+:  TObject(),
+fDataKey(0),
+fTotalLength(0),
+fLength(0),
+fDspId(0),
+fL0Trigger(0),
+fMiniEventId(0),
+fEventId1(0),
+fEventId2(0),
+fDspHeaderArray(0x0)
+{
+  ///
+  /// ctor
+  ///
+  
+}
+
 //___________________________________________
 AliMUONBlockHeader::AliMUONBlockHeader()
   :  TObject(),
@@ -46,18 +72,18 @@ AliMUONBlockHeader::AliMUONBlockHeader()
      fDspHeaderArray(new TClonesArray("AliMUONDspHeader", 5))
 
 {
-  //
-  // ctor
-  //
+  ///
+  /// ctor
+  ///
 
 }
 
 //___________________________________________
 AliMUONBlockHeader::~AliMUONBlockHeader()
 {
-  // 
-  // dtor
-  //
+  /// 
+  /// dtor
+  ///
   fDspHeaderArray->Delete();
   delete fDspHeaderArray;
 }
@@ -75,9 +101,9 @@ AliMUONBlockHeader::AliMUONBlockHeader(const AliMUONBlockHeader& event)
      fEventId2(event.fEventId2),
      fDspHeaderArray(new TClonesArray("AliMUONDspHeader", 5))
 {
-  //
-  // copy ctor
-  //
+  ///
+  /// copy ctor
+  ///
 
   for (Int_t index = 0; index < (event.fDspHeaderArray)->GetEntriesFast(); index++) {
     {new ((*fDspHeaderArray)[fDspHeaderArray->GetEntriesFast()]) 
@@ -90,11 +116,12 @@ AliMUONBlockHeader::AliMUONBlockHeader(const AliMUONBlockHeader& event)
 AliMUONBlockHeader&
 AliMUONBlockHeader::operator=(const AliMUONBlockHeader &event)
 {
-  // 
-  // assignment operator
-  //
+  /// 
+  /// assignment operator
+  ///
   if (this == &event) return *this;
 
+  fDataKey     = event.fDataKey;
   fTotalLength = event.fTotalLength;
   fLength      = event.fLength;
   fDspId       = event.fDspId;
@@ -116,10 +143,10 @@ AliMUONBlockHeader::operator=(const AliMUONBlockHeader &event)
 //___________________________________________
 void AliMUONBlockHeader::AddDspHeader(const AliMUONDspHeader& dspHeader)
 { 
-  // 
-  // adding the dsp structure
-  // into the TClonesArray
-  //
+  /// 
+  /// adding the dsp structure
+  /// into the TClonesArray
+  ///
   TClonesArray &dspArray = *fDspHeaderArray;
   new(dspArray[dspArray.GetEntriesFast()]) AliMUONDspHeader(dspHeader);
 
@@ -127,9 +154,27 @@ void AliMUONBlockHeader::AddDspHeader(const AliMUONDspHeader& dspHeader)
 //___________________________________________
 void AliMUONBlockHeader::Clear(Option_t* )
 {
-  // Clear TClones arrays
-  // instead of deleting
-  //
+  /// Clear TClones arrays
+  /// instead of deleting
+  ///
   fDspHeaderArray->Clear("C");
  
 }
+
+//___________________________________________
+void AliMUONBlockHeader::Print(Option_t* /*opt*/) const
+{
+  /// print out
+
+  cout << "CRT info"        << endl;
+  cout << "DataKey: "       << fDataKey << endl;
+  cout << "TotalLength: "   << fTotalLength << endl;
+  cout << "Length: "        << fLength << endl;
+  cout << "DspId: "         << fDspId << endl;
+  cout << "L0Trigger: "     << fL0Trigger << endl;
+  cout << "MiniEventId: "   << fMiniEventId<< endl; 
+  cout << "EventId1: "      << fEventId1 << endl;
+  cout << "EventId2: "      << fEventId2 << endl;;
+
+}