]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSQAVirtualCheckable.cxx
GetRandom returning impact parameter bin and flag for hard process added.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSQAVirtualCheckable.cxx
index aff1e5f4792aabc28343cb619b414afd450e0944..21808b9e8e009262e190ab5f27b0000362b0faa0 100644 (file)
 
 // --- ROOT system ---
 
-#include "TClass.h"
 #include "TFolder.h"
 #include "TROOT.h"
-
+#include "TObjArray.h"
 
 // --- Standard library ---
 
-#include <iostream.h>
-
 // --- AliRoot header files ---
 
 #include "AliPHOSQAVirtualCheckable.h"
 #include "AliPHOSQAChecker.h"
 #include "AliPHOSQAAlarm.h" 
+  //#include "AliPHOSGetter.h" 
 
 ClassImp(AliPHOSQAVirtualCheckable)
 
@@ -44,28 +42,28 @@ ClassImp(AliPHOSQAVirtualCheckable)
   AliPHOSQAVirtualCheckable::AliPHOSQAVirtualCheckable(const char * name) : TNamed(name, name) 
 {
   // ctor, creates the task(s)
+  fType   = "" ; 
   fChange = kFALSE ; 
   // create a new folder that will hold the list of alarms
-  //  get the alice folder
-  TFolder * alice = (TFolder*)gROOT->GetListOfBrowsables()->FindObject("YSAlice") ;
   //  the folder that contains the alarms for PHOS   
-  fAlarms = (TFolder*)alice->FindObject("folders/QAAlarms/PHOS");   
+  fAlarms = (TFolder*)gROOT->FindObjectAny("Folders/Run/Conditions/QA/PHOS");   
   //  make it the owner of the objects that it contains
   fAlarms->SetOwner() ;
-  //  add the alarms list to //YSAlice/folders/QAAlarms/PHOS
-  TList * alarms = new TList() ; // deleted when fAlarms is deleted
+  //  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 ; 
-
 }
 
 //____________________________________________________________________________ 
   AliPHOSQAVirtualCheckable::~AliPHOSQAVirtualCheckable()
 {
-  // ctor 
-  delete fAlarms ; 
-  delete fType ; 
+  // dtor 
+
+  fAlarms->Clear() ; 
+  //PH  delete fAlarms ; 
 }
 
 //____________________________________________________________________________ 
@@ -83,9 +81,9 @@ ClassImp(AliPHOSQAVirtualCheckable)
   void AliPHOSQAVirtualCheckable::Alarms() const
 {
   // Prints all the alarms 
-  TList * alarms = GetAlarms() ; 
+  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 ; 
@@ -103,10 +101,10 @@ void AliPHOSQAVirtualCheckable::CheckMe()
 }
 
 //____________________________________________________________________________ 
-void AliPHOSQAVirtualCheckable::RaiseAlarm(const char * time, const char * checked, const char * checker, const char * message)
+void AliPHOSQAVirtualCheckable::RaiseAlarm(const char * time, const char * checked, const char * checker, const char * message) const
 {
-  // Raise an alarm and store it in the appropriate folder : //YSAlice/folders/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) ; 
 }
@@ -126,12 +124,12 @@ void AliPHOSQAVirtualCheckable::RaiseAlarm(const char * time, const char * check
   void AliPHOSQAVirtualCheckable::ResetAlarms()
 {
   // resets the list of alarms (delete the alarms from the list)
-  TList * alarms = GetAlarms() ; 
+  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 +139,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() ) )