]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSDDLRawData.cxx
New analysis modules
[u/mrichter/AliRoot.git] / ITS / AliITSDDLRawData.cxx
index 83ebe31e315247e11b29c9d1335a9e35daee044b..57b45a893396f618808bc68e406cace1a8817c25 100644 (file)
@@ -66,10 +66,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;
 }
 
@@ -166,7 +167,7 @@ void AliITSDDLRawData::GetDigitsSDDCompressed(TClonesArray *ITSdigits, Int_t mod
       buf[fIndex]=dataWord;
     }
   }
-  UInt_t finalWord=15<<28;
+  UInt_t finalWord=UInt_t(15)<<28;
   finalWord+=mod;
   fIndex++;
   buf[fIndex]=finalWord;  
@@ -544,14 +545,14 @@ Int_t AliITSDDLRawData::RawDataSPD(TBranch* branch, AliITSFOSignalsSPD* foSignal
   fIndex=-1;
 
   TClonesArray*& digits = * (TClonesArray**) branch->GetAddress();
-  char fileName[15];
+  TString fileName;
   AliFstream* outfile;         // logical name of the output file 
   AliRawDataHeaderSim header;
 
   //loop over DDLs
   for(Int_t ddl=0;ddl<AliDAQ::NumberOfDdls("ITSSPD");ddl++){
-    strcpy(fileName,AliDAQ::DdlFileName("ITSSPD",ddl)); //The name of the output file.
-    outfile = new AliFstream(fileName);
+    fileName.Form("%s",AliDAQ::DdlFileName("ITSSPD",ddl)); //The name of the output file.
+    outfile = new AliFstream(fileName.Data());
     //write Dummy DATA HEADER
     UInt_t dataHeaderPosition=outfile->Tellp();
     outfile->WriteBuffer((char*)(&header),sizeof(header));
@@ -591,14 +592,14 @@ Int_t AliITSDDLRawData::RawDataSSD(TBranch* branch){
   fIndex=-1;
 
   TClonesArray*& digits = * (TClonesArray**) branch->GetAddress();
-  char fileName[15];
+  TString fileName;
   AliFstream* outfile;         // logical name of the output file 
   AliRawDataHeaderSim header;
 
   //loop over DDLs  
   for(Int_t i=0;i<AliDAQ::NumberOfDdls("ITSSSD");i++){
-    strcpy(fileName,AliDAQ::DdlFileName("ITSSSD",i)); //The name of the output file.
-    outfile = new AliFstream(fileName);
+    fileName.Form("%s",AliDAQ::DdlFileName("ITSSSD",i)); //The name of the output file.
+    outfile = new AliFstream(fileName.Data());
     //write Dummy DATA HEADER
     UInt_t dataHeaderPosition=outfile->Tellp();
     outfile->WriteBuffer((char*)(&header),sizeof(header));
@@ -638,7 +639,7 @@ Int_t AliITSDDLRawData::RawDataSDD(TBranch* branch, AliITSDDLModuleMapSDD* ddlsd
   fIndex=-1;
 
   TClonesArray*& digits = * (TClonesArray**) branch->GetAddress();
-  char fileName[15];
+  TString fileName;
   AliFstream* outfile;             // logical name of the output file 
   AliRawDataHeaderSim header;
   
@@ -648,7 +649,10 @@ 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);
   retcode = AliBitPacking::PackWord(0x3F1F1F1F,fifoFooterWord,0,31);
@@ -657,8 +661,8 @@ Int_t AliITSDDLRawData::RawDataSDD(TBranch* branch, AliITSDDLModuleMapSDD* ddlsd
  
   //loop over DDLs  
   for(Int_t i=0;i<AliDAQ::NumberOfDdls("ITSSDD");i++){
-    strcpy(fileName,AliDAQ::DdlFileName("ITSSDD",i)); //The name of the output file.
-    outfile = new AliFstream(fileName);
+    fileName.Form("%s",AliDAQ::DdlFileName("ITSSDD",i)); //The name of the output file.
+    outfile = new AliFstream(fileName.Data());
     //write Dummy DATA HEADER
     UInt_t dataHeaderPosition=outfile->Tellp();
     outfile->WriteBuffer((char*)(&header),sizeof(header));