]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSDDLRawData.cxx
Algorithm to do event inspection - trigger, vertex
[u/mrichter/AliRoot.git] / ITS / AliITSDDLRawData.cxx
index 5ce7908e9dd6e03a82f3546f7cbd185ce8c809b8..ecf8c729f211f9075e4d3cf136bc9e30889d51fb 100644 (file)
@@ -98,7 +98,8 @@ void AliITSDDLRawData::GetDigitsSSD(TClonesArray *ITSdigits,Int_t mod,Int_t modR
       ix=digs->GetCoord2();  // Strip Number
       is=digs->GetCompressedSignal();  // ADC Signal
       // cout<<" Module:"<<mod-500<<" N/P side:"<<iz<<" Strip Number:"<<ix<<" Amplidute:"<<is-1<<endl;
-      if(is<0) is = 4096 + is;
+      if(is<0) is = 0;
+      if(is>4095) is = 4095;
       if (fVerbose==2)
        ftxt<<"DDL:"<<ddl<<" Mod: "<<modR<<" N/P: "<<iz<<" Strip: "<<ix<<" Value: "<<is-1<<endl;
 
@@ -543,14 +544,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));
@@ -590,14 +591,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));
@@ -637,7 +638,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;
   
@@ -656,8 +657,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));
@@ -758,3 +759,4 @@ void  AliITSDDLRawData::WriteHit(UInt_t *buf,Int_t RowAddr,Int_t HitAddr,UInt_t
   }//end else
   return;
 }//end WriteHit
+