]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSBadChannelsAuxSPD.cxx
Fix to return the TOF cluster index (Francesco)
[u/mrichter/AliRoot.git] / ITS / AliITSBadChannelsAuxSPD.cxx
index 5459b06a8374dc664f95af47813143ab5a99e0a9..07dc9792f47d3fc2aa6ef5e14bc96ec9d4038a23 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.1  2005/10/11 12:31:50  masera
+Preprocessor classes for SPD (Paul Nilsson)
+
 */
 
 ///////////////////////////////////////////////////////////////////////////
@@ -64,6 +67,10 @@ $Log$
 // The signal member of the digit is not a member of the channel class.
 // It is artificially introduced by the CreateDigitFromChannel method and
 // is per default set to 1.
+//
+// Modified by D. Elia, H. Tydesjo
+// March 2006: Mixed up coordinates, bug fixed
+//
 ///////////////////////////////////////////////////////////////////////////
 
 #include "AliITSBadChannelsAuxSPD.h"
@@ -211,7 +218,7 @@ Bool_t AliITSBadChannelsAuxSPD::Find(AliITSdigitSPD *&digit, TObjArray *&array)
   const Int_t kN = array->GetEntries();
   Int_t channelNr = 0;
   Int_t column = digit->GetCoord1();
-  Int_t row = digit->GetCoord1();
+  Int_t row = digit->GetCoord2();
 
   // Loop over all channels in the array
   while (channelNr < kN)
@@ -284,7 +291,7 @@ Int_t AliITSBadChannelsAuxSPD::GetNumberOfBadChannels(Int_t* &badChannelsArray,
 
 //__________________________________________________________________________
 Bool_t AliITSBadChannelsAuxSPD::CreateHTMLReport(char *name, Int_t* &badChannelsArray, Int_t* &indexArray,
-                                                const Int_t indexArraySize, TString *buffer, Bool_t tags)
+                                                Int_t indexArraySize, TString *buffer, Bool_t tags)
 {
   // Create an HTML report from the bad channels array
   //
@@ -331,11 +338,11 @@ Bool_t AliITSBadChannelsAuxSPD::CreateHTMLReport(char *name, Int_t* &badChannels
 
          // Create report
          buffer->Append("SPD module = ");
-         sprintf(temp,"%d",module);
+         snprintf(temp,9,"%d",module);
          buffer->Append(temp);
          buffer->Append("<br>\n");
          buffer->Append("Number of bad channels = ");
-         sprintf(temp,"%d",size);
+         snprintf(temp,9,"%d",size);
          buffer->Append(temp);
 
          tags ? buffer->Append("<br>\n") : buffer->Append("\n");
@@ -348,10 +355,10 @@ Bool_t AliITSBadChannelsAuxSPD::CreateHTMLReport(char *name, Int_t* &badChannels
            {
              // Create and add the current channel
              buffer->Append("(");
-             sprintf(temp,"%d",badChannelsArray[position++]);
+             snprintf(temp,10,"%d",badChannelsArray[position++]);
              buffer->Append(temp);
              buffer->Append(", ");
-             sprintf(temp,"%d",badChannelsArray[position++]);
+             snprintf(temp,10,"%d",badChannelsArray[position++]);
              buffer->Append(temp);
              buffer->Append(")");
 
@@ -381,19 +388,19 @@ Bool_t AliITSBadChannelsAuxSPD::CreateHTMLReport(char *name, Int_t* &badChannels
   tags ? buffer->Append("<br>\n") : buffer->Append("\n");
 
   buffer->Append("Total number of bad channels = ");
-  sprintf(temp,"%d",totalNumberOfBadChannels);
+  snprintf(temp,10,"%d",totalNumberOfBadChannels);
   buffer->Append(temp);
 
   tags ? buffer->Append("<br>\n") : buffer->Append("\n");
 
   buffer->Append("Number of modules with bad channels = ");
-  sprintf(temp,"%d",numberOfModulesWithBadChannels);
+  snprintf(temp,10,"%d",numberOfModulesWithBadChannels);
   buffer->Append(temp);
 
   tags ? buffer->Append("<br>\n") : buffer->Append("\n");
 
   buffer->Append("Number of modules = ");
-  sprintf(temp,"%d",indexArraySize);
+  snprintf(temp,10,"%d",indexArraySize);
   buffer->Append(temp);
 
   if (tags)