]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/ITSSPDPHYSda.cxx
Eff C++ warning removal (Marian)
[u/mrichter/AliRoot.git] / ITS / ITSSPDPHYSda.cxx
index 58dec6709905c9b905ad159072a3d320fbdbff4f..4869f12c629d28bd5de4deb5ed900b9ea71d62dc 100644 (file)
@@ -1,12 +1,12 @@
 /*
-- "Contact:" - henrik.tydesjo@cern.ch
-- "Link:" - 
-- "Run Type:" - PHYSICS
-- "DA Type:" - MON
-- "Number of events needed:"
-- "Input Files:" - daq db config files: spd_physics_params ,  previous dead ref: ./calibResults/DeadReferenceTmp/* , previous dead lists: ./calibResults/DeadToFXS/*
-- "Output Files:" - Ref Data: ./calibResults/NoisyReference/* ,  Ref Data: ./calibResults/DeadReference/* ,  noisy lists: ./calibResults/NoisyToFXS/* ,  persistent files: ./calibResults/DeadReferenceTmp/*,./calibResults/DeadToFXS/*
-- "Trigger types used:" PHYSICS
+Contact: henrik.tydesjo@cern.ch
+Link: tydes.home.cern.ch/tydes/doc/CalibrationOverview/CalibrationAlgorithms/
+Run Type: PHYSICS
+DA Type: MON
+Number of events needed: Depending on muliplicity per event
+Input Files: spd_physics_params ,  ./calibResults/DeadReferenceTmp/* ,  ./calibResults/DeadToFXS/*
+Output Files: ./calibResults/NoisyReference/* ,  ./calibResults/DeadReference/* ,  ./calibResults/NoisyToFXS/* ,  ./calibResults/DeadReferenceTmp/*,./calibResults/DeadToFXS/*
+Trigger types used: PHYSICS
 */
 
 ////////////////////////////////////////////////////////////////////////////////
 //                                                                            //
 ////////////////////////////////////////////////////////////////////////////////
 
+#ifndef SPD_DA_OFF
 extern "C" {
 #include "daqDA.h"
 }
+#endif
 #include "event.h"
 #include "monitor.h"
 #include "AliRawReaderDate.h"
@@ -127,6 +129,10 @@ int main(int argc, char **argv) {
   // ********* STEP 1: Produce phys container files (Reference Data). ***********************************
 
 #ifndef SPD_DA_OFF
+  if (getenv("DATE_RUN_NUMBER")==0) {
+    printf("DATE_RUN_NUMBER not properly set.\n");
+    return -1;
+  }
   int runNr = atoi(getenv("DATE_RUN_NUMBER"));
 #else
   int runNr = atoi(argv[1]);
@@ -432,6 +438,7 @@ int main(int argc, char **argv) {
 //  }
 //***  
 
+  printf("Opening id list file\n");
   TString idsFXSFileName = Form("%s/FXSids_run_%d.txt",saveDirIdsToFXS,runNr);
   ofstream idsFXSfile;
   idsFXSfile.open(idsFXSFileName.Data());
@@ -444,10 +451,12 @@ int main(int argc, char **argv) {
 
 
 
+    printf("Preparing dead reference data\n");
     // send reference data for dead pixels to FXS
     TString tarFiles = "";
     for (UInt_t eqId=0; eqId<20; eqId++) {
       if (eqActiveDead[eqId]) {
+       printf("Preparing dead pixels for eq %d\n",eqId);
        // move file to ref dir
        TString fileName = Form("%s/SPDphys_dead_run_0_0_eq_%d.root",saveDirDeadRefTmp,eqId);
        TString newFileName = Form("%s/SPDphys_dead_run_%d_%d_eq_%d.root",saveDirDeadRef,firstRunNrDead,runNr,eqId);
@@ -495,6 +504,7 @@ int main(int argc, char **argv) {
   }
 
 
+  printf("Preparing noisy reference data\n");
   // send reference data for this run to FXS
   TString tarFiles = "";
   for (UInt_t eqId=0; eqId<20; eqId++) {
@@ -533,6 +543,9 @@ int main(int argc, char **argv) {
 //#endif
 
 
+
+
+  printf("Preparing dead files\n");
   // send dead pixels to FXS
   //  if (nrDeadFilesToTar>0) { //*** old code (used if not all dead data should be uploaded)
   // send a tared file of all the dead files
@@ -554,6 +567,7 @@ int main(int argc, char **argv) {
 
   // send noisy pixels to FXS
   if (handler->GetNrNoisy()>0) { // there must be at least one file created
+    printf("Preparing noisy files\n");
     // send a tared file of all the noisy files
     TString command = Form("cd %s; tar -cf noisy_phys.tar *",saveDirNoisyToFXS);
     //    printf("\n\n%s\n\n",command.Data());
@@ -577,7 +591,7 @@ int main(int argc, char **argv) {
 #ifndef SPD_DA_OFF
   status = daqDA_FES_storeFile(idsFXSFileName.Data(),id.Data());
   if (status!=0) {
-    printf("Failed to export file %s , status %d\n",fileName.Data(),status);
+    printf("Failed to export file %s , status %d\n",idsFXSFileName.Data(),status);
     return -1;
   }
 #endif
@@ -589,4 +603,4 @@ int main(int argc, char **argv) {
 
 
   return 0;
-}
+}
\ No newline at end of file