]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSDDLRawData.cxx
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / ITS / AliITSDDLRawData.cxx
index c11cb38e43138925673551241bec23434e9c2bf7..a0ba53ead55bc81492bb327d6cc75945f643d178 100644 (file)
@@ -39,6 +39,9 @@
 #include "AliFstream.h"
 #include "AliITSFOSignalsSPD.h"
 
+using std::ofstream;
+using std::ios;
+using std::endl;
 ClassImp(AliITSDDLRawData)
 
 ////////////////////////////////////////////////////////////////////////////////////////
@@ -66,10 +69,11 @@ fSDDRawFormat(source.fSDDRawFormat){
 
 AliITSDDLRawData& AliITSDDLRawData::operator=(const AliITSDDLRawData &source){
   //Assigment operator
-  this->fIndex=source.fIndex;
-  this->fHalfStaveModule=source.fHalfStaveModule;
-  this->fVerbose=source.fVerbose;
-  this->fSDDRawFormat=source.fSDDRawFormat;
+  if(this==&source) return *this;
+  fIndex=source.fIndex;
+  fHalfStaveModule=source.fHalfStaveModule;
+  fVerbose=source.fVerbose;
+  fSDDRawFormat=source.fSDDRawFormat;
   return *this;
 }
 
@@ -631,7 +635,7 @@ Int_t AliITSDDLRawData::RawDataSSD(TBranch* branch){
 
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-Int_t AliITSDDLRawData::RawDataSDD(TBranch* branch, AliITSDDLModuleMapSDD* ddlsdd){
+Int_t AliITSDDLRawData::RawDataSDD(TBranch* branch, const AliITSDDLModuleMapSDD* ddlsdd){
     //This method creates the Raw data files for SDD detectors
   const Int_t kSize=131072; //256*512
   UInt_t buf[kSize];      
@@ -648,9 +652,13 @@ Int_t AliITSDDLRawData::RawDataSDD(TBranch* branch, AliITSDDLModuleMapSDD* ddlsd
     for(Int_t ibit=0; ibit<5; ibit++) header.SetAttribute(ibit);
     for(Int_t ibit=5; ibit<8; ibit++) header.ResetAttribute(ibit);  
   }
-  UInt_t skippedword, carlosFooterWord,fifoFooterWord,jitterWord;
+  UInt_t skippedword=0; 
+  UInt_t carlosFooterWord=0;
+  UInt_t fifoFooterWord=0;
+  UInt_t jitterWord=0;
   Bool_t retcode;
   retcode = AliBitPacking::PackWord(0x3FFFFFFF,carlosFooterWord,0,31);
+  if(!retcode)AliError("AliBitPacking error\n");
   retcode = AliBitPacking::PackWord(0x3F1F1F1F,fifoFooterWord,0,31);
   if(fSDDRawFormat!=0) retcode = AliBitPacking::PackWord(0x7F000000,jitterWord,0,31);
   else retcode = AliBitPacking::PackWord(0x80000000,jitterWord,0,31);