]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/TPCCEda.cxx
TPC PID update:
[u/mrichter/AliRoot.git] / TPC / TPCCEda.cxx
index d24b70bc19386b9e1669c6aea39639d62cb659d2..5a360222dbda0c1e8c025df34ad4ee14b0cce612 100644 (file)
@@ -138,6 +138,7 @@ int main(int argc, char **argv) {
   TString monitoringType("YES");
   Int_t   forceTriggerId=-1;
   Int_t   saveOption=2; // how to store the object. See AliTPCCalibCE::DumpToFile
+  Bool_t  skipAmore=kFALSE;
   
   if ( config.GetConfigurationMap()->GetValue("LaserTriggerName") ) {
     laserTriggerName=config.GetConfigurationMap()->GetValue("LaserTriggerName")->GetName();
@@ -158,6 +159,11 @@ int main(int argc, char **argv) {
     saveOption=TMath::Nint(config.GetValue("SaveOption"));
     printf("TPCCEda: Saving option set to: %d.\n",saveOption);
   }
+
+  if ( config.GetConfigurationMap()->GetValue("SkipAmore") ) {
+    skipAmore=((TObjString*)config.GetConfigurationMap()->GetValue("SkipAmore"))->GetString().Atoi();
+    printf("TPCCEda: Skip Amore set in config\n");
+  }
   
   //subsribe to laser triggers only in physics partition
   //if the trigger class is not available the return value is -1
@@ -274,7 +280,7 @@ int main(int argc, char **argv) {
         // send the data to AMOREdb
         if (stopWatch.RealTime()>updateInterval){
           calibCE->Analyse();
-          SendToAmoreDB(calibCE,runNb);
+          if (!skipAmore) SendToAmoreDB(calibCE,runNb);
           stopWatch.Start();
         } else {
           stopWatch.Continue();
@@ -310,24 +316,24 @@ int main(int argc, char **argv) {
   //
   // Analyse CE data and write them to rootfile
   //
-//   calibCE->Analyse();
   printf ("TPCCEda: %d events processed, %d used\n",nevents,calibCE->GetNeventsProcessed());
-  
-//   TFile * fileTPC = new TFile (RESULT_FILE,"recreate");
-//   calibCE->Write("tpcCalibCE");
-//   delete fileTPC;
+
+  //save data to file
   calibCE->DumpToFile(RESULT_FILE,Form("name=tpcCalibCE,type=%d",saveOption));
   printf("TPCCEda: Wrote %s\n",RESULT_FILE);
   
   /* store the result file on FES */
-  
   status=daqDA_FES_storeFile(RESULT_FILE,FILE_ID);
   if (status) {
     status = -2;
   }
-  
-  SendToAmoreDB(calibCE,runNb);
 
+  if (!skipAmore){
+    printf("TPCCEda: Amore part\n");
+    calibCE->Analyse();
+    SendToAmoreDB(calibCE,runNb);
+  }
+  
   delete calibCE;
   return status;
 }