]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSQAVirtualCheckable.cxx
Some corrections for caller == 40.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSQAVirtualCheckable.cxx
index a6bc4e69c649a79d95fb87db5aa8b5135fcb659d..39842551b1bd8e90ee5731311261d4c46e7ebde9 100644 (file)
 
 // --- Standard library ---
 
-#include <iostream.h>
-
 // --- AliRoot header files ---
 
 #include "AliPHOSQAVirtualCheckable.h"
 #include "AliPHOSQAChecker.h"
 #include "AliPHOSQAAlarm.h" 
-#include "AliPHOSGetter.h" 
+#include "AliPHOSLoader.h" 
 #include "AliPHOS.h" 
 
 ClassImp(AliPHOSQAVirtualCheckable)
@@ -50,12 +48,26 @@ ClassImp(AliPHOSQAVirtualCheckable)
   fType   = "" ; 
   fChange = kFALSE ; 
   // create a new folder that will hold the list of alarms
-  //  the folder that contains the alarms for PHOS   
-  fAlarms = (TFolder*)gROOT->FindObjectAny("YSAlice/WhiteBoard/QAAlarms/PHOS");   
+  //  the folder that con tains the alarms for PHOS   
+  
+  TFolder* topfold = AliConfig::Instance()->GetTopFolder(); //get top aliroot folder; skowron
+  TString phosqafn(AliConfig::Instance()->GetQAFolderName()); //get name of QAaut folder relative to top; skowron
+  phosqafn+="/PHOS"; //hard wired string!!! add the detector name to the pathname; skowron 
+  fAlarms = (TFolder*)topfold->FindObjectAny(phosqafn); //get the folder
+// 4 lines above substitute the one below  
+//  fAlarms = (TFolder*)gROOT->FindObjectAny("Folders/Run/Conditions/QA/PHOS");   
+  
+  if(fAlarms == 0x0)  //if there is no folder; skowron
+   {
+     Fatal("AliPHOSQAVirtualCheckable","Can not find folder with Alarms for PHOS"); //abort
+     return;//never reached
+   }
+  
   //  make it the owner of the objects that it contains
   fAlarms->SetOwner() ;
-  //  add the alarms list to //YSAlice/WhiteBoard/QAAlarms/PHOS
+  //  add the alarms list to //Folders/Run/Conditions/QA/PHOS
   TObjArray * alarms = new TObjArray() ; // deleted when fAlarms is deleted
+  alarms->SetOwner() ; 
   alarms->SetName(name) ; 
   fAlarms->Add(alarms) ; 
   fChecker = 0 ; 
@@ -64,8 +76,10 @@ ClassImp(AliPHOSQAVirtualCheckable)
 //____________________________________________________________________________ 
   AliPHOSQAVirtualCheckable::~AliPHOSQAVirtualCheckable()
 {
-  // ctor 
-  delete fAlarms ; 
+  // dtor 
+
+  fAlarms->Clear() ; 
+  //PH  delete fAlarms ; 
 }
 
 //____________________________________________________________________________ 
@@ -85,7 +99,7 @@ ClassImp(AliPHOSQAVirtualCheckable)
   // Prints all the alarms 
   TObjArray * alarms = GetAlarms() ; 
   if (alarms->IsEmpty() )
-    cout << " No alarms raised for checkable " << GetName() << endl ; 
+    Info("Alarms", "No alarms raised for checkable %s", GetName()) ; 
   else {
     TIter next(alarms);
     AliPHOSQAAlarm * alarm ; 
@@ -105,8 +119,8 @@ void AliPHOSQAVirtualCheckable::CheckMe()
 //____________________________________________________________________________ 
 void AliPHOSQAVirtualCheckable::RaiseAlarm(const char * time, const char * checked, const char * checker, const char * message)
 {
-  // Raise an alarm and store it in the appropriate folder : //YSAlice/WhiteBoard/QAAlarms/PHOS/..
-  // cout << message ; 
+  // Raise an alarm and store it in the appropriate folder : //Folders/Run/Conditions/QA/PHOS..
+  // Info("RaiseAlarm", "%s", message) ; 
   AliPHOSQAAlarm * alarm = new AliPHOSQAAlarm(time, checked, checker, message)  ;   
   GetAlarms()->Add(alarm) ; 
 }
@@ -128,10 +142,10 @@ void AliPHOSQAVirtualCheckable::RaiseAlarm(const char * time, const char * check
   // resets the list of alarms (delete the alarms from the list)
   TObjArray * alarms = GetAlarms() ; 
   if (alarms->IsEmpty() )
-    cout << " No alarms raised for checkable " << GetName() << endl ; 
+    Info("ResetAlarms", "No alarms raised for checkable %s", GetName()) ; 
   else {
     alarms->Delete() ; 
-    cout << " Reset alarms for checkable " << GetName() << endl ; 
+    Info("ResetAlarms", " Reset alarms for checkable %s", GetName()) ; 
   }
 }
 
@@ -141,9 +155,9 @@ void AliPHOSQAVirtualCheckable::RaiseAlarm(const char * time, const char * check
   // Tells which checkers are attached to this checkable
   TList * list = fChecker->GetListOfTasks(); 
   if (list->IsEmpty() )
-    cout << "No checkers are in use for " << GetName() << endl ;
+    Info("Status", "No checkers are in use for %s", GetName()) ;
   else {    
-    cout << "The following checkers are in use for " << GetName() << endl ;
+    Info("Status", "The following checkers are in use for %s", GetName()) ;
     TIter next(list) ; 
     AliPHOSQAChecker * checker ; 
     while ( (checker = (AliPHOSQAChecker*)next() ) )