]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONDarcHeader.cxx
Bug fix for loading the LUT for chambers 1 to 6. (Indra)
[u/mrichter/AliRoot.git] / MUON / AliMUONDarcHeader.cxx
index c4db726953ee22caf76fa687905f224e4ce4050c..6d3c8c52801132fc8da7bd112fd193517211ea97 100644 (file)
@@ -18,7 +18,8 @@
 #include "AliMUONDarcHeader.h"
 #include "AliMUONRegHeader.h"
 
-/// 
+//-----------------------------------------------------------------------------
+/// \class AliMUONDarcHeader
 /// Darc structure for trigger raw data.
 /// Each DDL contains one Darc structure
 /// The structure includes the information of the Darc boards
@@ -26,6 +27,8 @@
 /// The structure containes the information of the 8 (at most) 
 /// regional structures.
 ///
+/// \author Christian Finck
+//-----------------------------------------------------------------------------
 
 /// \cond CLASSIMP
 ClassImp(AliMUONDarcHeader)
@@ -38,6 +41,8 @@ ClassImp(AliMUONDarcHeader)
 
  const UInt_t AliMUONDarcHeader::fgkEndOfDarc   = 0xDEADFACE;
  const UInt_t AliMUONDarcHeader::fgkEndOfGlobal = 0xDEADBEEF;
+ const UInt_t AliMUONDarcHeader::fgkDarcVadorhType    = 4;
+ const UInt_t AliMUONDarcHeader::fgkDarcDefaultType   = 6;
 
 //___________________________________________
 AliMUONDarcHeader::AliMUONDarcHeader()
@@ -62,9 +67,8 @@ AliMUONDarcHeader::AliMUONDarcHeader()
   
 
 {
-  //
-  // ctor
-  //
+  /// ctor
+  
   for (Int_t i = 0; i < 4; i++)
     fGlobalInput[i] = 0;
 
@@ -94,9 +98,9 @@ AliMUONDarcHeader::AliMUONDarcHeader(const AliMUONDarcHeader& event)
      fRegHeaderArray(new TClonesArray("AliMUONRegHeader", 8))
 
 {
-  //
-  // copy ctor
-  //
+  ///
+  /// copy ctor
+  ///
  
  for (Int_t i = 0; i < 4; i++)
     fGlobalInput[i] = event.fGlobalInput[i];
@@ -113,9 +117,9 @@ AliMUONDarcHeader::AliMUONDarcHeader(const AliMUONDarcHeader& event)
 //___________________________________________
 AliMUONDarcHeader& AliMUONDarcHeader::operator=(const AliMUONDarcHeader& event)
 {
-  // 
-  // assignment operator
-  //
+  /// 
+  /// assignment operator
+  ///
   if (this == &event) return *this;
 
   fWord         = event.fWord;
@@ -152,9 +156,9 @@ AliMUONDarcHeader& AliMUONDarcHeader::operator=(const AliMUONDarcHeader& event)
 //___________________________________________
 AliMUONDarcHeader::~AliMUONDarcHeader()
 {
-  // 
-  // dtor
-  //
+  /// 
+  /// dtor
+  ///
   fRegHeaderArray->Delete();
   delete fRegHeaderArray;
 }
@@ -162,9 +166,9 @@ AliMUONDarcHeader::~AliMUONDarcHeader()
 //___________________________________________
 void AliMUONDarcHeader::SetScalersNumbers()
 {
-  // set numbers for scaler events for Darc header
-  // since this is provided by the experiment
-  // put dummy numbers to check the monitoring
+  /// set numbers for scaler events for Darc header
+  /// since this is provided by the experiment
+  /// put dummy numbers to check the monitoring
   
   fGlobalL0    = 1000;
   fGlobalClk   = 10000;
@@ -184,13 +188,30 @@ void AliMUONDarcHeader::SetScalersNumbers()
     fGlobalScaler[i] = i;
 
 }
+//___________________________________________
+Bool_t  AliMUONDarcHeader::GetEventType()  const 
+{
+  /// return 1 for physics trigger
+  /// return 0 for software trigger
+  // 01 = trigger physics
+  // 10 = trigger software "start of run"
+  // 11 = trigger software "end of run"
+  // 00 = other trigger software
+  
+  Bool_t b1 =   (fWord >> 30) &  0x1;
+  Bool_t b2 = !((fWord >> 31) &  0x1);
+  
+  //printf("%d\n", b1 & b2);
+  //printf("%d %d\n", b2 , b1);
+  return (b1 & b2);
+}
 
 //___________________________________________
 void AliMUONDarcHeader::Clear(Option_t* )
 {
-  // Clear TClones arrays
-  // instead of deleting
-  //
+  /// Clear TClones arrays
+  /// instead of deleting
+  ///
   fRegHeaderArray->Clear("C");
  
 }