]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fixed bugs in the container management
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Jun 2008 14:23:13 +0000 (14:23 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Jun 2008 14:23:13 +0000 (14:23 +0000)
FMD/AliFMDCalibSampleRate.cxx
FMD/AliFMDCalibStripRange.cxx

index 5ab5e77fa13d27933ccb1e8106a8c3e7766eea31..607e7184c5b94be480071bc589a90a09dccfc0ed 100644 (file)
@@ -97,13 +97,13 @@ AliFMDCalibSampleRate::WriteToFile(ofstream &outFile)
     UShort_t FirstRing = (det == 1 ? 1 : 0);
     for (UShort_t ir = FirstRing; ir < 2; ir++) {
       Char_t   ring = (ir == 0 ? 'O' : 'I');
-      UShort_t nsec = (ir == 0 ? 40  : 20);
-      UShort_t nstr = (ir == 0 ? 256 : 512);
-      for(UShort_t sec =0; sec < nsec;  sec++)  {
-       outFile << det                   << ','
-               << ring                  << ','
-               << sec                   << ','
-               << Rate(det,ring,sec)    << "\n";
+      // UShort_t nsec = (ir == 0 ? 40  : 20);
+      
+      for(UShort_t board = 0; board < 2;  board++)  {
+       outFile << det                     << ','
+               << ring                    << ','
+               << board                   << ','
+               << Rate(det,ring,board)    << "\n";
          
 
       }
@@ -127,7 +127,7 @@ AliFMDCalibSampleRate::ReadFromFile(ifstream &inFile)
     
   }
   
-  UShort_t det, sec;
+  UShort_t det, board;
   Char_t ring;
   UShort_t sampleRate;
   Int_t thisline = inFile.tellg();
@@ -144,11 +144,12 @@ AliFMDCalibSampleRate::ReadFromFile(ifstream &inFile)
     inFile.seekg(thisline);
     inFile     >> det          >> c[0]
               >> ring         >> c[1]
-              >> sec          >> c[2]
+              >> board        >> c[2]
               >> sampleRate;
     
-   
-    Set(det,ring,sec,0,sampleRate);
+    UInt_t nSec  = (ring == 'I' ? 10 : 20);
+    UShort_t sector = board*nSec;
+    Set(det,ring,sector,0,sampleRate);
     
     
   }
index bb56f167ced3e702592f04de0436f518198878d0..26bb42245209e618f73781da16df3f4577d7fe71 100644 (file)
@@ -105,14 +105,12 @@ AliFMDCalibStripRange::WriteToFile(ofstream &outFile)
     UShort_t FirstRing = (det == 1 ? 1 : 0);
     for (UShort_t ir = FirstRing; ir < 2; ir++) {
       Char_t   ring = (ir == 0 ? 'O' : 'I');
-      UShort_t nsec = (ir == 0 ? 40  : 20);
-      UShort_t nstr = (ir == 0 ? 256 : 512);
-      for(UShort_t sec =0; sec < nsec;  sec++)  {
-       outFile << det                   << ','
-               << ring                  << ','
-               << sec                   << ','
-               << Min(det,ring,sec)     << ','
-               << Max(det,ring,sec)     << "\n";
+      for(UShort_t board =0; board < 2;  board++)  {
+       outFile << det                     << ','
+               << ring                    << ','
+               << board                   << ','
+               << Min(det,ring,board)     << ','
+               << Max(det,ring,board)     << "\n";
          
 
       }
@@ -136,9 +134,10 @@ AliFMDCalibStripRange::ReadFromFile(ifstream &inFile)
     
   }
   
-  UShort_t det, sec;
+  UShort_t det, board;
   Char_t ring;
   UShort_t min, max;
+  
   Int_t thisline = inFile.tellg();
   Char_t c[4];
   
@@ -154,12 +153,14 @@ AliFMDCalibStripRange::ReadFromFile(ifstream &inFile)
     inFile.seekg(thisline);
     inFile     >> det          >> c[0]
               >> ring         >> c[1]
-              >> sec          >> c[2]
+              >> board        >> c[2]
               >> min          >> c[3]
               >> max;
     
-    Set(det,ring,sec,0,min,max);
-  
+    UInt_t nSec  = (ring == 'I' ? 10 : 20);
+    UShort_t sector = board*nSec;
+    Set(det,ring,sector,0,min,max);
+    std::cout<<det<<"  "<<board<<"   "<<min<<"   "<<max<<std::endl;
   }
   
   inFile.seekg(0);