// INFN Torino
// --- ROOT system ---
-
+#include "TH1.h"
// --- AliRoot header files ---
#include "AliITSQAChecker.h"
+#include "AliITSQASPDChecker.h"
+#include "AliITSQASDDChecker.h"
+#include "AliITSQASSDChecker.h"
ClassImp(AliITSQAChecker)
+//____________________________________________________________________________
+AliITSQAChecker::AliITSQAChecker(Bool_t kMode, Short_t subDet, Short_t ldc) :
+AliQACheckerBase("ITS","SDD Quality Assurance Checker")
+{
+ fkOnline = kMode; fDet = subDet; fLDC = ldc;
+ if(fDet == 0 || fDet == 1) {
+ AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
+ }
+ if(fDet == 0 || fDet == 2) {
+ AliDebug(1,"AliITSQAChecker::Create SDD Checker\n");
+ }
+ if(fDet == 0 || fDet == 3) {
+ AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
+ }
+
+}
+
//__________________________________________________________________
AliITSQAChecker& AliITSQAChecker::operator = (const AliITSQAChecker& qac )
{
new(this) AliITSQAChecker(qac);
return *this;
}
+
+//____________________________________________________________________________
+const Double_t AliITSQAChecker::Check(TObjArray * list)
+{
+
+ // Super-basic check on the QA histograms on the input list:
+ // look whether they are empty!
+ if(fDet == 0 || fDet == 1) {
+ AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
+ if(!fSPDChecker) fSPDChecker = new AliITSQASPDChecker();
+ Double_t SPDcheck = fSPDChecker->Check();
+ }
+ if(fDet == 0 || fDet == 2) {
+ AliDebug(1,"AliITSQAChecker::Create SDD Checker\n");
+ if(!fSDDChecker) fSDDChecker = new AliITSQASDDChecker();
+ Double_t SDDcheck = fSDDChecker->Check();
+ }
+ if(fDet == 0 || fDet == 3) {
+ AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
+ if(!fSSDChecker) fSSDChecker = new AliITSQASSDChecker();
+ Double_t SSDcheck = fSSDChecker->Check();
+ }
+ // here merging part for common ITS QA result
+ return 0;
+}
+
+
// --- AliRoot header files ---
#include "AliQACheckerBase.h"
+
+class AliITSQASPDChecker;
+class AliITSQASDDChecker;
+class AliITSQASSDChecker;
class AliITSLoader ;
class AliITSQAChecker: public AliQACheckerBase {
+friend class AliITSQASPDChecker;
+friend class AliITSQASDDChecker;
+friend class AliITSQASSDChecker;
+
public:
- AliITSQAChecker() : AliQACheckerBase("ITS","SDD Quality Assurance Data Maker") {;} // ctor
- AliITSQAChecker(const AliITSQAChecker& qac) : AliQACheckerBase(qac.GetName(), qac.GetTitle()) {;} // cpy ctor
+ AliITSQAChecker(Bool_t kMode = kFALSE, Short_t subDet = 0, Short_t ldc = 0) ; // ctor
+ AliITSQAChecker(const AliITSQAChecker& qac) : AliQACheckerBase(qac.GetName(), qac.GetTitle()), fkOnline(kFALSE), fDet(0), fLDC(0), fSPDChecker(0), fSDDChecker(0), fSSDChecker(0) {;} // cpy ctor
AliITSQAChecker& operator = (const AliITSQAChecker& qac) ; //operator =
virtual ~AliITSQAChecker() {;} // dtor
+ void SetMode(Bool_t kMode) { fkOnline = kMode; }
+ void SetSubDet(Short_t subdet) { fDet = subdet; }
+ void SetLDC(Short_t ldc) { fLDC = ldc; }
+ Bool_t GetMode() { return fkOnline; }
+ Short_t GetSubDet() { return fDet; }
+ Short_t GetLDC() { return fLDC; }
+
+ protected:
+
+ virtual const Double_t Check(TObjArray * list) ;
+ virtual const Double_t Check() {return 0.;} ;
private:
-
- ClassDef(AliITSQAChecker,1) // description
+
+ Bool_t fkOnline;
+ Short_t fDet;
+ Short_t fLDC;
+
+ AliITSQASPDChecker *fSPDChecker; // SPD Checker
+ AliITSQASDDChecker *fSDDChecker; // SDD Checker
+ AliITSQASSDChecker *fSSDChecker; // SSD Checker
+
+ ClassDef(AliITSQAChecker,3) // description
};
#include "AliLog.h"
#include "AliQA.h"
#include "AliQAChecker.h"
+#include "AliITSQAChecker.h"
#include "AliRawReader.h"
ClassImp(AliITSQADataMakerSim)
if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list);
if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list);
- //AliQAChecker::Instance()->Run( AliQA::kITS , task, list); //temporary skipping the checking
+ AliQAChecker *qac = AliQAChecker::Instance();
+ AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
+ qac->Run( AliQA::kITS , task, list); //temporary skipping the checking
}
//____________________________________________________________________________
--- /dev/null
+#ifndef ALIITSQASDDCHECKER_H
+#define ALIITSQASDDCHECKER_H
+/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+
+/* $Id$ */
+
+//
+// Checks the quality assurance.
+// By comparing with reference data
+// INFN Torino
+// P. Cerello - apr 2008
+//
+
+
+// --- ROOT system ---
+class TFile ;
+class TH2F ;
+
+// --- AliRoot header files ---
+#include "AliQACheckerBase.h"
+#include "AliITSQAChecker.h"
+class AliITSLoader ;
+
+class AliITSQASDDChecker: public TObject {
+
+public:
+ AliITSQASDDChecker() {;} // ctor
+ AliITSQASDDChecker& operator = (const AliITSQASDDChecker& qac) ; //operator =
+ virtual ~AliITSQASDDChecker() {;} // dtor
+ const Double_t Check();
+
+private:
+ AliITSQASDDChecker(const AliITSQASDDChecker& qac) {;} // cpy ctor
+
+ ClassDef(AliITSQASDDChecker,1) // description
+
+};
+
+#endif // AliITSQASDDChecker_H
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+// *****************************************
+// Checks the quality assurance
+// by comparing with reference data
+// P. Cerello Apr 2008
+// INFN Torino
+
+// --- ROOT system ---
+
+// --- AliRoot header files ---
+#include "AliITSQASPDChecker.h"
+
+ClassImp(AliITSQASPDChecker)
+
+//__________________________________________________________________
+AliITSQASPDChecker& AliITSQASPDChecker::operator = (const AliITSQASPDChecker& qac )
+{
+ // Equal operator.
+ this->~AliITSQASPDChecker();
+ new(this) AliITSQASPDChecker(qac);
+ return *this;
+}
+
+//__________________________________________________________________
+const Double_t AliITSQASPDChecker::Check()
+{
+/*
+ TObjArray * list
+ Double_t test = 0.0 ;
+ Int_t count = 0 ;
+
+ if (list->GetEntries() == 0){
+ test = 1. ; // nothing to check
+ }
+ else {
+ TIter next(list) ;
+ TH1 * hdata ;
+ count = 0 ;
+ while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
+ if (hdata) {
+ Double_t rv = 0.;
+ if(hdata->GetEntries()>0)rv=1;
+ AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
+ count++ ;
+ test += rv ;
+ }
+ else{
+ AliError("Data type cannot be processed") ;
+ }
+
+ }
+ if (count != 0) {
+ if (test==0) {
+ AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
+ test = 0.5; //upper limit value to set kWARNING flag for a task
+ }
+ else {
+ test /= count ;
+ }
+ }
+ }
+
+ AliInfo(Form("Test Result = %f", test)) ;
+ return test ;
+*/
+ return 0.;
+}
--- /dev/null
+#ifndef ALIITSQASPDCHECKER_H
+#define ALIITSQASPDCHECKER_H
+/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+
+/* $Id$ */
+
+//
+// Checks the quality assurance.
+// By comparing with reference data
+// INFN Torino
+// P. Cerello - apr 2008
+//
+
+
+// --- ROOT system ---
+class TFile ;
+class TH2F ;
+
+// --- AliRoot header files ---
+#include "AliQACheckerBase.h"
+#include "AliITSQAChecker.h"
+class AliITSLoader ;
+
+class AliITSQASPDChecker: public TObject {
+
+public:
+ AliITSQASPDChecker() {;} // ctor
+ AliITSQASPDChecker& operator = (const AliITSQASPDChecker& qac) ; //operator =
+ virtual ~AliITSQASPDChecker() {;} // dtor
+ const Double_t Check();
+private:
+
+ AliITSQASPDChecker(const AliITSQASPDChecker& qac){;} // cpy ctor
+ ClassDef(AliITSQASPDChecker,1) // description
+
+};
+
+#endif // AliITSQASPDChecker_H
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+// *****************************************
+// Checks the quality assurance
+// by comparing with reference data
+// P. Cerello Apr 2008
+// INFN Torino
+
+// --- ROOT system ---
+
+// --- AliRoot header files ---
+#include "AliITSQASSDChecker.h"
+
+ClassImp(AliITSQASSDChecker)
+
+//__________________________________________________________________
+AliITSQASSDChecker& AliITSQASSDChecker::operator = (const AliITSQASSDChecker& qac )
+{
+ // Equal operator.
+ this->~AliITSQASSDChecker();
+ new(this) AliITSQASSDChecker(qac);
+ return *this;
+}
+
+//__________________________________________________________________
+const Double_t AliITSQASSDChecker::Check()
+{
+/*
+ TObjArray * list
+ Double_t test = 0.0 ;
+ Int_t count = 0 ;
+
+ if (list->GetEntries() == 0){
+ test = 1. ; // nothing to check
+ }
+ else {
+ TIter next(list) ;
+ TH1 * hdata ;
+ count = 0 ;
+ while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
+ if (hdata) {
+ Double_t rv = 0.;
+ if(hdata->GetEntries()>0)rv=1;
+ AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
+ count++ ;
+ test += rv ;
+ }
+ else{
+ AliError("Data type cannot be processed") ;
+ }
+
+ }
+ if (count != 0) {
+ if (test==0) {
+ AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
+ test = 0.5; //upper limit value to set kWARNING flag for a task
+ }
+ else {
+ test /= count ;
+ }
+ }
+ }
+
+ AliInfo(Form("Test Result = %f", test)) ;
+ return test ;
+*/
+ return 0.;
+}
+
+
--- /dev/null
+#ifndef ALIITSQASSDCHECKER_H
+#define ALIITSQASSDCHECKER_H
+/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+
+/* $Id$ */
+
+//
+// Checks the quality assurance.
+// By comparing with reference data
+// INFN Torino
+// P. Cerello - apr 2008
+//
+
+
+// --- ROOT system ---
+class TFile ;
+class TH2F ;
+
+// --- AliRoot header files ---
+#include "AliQACheckerBase.h"
+#include "AliITSQAChecker.h"
+class AliITSLoader ;
+
+class AliITSQASSDChecker: public TObject {
+
+public:
+ AliITSQASSDChecker() {;} // ctor
+ AliITSQASSDChecker& operator = (const AliITSQASSDChecker& qac) ; //operator =
+ virtual ~AliITSQASSDChecker() {;} // dtor
+ const Double_t Check();
+
+private:
+
+ AliITSQASSDChecker(const AliITSQASSDChecker& qac){;} // cpy ctor
+ ClassDef(AliITSQASSDChecker,1) // description
+
+};
+
+#endif // AliITSQASSDChecker_H
#pragma link C++ class AliITSQASPDDataMakerRec+;
#pragma link C++ class AliITSQASDDDataMakerRec+;
#pragma link C++ class AliITSQASSDDataMakerRec+;
+#pragma link C++ class AliITSQASPDChecker+;
+#pragma link C++ class AliITSQASDDChecker+;
+#pragma link C++ class AliITSQASSDChecker+;
#endif
AliITSQADataMakerRec.cxx \
AliITSQASPDDataMakerRec.cxx \
AliITSQASDDDataMakerRec.cxx \
- AliITSQASSDDataMakerRec.cxx
+ AliITSQASSDDataMakerRec.cxx \
+ AliITSQASPDChecker.cxx \
+ AliITSQASDDChecker.cxx \
+ AliITSQASSDChecker.cxx
+
HDRS:= $(SRCS:.cxx=.h)