]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/TPCPULSERda.cxx
patch for GCC < 4.3
[u/mrichter/AliRoot.git] / TPC / TPCPULSERda.cxx
index ef4059c9d8719aa9fe9582f32073e7e0a4cd5682..e9003803aee5239bb3bff73cd1cd0d3d7a4c8f31 100644 (file)
@@ -198,10 +198,6 @@ int main(int argc, char **argv) {
       // get the run number
       runNb = event->eventRunNb;
       //  Pulser calibration
-//       AliRawReader *rawReader = new AliRawReaderDate((void*)event);
-//       if ( fastDecoding ) calibPulser.ProcessEventFast(rawReader);
-//       else calibPulser.ProcessEvent(rawReader);
-//       delete rawReader;
       calibPulser.ProcessEvent(event);
 
       /* free resources */
@@ -241,7 +237,7 @@ int main(int argc, char **argv) {
  
   //find processed sector
   Char_t sideName='A';
-  Int_t sector = 0;
+  Int_t sector = -1;
   for ( Int_t roc = 0; roc < 72; roc++ ) {
     if ( !calibPulser.GetCalRocT0(roc) ) continue;
     if (mapping->GetSideFromRoc(roc)==1) sideName='C';
@@ -250,19 +246,23 @@ int main(int argc, char **argv) {
   gSystem->Setenv("AMORE_DA_NAME",Form("TPC-%c%02d-%s",sideName,sector,FILE_ID));
   // 
   // end cheet
-  TDatime time;
-  TObjString info(Form("Run: %u; Date: %s",runNb,time.AsString()));
+  if (sector>-1){
+    TDatime time;
+    TObjString info(Form("Run: %u; Date: %s",runNb,time.AsSQLString()));
     
-  amore::da::AmoreDA amoreDA(amore::da::AmoreDA::kSender);
-  Int_t statusDA=0;  
-  statusDA+=amoreDA.Send("PulserT0",calibPulser.GetCalPadT0());
-  statusDA+=amoreDA.Send("PulserQ",calibPulser.GetCalPadQ());
-  statusDA+=amoreDA.Send("PulserRMS",calibPulser.GetCalPadRMS());
-  statusDA+=amoreDA.Send("arrayTmean",calibPulser.GetMeanTimeSectorArray());
-  statusDA+=amoreDA.Send("Info",&info);
-  if ( statusDA!=0 )
-    printf("Waring: Failed to write one of the calib objects to the AMORE database\n");
-  // reset env var  
+    amore::da::AmoreDA amoreDA(amore::da::AmoreDA::kSender);
+    Int_t statusDA=0;
+    statusDA+=amoreDA.Send("PulserT0",calibPulser.GetCalPadT0());
+    statusDA+=amoreDA.Send("PulserQ",calibPulser.GetCalPadQ());
+    statusDA+=amoreDA.Send("PulserRMS",calibPulser.GetCalPadRMS());
+    statusDA+=amoreDA.Send("arrayTmean",calibPulser.GetMeanTimeSectorArray());
+    statusDA+=amoreDA.Send("Info",&info);
+    if ( statusDA!=0 )
+      printf("Waring: Failed to write one of the calib objects to the AMORE database\n");
+  } else {
+    printf("Waring: No data found!\n");
+  }
+  // reset env var
   if (amoreDANameorig) gSystem->Setenv("AMORE_DA_NAME",amoreDANameorig);
 
   return status;