]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - test/ppbench/monsim.C
Fix in the TMonaLisaWriter constructor. Additional protection
[u/mrichter/AliRoot.git] / test / ppbench / monsim.C
index 99de62cfa69c16a1165e1a3b72bd32f8d835367a..873a35731c60bb274edc2fcf7dcd511256a01b00 100644 (file)
@@ -3,11 +3,11 @@ void monsim(Int_t nev=20){
   gSystem->Load("libNet.so");
   gSystem->Load("libMonaLisa.so");
 
   gSystem->Load("libNet.so");
   gSystem->Load("libMonaLisa.so");
 
-  new TMonaLisaWriter(gSystem->Getenv("TEST_PLATFORMID"),"Simulation pp","aliendb3.cern.ch");
+  new TMonaLisaWriter("aliendb3.cern.ch", "Simulation pp", gSystem->Getenv("TEST_PLATFORMID"), gSystem->Getenv("TEST_PLATFORMID"));
 
   gROOT->LoadMacro("sim.C");
   sim(nev);
 
   gROOT->LoadMacro("sim.C");
   sim(nev);
-  gMonitoringWriter->SendProcessingProgress(1,1,kTRUE);  
+  if (gMonitoringWriter) gMonitoringWriter->SendProcessingProgress(1,1,kTRUE);  
 
   // Send the size of the raw.root file
 
 
   // Send the size of the raw.root file
 
@@ -20,7 +20,7 @@ void monsim(Int_t nev=20){
   TMonaLisaValue* valdouble = new TMonaLisaValue("raw.root size",buf.fSize);
   valuelist->Add(valdouble);
 
   TMonaLisaValue* valdouble = new TMonaLisaValue("raw.root size",buf.fSize);
   valuelist->Add(valdouble);
 
-  gMonitoringWriter->SendParameters(valuelist);
+  if (gMonitoringWriter) gMonitoringWriter->SendParameters(valuelist);
   delete valuelist;
 
   printf("#Test finished successfully#\n");
   delete valuelist;
 
   printf("#Test finished successfully#\n");