]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HMPID/AliHMPIDDigit.cxx
update
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDDigit.cxx
index b1d8b26fa80ab0a2480de1dbe18df24983aedea8..c922cfe60668f77ee5c2b5ac92742221b943b3ed 100644 (file)
@@ -17,7 +17,6 @@
 #include <TClonesArray.h>     //WriteRaw() 
 #include <TBox.h>             //Draw() 
 #include <TPolyLine.h>        //Draw() 
-#include <AliRawDataHeader.h> //WriteRaw()
 #include "AliHMPIDParam.h"
 #include <AliDAQ.h>           //WriteRaw()
 #include "Riostream.h"        //WriteRaw()
@@ -28,9 +27,9 @@ ClassImp(AliHMPIDDigit)
 /*
  Preface: all geometrical information (like left-right sides) is reported as seen from electronic side.
  
-     d10          d1    d10          d1 
+      d10          d1    d10           d1 
       _______________    _______________          
-r24  |               |  |               |126.16   r1
+r1   |               |  |               |126.16   r24
      |       4       |  |       5       | 
      |               |  |               | 
      |_______________|  |_______________|85.84 
@@ -43,8 +42,8 @@ r24  |               |  |               |126.16   r1
      |               |  |               |40.32
      |       0       |  |       1       |
      |               |  |               |
-r1   |_______________|  |_______________|0        r24
-      0           64.0  66.6        130.6 
+r24  |_______________|  |_______________|0        r1        //updated: 15/02/2008
+      0           64.0  66.6        130.6                   //corrected: 05/08/2009 clm
 
 
 
@@ -132,40 +131,3 @@ void AliHMPIDDigit::Print(Option_t *opt)const
          fTracks[0],fTracks[1],fTracks[2],w32,ddl,r,d,a, (AliHMPIDParam::IsOverTh(Q()))?"":"below thr");
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPIDDigit::WriteRaw(TObjArray *pDigAll)
-{
-// Write a list of digits for a given chamber in raw data stream
-// Arguments: pDigAll- list of digits 
-//   Returns: none      
-  for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){//chambers loop
-    AliFstream* ddlL;                                 //output streams, 2 per chamber
-    AliFstream* ddlR;                          
-    Int_t    cntL=0,cntR=0;                           //data words counters for DDLs
-    AliRawDataHeader header; header.SetAttribute(0);  //empty DDL header
-
-//    ddlL = new AliFstream(AliDAQ::DdlFileName("HMPID",2*iCh)); 
-//    ddlR = new AliFstream(AliDAQ::DdlFileName("HMPID",2*iCh+1));      //open both DDL of this chamber in parallel
-    ddlL = new AliFstream(AliDAQ::DdlFileName("HMPID",2*iCh+1)); //left and right looking at the IP
-    ddlR = new AliFstream(AliDAQ::DdlFileName("HMPID",2*iCh));   //open both DDL of this chamber in parallel
-    ddlL->WriteBuffer((char*)&header,sizeof(header));            //write dummy header as place holder, actual 
-    ddlR->WriteBuffer((char*)&header,sizeof(header));            //will be rewritten later when total size of DDL is known
-  
-    UInt_t w32=0;                 //32 bits data word 
-    TClonesArray *pDigCh=(TClonesArray *)pDigAll->At(iCh); //list of digits for current chamber 
-    for(Int_t iDig=0;iDig<pDigCh->GetEntriesFast();iDig++){//digits loop
-      AliHMPIDDigit *pDig=(AliHMPIDDigit*)pDigCh->At(iDig);
-      if(pDig->Q() < 1) continue;
-      Int_t ddl,r,d,a;            //32 bits data word 
-      pDig->Raw(w32,ddl,r,d,a);                             
-      if(ddl%2){
-        ddlL->WriteBuffer((char*)&w32,sizeof(w32));  cntL++;
-      }else{
-        ddlR->WriteBuffer((char*)&w32,sizeof(w32));  cntR++;
-      }
-    }//digits  loop
-
-    header.fSize=sizeof(header)+cntL*sizeof(w32); ddlL->Seekp(0); ddlL->WriteBuffer((char*)&header,sizeof(header)); delete ddlL; //rewrite header with size set to
-    header.fSize=sizeof(header)+cntR*sizeof(w32); ddlR->Seekp(0); ddlR->WriteBuffer((char*)&header,sizeof(header)); delete ddlR; //number of bytes and close file
-  }//chambers loop
-}//WriteRaw()
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++