]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/PMDPEDESTALda.cxx
Restored compilation
[u/mrichter/AliRoot.git] / PMD / PMDPEDESTALda.cxx
index 2c8ede26fee0c00b1362d6f19a04a58ce0d11971..dda379b49f1233e57f9354031a9a80b4be1aaa08 100644 (file)
@@ -4,7 +4,7 @@ PMD DA for online calibration
 contact: basanta@phy.iitb.ac.in
 Link:
 Reference Run:/afs/cern.ch/user/b/bnandi/public/pedestaldata/run37820.raw
-Run Type: STANDALONE
+Run Type: PEDESTAL
 DA Type: LDC
 Number of events needed: 1000
 Input Files: 
@@ -36,8 +36,6 @@ extern "C" {
 #include "TROOT.h"
 #include "TPluginManager.h"
 
-
-
 /* Main routine
       Arguments: 
       1- monitoring data source
@@ -136,7 +134,6 @@ int main(int argc, char **argv) {
                break;
                
            case PHYSICS_EVENT:
-             //if(iev%100 == 0)printf(" event number = %i \n",iev);
 
                AliRawReader *rawReader = new AliRawReaderDate((void*)event);
                TObjArray *pmdddlcont = new TObjArray();
@@ -153,6 +150,16 @@ int main(int argc, char **argv) {
        
        /* exit when last event received, no need to wait for TERM signal */
 
+       // either END_OF_RUN or 1000 events
+
+       if (iev == 1000)
+         {
+           printf("-- 1000 pedestal events processed : terminating --\n");
+           printf("-- eventT is set to END_OF_RUN --\n");
+           eventT = END_OF_RUN;
+           break;
+         }
+
     }
 
     printf(" Total number of events processed = %i \n",iev);
@@ -171,13 +178,28 @@ int main(int argc, char **argv) {
     delete ped;
     ped = 0;
 
+/* store the pedestal file in database */
 
-/* store the result file on FES */
+    status = daqDA_DB_storeFile("PMD_PED.root","PMD_PED.root");
+
+    if (!status)
+      {
+       printf("--- PEDESTAL root FILE IS IN THE DAQ DATABASE\n");
+      }
+    else
+      {
+       printf("--- Storing the root file into the database failed\n");
+      }
+
+/* store the pedestal file on FES */
  
-    status = daqDA_FES_storeFile("PMD_PED.root","pedestal");
+    status = daqDA_FES_storeFile("PMD_PED.root","PMD_PED.root");
     if (status) {
        status = -2;
     }
 
+
+
+
     return status;
 }