+//____________________________________________________________________________
+const Double_t AliQualAssCheckerBase::Check()
+{
+ // Performs a basic checking
+ // Compares all the histograms stored in the directory
+
+ Double_t test = 0.0 ;
+ Int_t count = 0 ;
+
+ if (!fDataSubDir)
+ test = 1. ; // nothing to check
+ else
+ if (!fRefSubDir)
+ test = -1 ; // no reference data
+ else {
+ TList * keyList = fDataSubDir->GetListOfKeys() ;
+ TIter next(keyList) ;
+ TKey * key ;
+ count = 0 ;
+ while ( (key = static_cast<TKey *>(next())) ) {
+ TObject * odata = fRefSubDir->Get(key->GetName()) ;
+ if ( odata->IsA()->InheritsFrom("TH1") ) {
+ TH1 * hdata = static_cast<TH1*>(odata) ;
+ TH1 * href = static_cast<TH1*>(fRefSubDir->Get(key->GetName())) ;
+ if (!href)
+ test = -1 ; // no reference data ;
+ else {
+ Double_t rv = DiffK(hdata, href) ;
+ AliInfo(Form("%s ->Test = %f", hdata->GetName(), rv)) ;
+ test += rv ;
+ count++ ;
+ }
+ }
+ else
+ AliError(Form("%s Is a Classname that cannot be processed", key->GetClassName())) ;
+ }
+
+ }
+ if (count != 0)
+ test /= count ;
+
+ return test ;
+}
+