New ResetDetector method required by AMORE
[u/mrichter/AliRoot.git] / test / ppbench / monsim.C
index b29bfab..fcc88ff 100644 (file)
@@ -3,17 +3,11 @@ void monsim(Int_t nev=20){
   gSystem->Load("libNet.so");
   gSystem->Load("libMonaLisa.so");
 
-  SysInfo_t info;
-  gSystem->GetSysInfo(&info);
-
-  TString platform(info.fOS);
-  platform += ".";
-  platform += info.fCpuType;
-  new TMonaLisaWriter(platform.Data(),"Simulation pp","aliendb3.cern.ch");
+  new TMonaLisaWriter("aliendb3.cern.ch", "Simulation pp", gSystem->Getenv("TEST_PLATFORMID"), gSystem->Getenv("TEST_PLATFORMID"), "global");
 
   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
 
@@ -26,7 +20,8 @@ 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");
+}