]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HMPID/AliHMPIDDigit.cxx
Track regerence id for hmpid added.
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDDigit.cxx
index f86f0a5b8e6284ec4aab5dc7c3eaeaa51b4745dc..01380fbb6b69bf7717909c30cc3f47a020a0d21d 100644 (file)
@@ -21,6 +21,8 @@
 #include "AliHMPIDParam.h"
 #include <AliDAQ.h>           //WriteRaw()
 #include "Riostream.h"        //WriteRaw()
+#include "AliFstream.h"   
+
 ClassImp(AliHMPIDDigit)
 
 /*
@@ -130,37 +132,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
-    ofstream ddlL,ddlR;                               //output streams, 2 per chamber
-    Int_t    cntL=0,cntR=0;                           //data words counters for DDLs
-    AliRawDataHeader header; header.SetAttribute(0);  //empty DDL header
-
-    ddlL.open(AliDAQ::DdlFileName("HMPID",2*iCh)); 
-    ddlR.open(AliDAQ::DdlFileName("HMPID",2*iCh+1));      //open both DDL of this chamber in parallel
-    ddlL.write((char*)&header,sizeof(header));            //write dummy header as place holder, actual 
-    ddlR.write((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.write((char*)&w32,sizeof(w32));  cntL++;
-      }else{
-        ddlR.write((char*)&w32,sizeof(w32));  cntR++;
-      }
-    }//digits  loop
-
-    header.fSize=sizeof(header)+cntL*sizeof(w32); ddlL.seekp(0); ddlL.write((char*)&header,sizeof(header)); ddlL.close(); //rewrite header with size set to
-    header.fSize=sizeof(header)+cntR*sizeof(w32); ddlR.seekp(0); ddlR.write((char*)&header,sizeof(header)); ddlR.close(); //number of bytes and close file
-  }//chambers loop
-}//WriteRaw()
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++