Fix in the TMonaLisaWriter constructor. Additional protection
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 18 Dec 2007 17:23:43 +0000 (17:23 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 18 Dec 2007 17:23:43 +0000 (17:23 +0000)
test/PbPbbench/monrec.C
test/PbPbbench/monsim.C
test/ppbench/monrec.C
test/ppbench/monsim.C

index e4182826d981d27a707207bd503568c3463344f2..df90268b0c2b7a0d1266b7c70f928a241be94fa1 100644 (file)
@@ -3,12 +3,12 @@ void monrec() {
   gSystem->Load("libNet.so");
   gSystem->Load("libMonaLisa.so");
 
-  new TMonaLisaWriter(gSystem->Getenv("TEST_PLATFORMID"),"Reconstruction PbPb","aliendb3.cern.ch");
+  new TMonaLisaWriter("aliendb3.cern.ch", "Reconstruction PbPb", gSystem->Getenv("TEST_PLATFORMID"), gSystem->Getenv("TEST_PLATFORMID"));
 
 
   gROOT->LoadMacro("rec.C");
   rec();
-  gMonitoringWriter->SendProcessingProgress(1,1,kTRUE);  
+  if (gMonitoringWriter) gMonitoringWriter->SendProcessingProgress(1,1,kTRUE);  
 
   // Send the size of the AliESDs.root file
 
@@ -21,7 +21,7 @@ void monrec() {
   TMonaLisaValue* valdouble = new TMonaLisaValue("AliESDs.root size",buf.fSize);
   valuelist->Add(valdouble);
 
-  gMonitoringWriter->SendParameters(valuelist);
+  if (gMonitoringWriter) gMonitoringWriter->SendParameters(valuelist);
   delete valuelist;
 
   printf("#Test finished successfully#\n");
index f7a828ef4a80cd8808a1286b465f11134d175bd4..92c4bc23d0bfe4208074fbb234208bb973f29e51 100644 (file)
@@ -3,11 +3,11 @@ void monsim(Int_t nev=1){
   gSystem->Load("libNet.so");
   gSystem->Load("libMonaLisa.so");
 
-  new TMonaLisaWriter(gSystem->Getenv("TEST_PLATFORMID"),"Simulation PbPb","aliendb3.cern.ch");
+  new TMonaLisaWriter("aliendb3.cern.ch", "Simulation PbPb", gSystem->Getenv("TEST_PLATFORMID"), gSystem->Getenv("TEST_PLATFORMID"));
 
   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
 
@@ -20,7 +20,7 @@ void monsim(Int_t nev=1){
   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");
index 39b5c487930d710cc1bb6c2a2609056122c0627a..2b9466c04dc456b70fcaac8d82302dc0c7d5b323 100644 (file)
@@ -3,12 +3,12 @@ void monrec() {
   gSystem->Load("libNet.so");
   gSystem->Load("libMonaLisa.so");
 
-  new TMonaLisaWriter(gSystem->Getenv("TEST_PLATFORMID"),"Reconstruction pp","aliendb3.cern.ch");
+  new TMonaLisaWriter("aliendb3.cern.ch", "Reconstruction pp", gSystem->Getenv("TEST_PLATFORMID"), gSystem->Getenv("TEST_PLATFORMID"));
 
 
   gROOT->LoadMacro("rec.C");
   rec();
-  gMonitoringWriter->SendProcessingProgress(1,1,kTRUE);  
+  if (gMonitoringWriter) gMonitoringWriter->SendProcessingProgress(1,1,kTRUE);  
 
   // Send the size of the AliESDs.root file
 
@@ -21,7 +21,7 @@ void monrec() {
   TMonaLisaValue* valdouble = new TMonaLisaValue("AliESDs.root size",buf.fSize);
   valuelist->Add(valdouble);
 
-  gMonitoringWriter->SendParameters(valuelist);
+  if (gMonitoringWriter) gMonitoringWriter->SendParameters(valuelist);
   delete valuelist;
 
   printf("#Test finished successfully#\n");
index 99de62cfa69c16a1165e1a3b72bd32f8d835367a..873a35731c60bb274edc2fcf7dcd511256a01b00 100644 (file)
@@ -3,11 +3,11 @@ void monsim(Int_t nev=20){
   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);
-  gMonitoringWriter->SendProcessingProgress(1,1,kTRUE);  
+  if (gMonitoringWriter) gMonitoringWriter->SendProcessingProgress(1,1,kTRUE);  
 
   // 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);
 
-  gMonitoringWriter->SendParameters(valuelist);
+  if (gMonitoringWriter) gMonitoringWriter->SendParameters(valuelist);
   delete valuelist;
 
   printf("#Test finished successfully#\n");