1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Checks the quality assurance. Under construction.
19 By comparing with reference data
23 // --- ROOT system ---
27 #include <TIterator.h>
31 // --- Standard library ---
33 // --- AliRoot header files ---
36 #include "AliQAChecker.h"
37 #include "AliVZEROQAChecker.h"
38 //#include "AliCDBEntry.h"
39 //#include "AliCDBManager.h"
41 ClassImp(AliVZEROQAChecker)
43 //__________________________________________________________________
44 const Double_t AliVZEROQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
47 // Main check function: Depending on the TASK, different checks will be applied
48 // Check for empty histograms
50 // AliDebug(1,Form("AliVZEROChecker"));
51 // AliCDBEntry *QARefRec = AliCDBManager::Instance()->Get("VZERO/QARef/RAW");
53 // AliInfo("QA reference data NOT retrieved for QA check...");
57 if ( index == AliQA::kRAW )
59 return CheckEntries(list);
62 AliWarning(Form("Checker for task %d not implemented for the moment",index));
66 //_________________________________________________________________
67 Double_t AliVZEROQAChecker::CheckEntries(TObjArray * list) const
70 // check on the QA histograms on the input list:
76 if (list->GetEntries() == 0){
78 AliInfo(Form("There are no entries to be checked..."));
84 while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
87 // Printf("Histogram %s has entries: %f ",hdata->GetName(),hdata->GetEntries());
88 if(hdata->GetEntries()>0)rv=1.0;
93 AliError(Form("Data type cannot be processed"));
98 AliInfo(Form("Histograms are booked for THIS specific Task, but they are all empty"));
106 //______________________________________________________________________________
107 void AliVZEROQAChecker::SetQA(AliQA::ALITASK_t index, const Double_t value) const
109 // sets the QA word according to return value of the Check
111 AliQA * qa = AliQA::Instance(index);
113 qa->UnSet(AliQA::kFATAL);
114 qa->UnSet(AliQA::kWARNING);
115 qa->UnSet(AliQA::kERROR);
116 qa->UnSet(AliQA::kINFO);
118 if (value == 1.0) {qa->Set(AliQA::kINFO);}
119 else if (value == 0.0) {qa->Set(AliQA::kFATAL);}
120 else if (value > 0.5) {qa->Set(AliQA::kWARNING);}
121 else {qa->Set(AliQA::kERROR);}