]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/PHOSGAINda.cxx
Made these classes derive from AliCFGridSparse.
[u/mrichter/AliRoot.git] / PHOS / PHOSGAINda.cxx
index bc0c994ad5c7f8294768a063a61c9d3108cacf86..ea945309fd3c57013285508cbb8c5598a4c0fcb8 100644 (file)
@@ -2,12 +2,12 @@
 contact: Boris.Polishchuk@cern.ch
 link: see comments in the $ALICE_ROOT/PHOS/AliPHOSRcuDA1.cxx
 reference run: /castor/cern.ch/alice/phos/2007/10/04/18/07000008249001.1000.root
-run type: PHYSICS, STANDALONE
+run type: PHYSICS
 DA type: MON 
 number of events needed: 1000
 input files: RCU0.data  RCU1.data  RCU2.data  RCU3.data
 Output files: PHOS_Module2_Calib.root
-trigger types used: L0
+Trigger types used: PHYSICS
 */
 
 
@@ -21,6 +21,8 @@ extern "C" {
 #include <stdlib.h>
 
 #include <TSystem.h>
+#include <TROOT.h>
+#include <TPluginManager.h>
 
 #include "AliRawReader.h"
 #include "AliRawReaderDate.h"
@@ -35,12 +37,29 @@ extern "C" {
 */
 int main(int argc, char **argv) {
 
+  gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo",
+                                       "*",
+                                       "TStreamerInfo",
+                                       "RIO",
+                                       "TStreamerInfo()");
+
   int status;
   
   if (argc!=2) {
     printf("Wrong number of arguments\n");
     return -1;
   }
+
+  /* Retrieve mapping files from DAQ DB */ 
+  const char* mapFiles[4] = {"RCU0.data","RCU1.data","RCU2.data","RCU3.data"};
+
+  for(Int_t iFile=0; iFile<4; iFile++) {
+    int failed = daqDA_DB_getFile(mapFiles[iFile], mapFiles[iFile]);
+    if(failed) { 
+      printf("Cannot retrieve file %s from DAQ DB. Exit.\n",mapFiles[iFile]);
+      return -1;
+    }
+  }
   
   /* Open mapping files */
   AliAltroMapping *mapping[4];
@@ -170,5 +189,18 @@ int main(int argc, char **argv) {
   
   for(Int_t i = 0; i < 4; i++) delete mapping[i];  
   
+  /* Be sure that all histograms are saved */
+
+  da1.UpdateHistoFile();
+  da1.SetWriteToFile(kFALSE);
+  
+  /* Store output files to the File Exchange Server */
+  char localfile[128];
+  
+  for(Int_t iMod=0; iMod<5; iMod++) {
+    sprintf(localfile,"PHOS_Module%d_Calib.root",iMod);
+    daqDA_FES_storeFile(localfile,"AMPLITUDES");
+  }
+  
   return status;
 }