]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Update rawdata format for trigger (Christian)
authormartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Jun 2006 15:52:41 +0000 (15:52 +0000)
committermartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Jun 2006 15:52:41 +0000 (15:52 +0000)
MUON/AliMUONRawStreamTrigger.cxx
MUON/AliMUONRawWriter.cxx
MUON/AliMUONRegHeader.cxx
MUON/AliMUONRegHeader.h

index df291a35e2f0b721926fceaf4a5fd9bff369dd88..0d9e959031ba5be47b21b30bfa404bcd75c6f257 100644 (file)
@@ -192,7 +192,7 @@ Bool_t AliMUONRawStreamTrigger::NextDDL()
   }
 
   if (buffer[index++] != darcHeader->GetEndOfDarc())
-    AliWarning(Form("Wrong end of Darc word %d instead of %d\n",buffer[index-1], darcHeader->GetEndOfDarc())); 
+    AliWarning(Form("Wrong end of Darc word %x instead of %x\n",buffer[index-1], darcHeader->GetEndOfDarc())); 
 
   // 4 words of global board input + Global board output
   memcpy(darcHeader->GetGlobalInput(), &buffer[index], (kDarcHeaderSize-1)*4); 
@@ -221,7 +221,7 @@ Bool_t AliMUONRawStreamTrigger::NextDDL()
     }
 
     if (buffer[index++] != fRegHeader->GetEndOfReg())
-      AliWarning(Form("Wrong end of Reg word %d instead of %d\n",buffer[index-1], fRegHeader->GetEndOfReg()));
+      AliWarning(Form("Wrong end of Reg word %x instead of %x\n",buffer[index-1], fRegHeader->GetEndOfReg()));
 
     // 16 local cards per regional board
     for (Int_t iLoc = 0; iLoc < fMaxLoc; iLoc++) {         //loop over local card
@@ -239,7 +239,7 @@ Bool_t AliMUONRawStreamTrigger::NextDDL()
       }
 
       if (buffer[index++] != fLocalStruct->GetEndOfLocal())
-       AliWarning(Form("Wrong end of local word %d instead of %d\n",buffer[index-1], fLocalStruct->GetEndOfLocal()));
+       AliWarning(Form("Wrong end of local word %x instead of %x\n",buffer[index-1], fLocalStruct->GetEndOfLocal()));
          
       fDDLTrigger->AddLocStruct(*fLocalStruct, iReg);
 
index f29f35c4cf12e6a07f8e8051bb7a34abe093ba71..819adc4406d852a80fec882c61636bdf623116cc 100644 (file)
@@ -687,11 +687,11 @@ Int_t AliMUONRawWriter::WriteTriggerDDL()
     AliInfo("No Trigger information available");
 
   if(fScalerEvent)
-    // [16(local)*51 words + 15 words]*8(reg) + 6 + 12 + 6 words scaler event 6672 words
-    buffer = new Int_t [6672];
+    // [16(local)*51 words + 16 words]*8(reg) + 6 + 12 + 6 words scaler event 6672 words
+    buffer = new Int_t [6680];
   else
-    // [16(local)*6 words + 4 words]*8(reg) + 10 words = 810 
-    buffer = new Int_t [810];
+    // [16(local)*6 words + 5 words]*8(reg) + 10 words = 818 
+    buffer = new Int_t [818];
 
 
   // open DDL file, on per 1/2 chamber
@@ -699,8 +699,8 @@ Int_t AliMUONRawWriter::WriteTriggerDDL()
     
     index = 0; 
 
-    // DDL enhanced header
     word = 0;
+    // set darc status word
     AliBitPacking::PackWord((UInt_t)iDDL+1,word,28,31); //see AliMUONDDLTrigger.h for details
     AliBitPacking::PackWord((UInt_t)serialNb,word,24,27);
     AliBitPacking::PackWord((UInt_t)version,word,16,23);
@@ -713,7 +713,7 @@ Int_t AliMUONRawWriter::WriteTriggerDDL()
 
     AliBitPacking::PackWord((UInt_t)globalFlag,word,8,11);
     fDarcHeader->SetWord(word);
-    buffer[index++]= word;
+    buffer[index++] = word;
 
     if (iDDL == 0)
      fDarcHeader->SetGlobalOutput(gloTrigPat);// no global input for the moment....
@@ -746,6 +746,10 @@ Int_t AliMUONRawWriter::WriteTriggerDDL()
 
       // Regional card header
       word = 0;
+
+      // set darc status word
+      fRegHeader->SetDarcWord(word);
+
       regOut  = 0;
       AliBitPacking::PackWord((UInt_t)serialNb,word,24,28); //see  AliMUONLocalStruct.h for details
       AliBitPacking::PackWord((UInt_t)version,word,16,23);
index c66c8c85972cedcb275fd104120ccdf2fa3524ef..cd9a022feee9664b5943d56f01f794dec7edc83c 100644 (file)
 ClassImp(AliMUONRegHeader)
 /// \endcond
  
- const Int_t  AliMUONRegHeader::fgkHeaderLength = 3;
+ const Int_t  AliMUONRegHeader::fgkHeaderLength = 4;
  const Int_t  AliMUONRegHeader::fgkScalerLength = 8;
  const UInt_t AliMUONRegHeader::fgkEndOfReg     = 0xBEEFFACE;
 
 //___________________________________________
 AliMUONRegHeader::AliMUONRegHeader()
   :  TObject(),
+     fDarcWord(0),
      fWord(0),
      fL0(0), 
      fClk(0),
@@ -71,10 +72,11 @@ AliMUONRegHeader::AliMUONRegHeader(const AliMUONRegHeader& event)
   //
   // copy ctor
   //
-  fWord = event.fWord;
-  fL0   = event.fL0;
-  fClk  = event.fClk;
-  fHold = event.fHold;
+  fDarcWord = event.fDarcWord;
+  fWord     = event.fWord;
+  fL0       = event.fL0;
+  fClk      = event.fClk;
+  fHold     = event.fHold;
 
   fInput[0] = event.fInput[0];
   fInput[1] = event.fInput[1];
@@ -98,10 +100,11 @@ AliMUONRegHeader& AliMUONRegHeader::operator=(const AliMUONRegHeader& event)
 
   if (this == &event) return *this;
 
-  fWord = event.fWord;
-  fL0   = event.fL0;
-  fClk  = event.fClk;
-  fHold = event.fHold;
+  fDarcWord = event.fDarcWord;
+  fWord     = event.fWord;
+  fL0       = event.fL0;
+  fClk      = event.fClk;
+  fHold     = event.fHold;
 
   fInput[0] = event.fInput[0];
   fInput[1] = event.fInput[1];
index a1f7d662df75f2b1ab00c5a41aacc416bff47ec2..22226ba01521aea1f73068c9e21a38340654a870 100644 (file)
@@ -25,7 +25,7 @@ public:
 
    virtual ~AliMUONRegHeader();
 
-
+   UInt_t  GetDarcWord()      const {return fDarcWord;}
    UInt_t  GetWord()          const {return fWord;}
    UInt_t  GetInput(Int_t n)  const {return fInput[n];}
 
@@ -35,6 +35,7 @@ public:
    Char_t   GetId()        const {return (Char_t)(fWord >> 12) &  0x0F;}
    Char_t   GetOutput()    const {return (Char_t)(fWord)       &  0xFF;}
 
+   void    SetDarcWord(UInt_t w) {fDarcWord = w;}
    void    SetWord(UInt_t w) {fWord = w;}
    void    SetInput(UInt_t in, Int_t n) {fInput[n] = in;}
    
@@ -42,7 +43,7 @@ public:
    UInt_t  GetEndOfReg()     const {return fgkEndOfReg;}
 
 
-   UInt_t* GetHeader() {return &fWord;}
+   UInt_t* GetHeader() {return &fDarcWord;}
 
   // scalar methods
    UInt_t  GetL0()      const {return fL0;}
@@ -74,7 +75,8 @@ public:
  private:
    
    // regional header
-   UInt_t    fWord;          ///< first word
+   UInt_t    fDarcWord;      ///< darc word
+   UInt_t    fWord;          ///< first reg word
    UInt_t    fInput[2];      ///< regional input
 
    // regional card scalers