]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/STEER/AliQAManager.cxx
Clearer fatal message.
[u/mrichter/AliRoot.git] / STEER / STEER / AliQAManager.cxx
index 4547a38452a6e18bd61ee50f6bc789f90f1fb1c7..1ac6cf86c700df3b4f400e66bc0235fd320a8ac1 100644 (file)
@@ -67,6 +67,7 @@
 #include "AliRunLoader.h"
 #include "AliRunTag.h"
 
+using std::ifstream;
 ClassImp(AliQAManager) 
 AliQAManager* AliQAManager::fgQAInstance = 0x0;
 
@@ -414,7 +415,7 @@ AliLoader * AliQAManager::GetLoader(Int_t iDet)
   if (!pluginHandler) {
     AliDebug(AliQAv1::GetQADebugLevel(), Form("defining plugin for %s", loaderName.Data())) ;
     TString libs = gSystem->GetLibraries() ;
-    if (libs.Contains("lib" + detName + "base.so") || (gSystem->Load("lib" + detName + "base.so") >= 0)) {
+    if (libs.Contains("lib" + detName + "base") || (gSystem->Load("lib" + detName + "base") >= 0)) {
       pluginManager->AddHandler("AliQADataMaker", detName, loaderName, detName + "loader", loaderName + "()") ;
     } else {
       pluginManager->AddHandler("AliLoader", detName, loaderName, detName, loaderName + "()") ;
@@ -505,15 +506,26 @@ AliQADataMaker * AliQAManager::GetQADataMaker(const Int_t iDet)
       TString libs = gSystem->GetLibraries() ;
       TString temp(smode) ;
       temp.ToLower() ; 
-      if (libs.Contains("lib" + detName + smode + ".so") || (gSystem->Load("lib" + detName + temp.Data() + ".so") >= 0)) {
-        pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName + "qadm", qadmName + "()") ;
+      if (libs.Contains("lib" + detName + smode + ".so") || (gSystem->Load("lib" + detName + temp.Data()) >= 0)) {
+        if ( iDet == AliQAv1::kMUON ) {
+          pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName + "qadm", qadmName + "(Bool_t,Bool_t)");
+        } else {
+          pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName + "qadm", qadmName + "()");
+        }
       } else {
-        pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName, qadmName + "()") ;
+        pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName, qadmName + "()");
       }
       pluginHandler = pluginManager->FindHandler("AliQADataMaker", detName) ;
     }
     if (pluginHandler && (pluginHandler->LoadPlugin() == 0)) {
-      qadm = (AliQADataMaker *) pluginHandler->ExecPlugin(0) ;
+      if ( iDet == AliQAv1::kMUON ) {
+        Bool_t mch = fActiveOnlineDetectors.Contains("MUONTRK");
+        Bool_t mtr = fActiveOnlineDetectors.Contains("MUONTRG");
+        qadm = (AliQADataMaker *) pluginHandler->ExecPlugin(2,mch,mtr);
+      }
+      else {
+        qadm = (AliQADataMaker *) pluginHandler->ExecPlugin(0);
+      }
     }
     if (qadm) {
       qadm->SetName(AliQAv1::GetDetName(iDet));
@@ -765,7 +777,7 @@ Bool_t AliQAManager::InitRunLoader()
          continue;
        if (libs.Contains("lib" + detName + "base.so")) 
          continue;
-       gSystem->Load("lib" + detName + "base.so");
+       gSystem->Load("lib" + detName + "base");
       }
       fRunLoader = AliRunLoader::Open(fGAliceFileName.Data());
       if (!fRunLoader) {
@@ -900,17 +912,17 @@ void AliQAManager::MergeCustom() const
   // search all the run numbers
   // search all the run numbers
   gROOT->ProcessLine(".! ls *QA*.root > QAtempo.txt") ;
-  TString QAfile ; 
-  FILE * QAfiles = fopen("QAtempo.txt", "r") ; 
+  TString theQAfile ; 
+  FILE * theQAfiles = fopen("QAtempo.txt", "r") ; 
   Int_t index = 0 ; 
   TList srunList ; 
   TIter nextRun(&srunList) ; 
   TObjString * srun = NULL ; 
   Int_t loRun = 999999999 ; 
   Int_t hiRun = 0 ; 
-  while ( QAfile.Gets(QAfiles) ) {
+  while ( theQAfile.Gets(theQAfiles) ) {
     Bool_t runExist = kFALSE ; 
-    TString srunNew(QAfile(QAfile.Index("QA.")+3, QAfile.Index(".root")-(QAfile.Index("QA.")+3))) ; 
+    TString srunNew(theQAfile(theQAfile.Index("QA.")+3, theQAfile.Index(".root")-(theQAfile.Index("QA.")+3))) ; 
     Int_t cuRun = srunNew.Atoi() ;
     if (cuRun < loRun) 
       loRun = cuRun ;