]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDBaseDA.cxx
disable doxygen latex output
[u/mrichter/AliRoot.git] / FMD / AliFMDBaseDA.cxx
index 8654f38bc0a166a326147b04feed1a0812145240..373c732be4bbd6f70635fde3f1ff437caa32a620 100644 (file)
@@ -29,6 +29,7 @@
 #include "iostream"
 
 #include "AliFMDRawReader.h"
+#include "AliFMDCalibSampleRate.h"
 #include "AliLog.h"
 //_____________________________________________________________________
 ClassImp(AliFMDBaseDA)
@@ -61,6 +62,7 @@ AliFMDBaseDA::AliFMDBaseDA(const AliFMDBaseDA & baseDA) :
   
 }
 
+
 //_____________________________________________________________________
 AliFMDBaseDA::~AliFMDBaseDA() {
 
@@ -116,7 +118,7 @@ void AliFMDBaseDA::Run(AliRawReader* reader) {
   
   reader->NextEvent();
   reader->NextEvent();
-  
+  int lastProgress = 0;
   
   for(Int_t n =1;n <= GetRequiredEvents(); n++)
     {
@@ -132,12 +134,18 @@ void AliFMDBaseDA::Run(AliRawReader* reader) {
       //std::cout<<"In event # "<< *(reader->GetEventId()) << " with " <<digitArray->GetEntries()<<" digits     \r"<<std::flush;
       
       
-      for(Int_t i = 0; i<digitArray->GetEntries();i++) {
+      for(Int_t i = 0; i<digitArray->GetEntriesFast();i++) {
        AliFMDDigit* digit = static_cast<AliFMDDigit*>(digitArray->At(i));
        FillChannels(digit);
       }
       
       FinishEvent();
+      int progress = int((n *100)/ GetRequiredEvents()) ;
+      if (progress <= lastProgress) continue;
+      lastProgress = progress;
+      std::cout << "Progress: " << lastProgress << " / 100 " << std::endl;
+      
+
       
     }
   AliInfo(Form("Looped over %d events",GetCurrentEvent()));
@@ -209,16 +217,35 @@ void AliFMDBaseDA::WriteConditionsData() {
   fConditionsFile.write(Form("# %s \n",pars->GetConditionsShuttleID()),14);
   fConditionsFile.write("# Sample Rate, timebins \n",25);
   
-  UInt_t sampleRate = 4;
+  UInt_t defSampleRate = 4;
   UInt_t timebins   = 544;
-  fConditionsFile     << sampleRate   << ',' 
+  AliFMDCalibSampleRate* sampleRate = new AliFMDCalibSampleRate();
+  for(UShort_t det=1;det<=3;det++) {
+    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++)  {
+       for(UShort_t strip = 0; strip < nstr; strip++) {
+         sampleRate->Set(det,ring,sec,strip,defSampleRate);
+       }
+      }
+    }
+  }
+  
+  pars->SetSampleRate(sampleRate);
+  
+  
+  fConditionsFile     << defSampleRate   << ',' 
                      << timebins     <<"\n";
-  //if(fConditionsFile.is_open()) {
-  //  
-  //  fConditionsFile.write("# EOF\n",6);
-  //  fConditionsFile.close();
+  
+  if(fConditionsFile.is_open()) {
     
-  //}
+    //  fConditionsFile.write("# EOF\n",6);
+    fConditionsFile.close();
+    
+  }
   
 }