{
// create Hits histograms in Hits subdir
fhHitQdc=new TH1F("HitQdc","HMPID Hit Qdc all chamber;QDC",500,0,4000);
- for(Int_t iCh=0;iCh<7;iCh++) fhHitMap[iCh]=new TH2F(Form("HMPID HitMap%i",iCh),Form("Ch%i;x_{Hit};y_{Hit}",iCh),162,-1,161,146,-1,145);
+ for(Int_t iCh=0;iCh<7;iCh++)
+ fhHitMap[iCh]=new TH2F(Form("HMPID HitMap%i",iCh),Form("Ch%i;x_{Hit};y_{Hit}",iCh),162,-1,161,146,-1,145);
}
//____________________________________________________________________________
}
//____________________________________________________________________________
-void AliITSQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX task, TList *list)
+void AliITSQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX task, TObjArray *list)
{
// launch the QA checking
AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n");
#include "AliQADataMaker.h"
-class TList;
+class TObjArray;
class TH1F;
class TH2D;
class AliRawReader;
AliITSQADataMaker(const AliITSQADataMaker& qadm);
AliITSQADataMaker& operator = (const AliITSQADataMaker& qac);
virtual void StartOfDetectorCycle() const;
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX task, TList * list);
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX task, TObjArray * list);
virtual void EndOfDetectorCycle(const char * fgDataName);
virtual void InitRaws();
virtual void InitRecPoints();
}
//____________________________________________________________________________
-void AliMUONQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX task, TList* list)
+void AliMUONQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX task, TObjArray* list)
{
///Detector specific actions at end of cycle
// do the QA checking
// to avoid circular dependencie
// --- ROOT system ---
-class TList;
+class TObjArray;
// --- AliRoot header files ---
class AliMUONVClusterStore;
virtual void MakeRaws(AliRawReader* rawReader);
virtual void MakeRecPoints(TTree* recpo);
virtual void MakeESDs(AliESDEvent* esd) ;
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX, TList* list);
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX, TObjArray* list);
AliMUONVClusterStore* fClusterStore; //!< pointer to cluster store
}
//____________________________________________________________________________
-void AliPHOSQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX task, TList * list)
+void AliPHOSQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX task, TObjArray * list)
{
//Detector specific actions at end of cycle
// do the QA checking
// --- ROOT system ---
class TH1F ;
class TH1I ;
-class TList ;
+class TObjArray ;
// --- Standard library ---
virtual ~AliPHOSQADataMaker() {;} // dtor
private:
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX, TList * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX, TObjArray * list) ;
virtual void InitHits() ;
virtual void InitESDs() ;
virtual void InitDigits() ;
ClassImp(AliQA)
- AliQA * AliQA::fgQA = 0x0 ;
- TFile * AliQA::fgQADataFile = 0x0 ;
- TString AliQA::fgQADataFileName = "QA" ; // will transform into Det.QA.run.cycle.root
- TFile * AliQA::fgQARefFile = 0x0 ;
- TString AliQA::fgQARefDirName = "local://Ref/" ;
- TString AliQA::fgQARefFileName = "QA.root" ;
- TFile * AliQA::fgQAResultFile = 0x0 ;
- TString AliQA::fgQAResultDirName = "local://RUN/" ;
- TString AliQA::fgQAResultFileName = "QA.root" ;
- TString AliQA::fgDetNames[] = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD",
- "ZDC", "PMD", "T0", "VZERO", "ACORDE", "HLT"} ;
- TString AliQA::fgTaskNames[] = {"Raws", "Hits", "SDigits", "Digits", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ;
-
+AliQA * AliQA::fgQA = 0x0 ;
+TFile * AliQA::fgQADataFile = 0x0 ;
+TString AliQA::fgQADataFileName = "QA" ; // will transform into Det.QA.run.cycle.root
+TFile * AliQA::fgQARefFile = 0x0 ;
+TString AliQA::fgQARefDirName = "" ;
+TString AliQA::fgQARefFileName = "QA.root" ;
+TFile * AliQA::fgQAResultFile = 0x0 ;
+TString AliQA::fgQAResultDirName = "" ;
+TString AliQA::fgQAResultFileName = "QA.root" ;
+TString AliQA::fgDetNames[] = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD",
+ "ZDC", "PMD", "T0", "VZERO", "ACORDE", "HLT"} ;
+TString AliQA::fgTaskNames[] = {"Raws", "Hits", "SDigits", "Digits", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ;
+const TString AliQA::fkgLabLocalFile = "file://" ;
+const TString AliQA::fkgLabLocalOCDB = "local://" ;
+const TString AliQA::fkgLabAliEnOCDB = "alien://" ;
+const TString AliQA::fkgRefFileName = "QA.root" ;
+const TString AliQA::fkgRefOCDBDirName = "QA/Ref" ;
//____________________________________________________________________________
AliQA::AliQA() :
TNamed("", ""),
fQA(new ULong_t[fNdet]),
fDet(kNULLDET),
fTask(kNULLTASK)
+
{
// default constructor
// beware singleton: not to be used
fNdet(kNDET),
fQA(new ULong_t[fNdet]),
fDet(det),
- fTask(kNULLTASK)
+ fTask(kNULLTASK)
{
// constructor to be used
if (! CheckRange(det) ) {
return fgQADataFile ;
}
-//_______________________________________________________________
-TFile * AliQA::GetQARefFile()
-{
- // opens the file whwre Quality Assurance Reference Data are stored
-
- if (!fgQARefFile) {
- TString fileName(fgQARefDirName + fgQARefFileName) ;
-
- if ( fileName.Contains("local://"))
- fileName.ReplaceAll("local://", "") ;
-
- fgQARefFile = TFile::Open(fileName.Data(), "READ") ;
- }
- return fgQARefFile ;
-}
-
//_______________________________________________________________
TFile * AliQA::GetQAResultFile()
{
if (!fgQAResultFile) {
TString dirName(fgQAResultDirName) ;
- if ( dirName.Contains("local://"))
- dirName.ReplaceAll("local://", "") ;
+ if ( dirName.Contains(fkgLabLocalFile))
+ dirName.ReplaceAll(fkgLabLocalFile, "") ;
TString fileName(dirName + fgQAResultFileName) ;
TString opt("") ;
if ( !gSystem->AccessPathName(fileName) )
}
//_____________________________________________________________________________
-void AliQA::SetQARefDir(const char * name)
+void AliQA::SetQARefStorage(const char * name)
{
// Set the root directory where the QA reference data are stored
- fgQARefDirName.Prepend(name) ;
- printf("AliQA::SetQARefDir: QA references are in %s\n", fgQARefDirName.Data()) ;
- if ( fgQARefDirName.Contains("local://"))
- fgQARefDirName.ReplaceAll("local:/", "") ;
- fgQARefFileName.Prepend(fgQARefDirName) ;
+ fgQARefDirName = name ;
+ if ( fgQARefDirName.Contains(fkgLabLocalFile) )
+ fgQARefFileName = fkgRefFileName ;
+ else if ( fgQARefDirName.Contains(fkgLabLocalOCDB) )
+ fgQARefFileName = fkgRefOCDBDirName ;
+ else {
+ printf("ERROR: %s is an invalid storage definition\n", name) ;
+ fgQARefDirName = "" ;
+ fgQARefFileName = "" ;
+ }
+ TString tmp(fgQARefDirName + fgQARefFileName) ;
+ printf("AliQA::SetQARefDir: QA references are in %s\n", tmp.Data() ) ;
}
//_____________________________________________________________________________
fgQAResultDirName.Prepend(name) ;
printf("AliQA::SetQAResultDirName: QA results are in %s\n", fgQAResultDirName.Data()) ;
- if ( fgQAResultDirName.Contains("local://"))
- fgQAResultDirName.ReplaceAll("local:/", "") ;
+ if ( fgQAResultDirName.Contains(fkgLabLocalFile))
+ fgQAResultDirName.ReplaceAll(fkgLabLocalFile, "") ;
fgQAResultFileName.Prepend(fgQAResultDirName) ;
}
class AliQA : public TNamed {
public:
- enum DETECTORINDEX {
+ enum DETECTORINDEX {
kNULLDET=-1, kITS, kTPC, kTRD, kTOF, kPHOS, kHMPID, kEMCAL, kMUON, kFMD,
- kZDC, kPMD, kT0, kVZERO, kACORDE, kHLT, kNDET
- };
- enum ALITASK {
- kNULLTASK=-1, kRAW, kSIM, kREC, kESD, kANA, kNTASK
- };
- enum QABIT {
- kNULLBit=-1, kINFO, kWARNING, kERROR, kFATAL, kNBIT
- };
+ kZDC, kPMD, kT0, kVZERO, kACORDE, kHLT, kNDET };
+ enum ALITASK {
+ kNULLTASK=-1, kRAW, kSIM, kREC, kESD, kANA, kNTASK };
+ enum QABIT {
+ kNULLBit=-1, kINFO, kWARNING, kERROR, kFATAL, kNBIT };
- enum TASKINDEX {
- kRAWS, kHITS, kSDIGITS, kDIGITS, kRECPOINTS, kTRACKSEGMENTS, kRECPARTICLES, kESDS
- };
+ enum TASKINDEX {
+ kRAWS, kHITS, kSDIGITS, kDIGITS, kRECPOINTS, kTRACKSEGMENTS, kRECPARTICLES, kESDS, kNTASKINDEX };
- // Creators - destructors
- AliQA(); // beware singleton, not to be used
- AliQA(const ALITASK tsk) ;
- AliQA(const DETECTORINDEX det) ;
- AliQA(const AliQA& qa) ;
- AliQA& operator = (const AliQA& qa) ;
- virtual ~AliQA();
+ // Creators - destructors
+ AliQA(); // beware singleton, not to be used
+ AliQA(const ALITASK tsk) ;
+ AliQA(const DETECTORINDEX det) ;
+ AliQA(const AliQA& qa) ;
+ AliQA& operator = (const AliQA& qa) ;
+ virtual ~AliQA();
- static AliQA * Instance() ;
- static AliQA * Instance(const DETECTORINDEX det) ;
- static AliQA * Instance(const ALITASK tsk) ;
- const Bool_t AddQAData2CDB(const char * defSto) const ;
- const Bool_t CheckFatal() const ;
- static void Close() ;
- static const char * GetAliTaskName(ALITASK tsk) ;
- static const TString GetDetName(DETECTORINDEX det) { return fgDetNames[det] ; }
- static const TString GetTaskName(TASKINDEX tsk) { return fgTaskNames[tsk] ; }
- static const char * GetDetName(Int_t det) ;
- static const char * GetQADataFileName() { return fgQADataFileName.Data() ; }
- static TFile * GetQADataFile(const char * name, const Int_t run, const Int_t cycle) ;
- static TFile * GetQADataFile(const char * fileName) ;
- static TFile * GetQAResultFile() ;
- static TFile * GetQARefFile() ;
- static const char * GetQAResultFileName() { return (fgQAResultDirName + fgQAResultFileName).Data() ; }
- static const char * GetQARefFileName() { return (fgQARefDirName + fgQARefFileName).Data() ; }
- const Bool_t IsSet(DETECTORINDEX det, ALITASK tsk, QABIT bit) const ;
- void Set(QABIT bit) ;
- static void SetQAResultDirName(const char * name) ;
- static void SetQARefDir(const char * name) ;
- void Show() const { ShowStatus(fDet) ; }
- void ShowAll() const ;
+ static AliQA * Instance() ;
+ static AliQA * Instance(const DETECTORINDEX det) ;
+ static AliQA * Instance(const ALITASK tsk) ;
+ const Bool_t AddQAData2CDB(const char * defSto) const ;
+ const Bool_t CheckFatal() const ;
+ static void Close() ;
+ static const char * GetAliTaskName(ALITASK tsk) ;
+ static const TString GetLabLocalFile() { return fkgLabLocalFile ; }
+ static const TString GetLabLocalOCDB() { return fkgLabLocalOCDB ; }
+ static const TString GetLabAliEnOCDB() { return fkgLabAliEnOCDB ; }
+ static const TString GetDetName(DETECTORINDEX det) { return fgDetNames[det] ; }
+ static const TString GetTaskName(TASKINDEX tsk) { return fgTaskNames[tsk] ; }
+ static const char * GetDetName(Int_t det) ;
+ static const char * GetQADataFileName() { return fgQADataFileName.Data() ; }
+ static TFile * GetQADataFile(const char * name, const Int_t run, const Int_t cycle) ;
+ static TFile * GetQADataFile(const char * fileName) ;
+ static TFile * GetQAResultFile() ;
+ static const char * GetQAResultFileName() { return (fgQAResultDirName + fgQAResultFileName).Data() ; }
+ static const char * GetQARefFileName() { return fgQARefFileName ; }
+ static const char * GetQARefStorage() { return fgQARefDirName.Data() ; }
+ static const char * GetQARefOCDBDirName() { return fkgRefOCDBDirName .Data() ; }
+ const Bool_t IsSet(DETECTORINDEX det, ALITASK tsk, QABIT bit) const ;
+ void Set(QABIT bit) ;
+ static void SetQAResultDirName(const char * name) ;
+ static void SetQARefStorage(const char * name) ;
+ void Show() const { ShowStatus(fDet) ; }
+ void ShowAll() const ;
private:
- const Bool_t CheckRange(DETECTORINDEX det) const ;
- const Bool_t CheckRange(ALITASK tsk) const ;
- const Bool_t CheckRange(QABIT bit) const ;
- const char * GetBitName(QABIT bit) const ;
- const ULong_t GetStatus(DETECTORINDEX det) const { return fQA[det] ;}
- void Finish() const ;
- const ULong_t Offset(ALITASK tsk) const ;
- virtual void ShowStatus(DETECTORINDEX det) const ;
- void ResetStatus(DETECTORINDEX det) { fQA[det] = 0 ; }
- void Set(DETECTORINDEX det) { fDet = det ;}
- void Set(ALITASK tsk) { fTask = tsk ; AliInfo(Form("Ready to set QA status in %s", GetAliTaskName(tsk) )) ; }
- void SetStatus(DETECTORINDEX det, UShort_t status) { fQA[det] = status ; }
- void SetStatusBit(DETECTORINDEX det, ALITASK tsk, QABIT bit) ;
+ const Bool_t CheckRange(DETECTORINDEX det) const ;
+ const Bool_t CheckRange(ALITASK tsk) const ;
+ const Bool_t CheckRange(QABIT bit) const ;
+ const char * GetBitName(QABIT bit) const ;
+ const ULong_t GetStatus(DETECTORINDEX det) const { return fQA[det] ;}
+ void Finish() const ;
+ const ULong_t Offset(ALITASK tsk) const ;
+ virtual void ShowStatus(DETECTORINDEX det) const ;
+ void ResetStatus(DETECTORINDEX det) { fQA[det] = 0 ; }
+ void Set(DETECTORINDEX det) { fDet = det ;}
+ void Set(ALITASK tsk) { fTask = tsk ; AliInfo(Form("Ready to set QA status in %s", GetAliTaskName(tsk) )) ; }
+ void SetStatus(DETECTORINDEX det, UShort_t status) { fQA[det] = status ; }
+ void SetStatusBit(DETECTORINDEX det, ALITASK tsk, QABIT bit) ;
- static AliQA *fgQA ; // pointer to the instance of the singleton
- Int_t fNdet ; // number of detectors
- ULong_t * fQA ; //[fNdet] the status word 4 bits for SIM, REC, ESD, ANA each
- DETECTORINDEX fDet ; //! the current detector (ITS, TPC, ....)
- ALITASK fTask ; //! the current environment (SIM, REC, ESD, ANA)
- static TString fgDetNames[] ; //! list of detector names
- static TFile * fgQADataFile ; //! the output file where the quality assurance maker store their results
- static TString fgQADataFileName ; //! the name of the file where the quality assurance maker store their results
- static TFile * fgQARefFile ; //! the output file where the quality assurance maker store their results
- static TString fgQARefDirName ; //! name of directory where to find the reference data file
- static TString fgQARefFileName ; //! file name where to find the reference data
- static TFile * fgQAResultFile ; //! File where to find the QA result
- static TString fgQAResultDirName ; //! the location of the output file where the QA results are stored
- static TString fgQAResultFileName ; //! the output file where the QA results are stored
- static TString fgTaskNames[] ; //! list of tasks names
+ static AliQA *fgQA ; // pointer to the instance of the singleton
+ Int_t fNdet ; // number of detectors
+ ULong_t * fQA ; //[fNdet] the status word 4 bits for SIM, REC, ESD, ANA each
+ DETECTORINDEX fDet ; //! the current detector (ITS, TPC, ....)
+ ALITASK fTask ; //! the current environment (SIM, REC, ESD, ANA)
+ static TString fgDetNames[] ; //! list of detector names
+ static TFile * fgQADataFile ; //! the output file where the quality assurance maker store their results
+ static TString fgQADataFileName ; //! the name of the file where the quality assurance maker store their results
+ static TFile * fgQARefFile ; //! the output file where the quality assurance maker store their results
+ static TString fgQARefDirName ; //! name of directory where to find the reference data file
+ static TString fgQARefFileName ; //! file name where to find the reference data
+ static TFile * fgQAResultFile ; //! File where to find the QA result
+ static TString fgQAResultDirName ; //! the location of the output file where the QA results are stored
+ static TString fgQAResultFileName ; //! the output file where the QA results are stored
+ static TString fgTaskNames[] ; //! list of tasks names
+ static const TString fkgLabLocalFile ; //! label to identify a file as local
+ static const TString fkgLabLocalOCDB ; //! label to identify a file as local OCDB
+ static const TString fkgLabAliEnOCDB ; //! label to identify a file as AliEn OCDB
+ static const TString fkgRefFileName ; //! name of Reference File Name
+ static const TString fkgRefOCDBDirName ; //! name of Reference directory name in OCDB
ClassDef(AliQA,1) //ALICE Quality Assurance Object
};
// //
///////////////////////////////////////////////////////////////////////////////
+#include "AliCDBEntry.h"
+#include "AliCDBManager.h"
#include "AliLog.h"
#include "AliModule.h"
#include "AliQA.h"
AliQAChecker::AliQAChecker(const char* name, const char* title) :
TNamed(name, title),
fDataFile(0x0),
+ fRefFile(0x0),
fFoundDetectors(".")
{
// ctor: initialise checkers and open the data file
AliQAChecker::AliQAChecker(const AliQAChecker& qac) :
TNamed(qac),
fDataFile(qac.fDataFile),
+ fRefFile(qac.fRefFile),
fFoundDetectors(qac.fFoundDetectors)
{
// copy constructor
//_____________________________________________________________________________
-TDirectory * AliQAChecker::GetRefSubDir(const char * det, const char * task)
+void AliQAChecker::GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TList *& dirOCDB)
{
// Opens and returns the file with the reference data
- TFile * f = AliQA::GetQARefFile() ; //TFile::Open(fRefDirName, "READ") ;
- TDirectory * rv = NULL ;
- if (!f) {
- AliError(Form("Cannot find reference file %s", (AliQA::GetQARefFileName()))) ;
- return rv ;
- }
- rv = f->GetDirectory(det) ;
- if (!rv) {
- AliWarning(Form("Directory %s not found in %d", det, (AliQA::GetQARefFileName()))) ;
- } else {
- rv = rv->GetDirectory(task) ;
- if (!rv)
- AliWarning(Form("Directory %s/%s not found in %s", det, task, (AliQA::GetQARefFileName()))) ;
- }
- return rv ;
+
+ dirFile = NULL ;
+ dirOCDB = NULL ;
+ TString refStorage(AliQA::GetQARefStorage()) ;
+ refStorage += AliQA::GetQARefFileName() ;
+ if (refStorage.Contains(AliQA::GetLabLocalFile())) {
+ refStorage.ReplaceAll(AliQA::GetLabLocalFile(), "") ;
+ if ( fRefFile )
+ if ( fRefFile->IsOpen() )
+ fRefFile->Close() ;
+ fRefFile = TFile::Open(refStorage.Data()) ;
+ if (!fRefFile) {
+ AliError(Form("Cannot find reference file %s", refStorage.Data())) ;
+ dirFile = NULL ;
+ }
+ dirFile = fRefFile->GetDirectory(det) ;
+ if (!dirFile) {
+ AliWarning(Form("Directory %s not found in %d", det, refStorage.Data())) ;
+ } else {
+ dirFile = dirFile->GetDirectory(task) ;
+ if (!dirFile)
+ AliWarning(Form("Directory %s/%s not found in %s", det, task, refStorage.Data())) ;
+ }
+ } else if (refStorage.Contains(AliQA::GetLabLocalOCDB()) || refStorage.Contains(AliQA::GetLabAliEnOCDB())) {
+ AliCDBManager* man = AliCDBManager::Instance() ;
+ char detOCDBDir[20] ;
+ sprintf(detOCDBDir, "%s/%s", AliQA::GetQARefFileName(), det) ;
+ AliCDBEntry * entry = man->Get(detOCDBDir) ;
+ TList * listDetQAD = dynamic_cast<TList *>(entry->GetObject()) ;
+ if ( listDetQAD )
+ dirOCDB = dynamic_cast<TList *>(listDetQAD->FindObject(task)) ;
+ }
}
//_____________________________________________________________________________
index = AliQA::kESD ;
qac->Init(AliQA::DETECTORINDEX(det)) ;
- TDirectory * refDir = GetRefSubDir(detNameQA.Data(), taskName.Data()) ;
- if ( refDir ) {
- qac->SetRefandData(refDir, taskDir) ;
- qac->Run(index) ;
+ TDirectory * refDir = NULL ;
+ TList * refOCDBDir = NULL ;
+ GetRefSubDir(detNameQA.Data(), taskName.Data(), refDir, refOCDBDir) ;
+ if ( refDir || refOCDBDir) {
+ qac->SetRefandData(refDir, refOCDBDir, taskDir) ;
+ qac->Run(index) ;
}
- }
- }
+ }
+ }
AliInfo("QA performed for following detectors:") ;
for ( Int_t det = 0; det < AliQA::kNDET; det++) {
if (fFoundDetectors.Contains(AliQA::GetDetName(det))) {
}
//_____________________________________________________________________________
-Bool_t AliQAChecker::Run(AliQA::DETECTORINDEX det, AliQA::TASKINDEX task, TList * list)
+Bool_t AliQAChecker::Run(AliQA::DETECTORINDEX det, AliQA::TASKINDEX task, TObjArray * list)
{
// run the Quality Assurance Checker for detector det, for task task starting from data in list
index = AliQA::kREC ;
else if ( task == AliQA::kESDS )
index = AliQA::kESD ;
- TDirectory * refDir = GetRefSubDir(AliQA::GetDetName(det).Data(), AliQA::GetTaskName(task).Data()) ;
- if ( refDir ) {
- qac->Init(det) ;
- qac->SetRefandData(refDir) ;
- qac->Run(index, list) ;
+
+ TDirectory * refDir = NULL ;
+ TList *refOCDBDir = NULL ;
+ GetRefSubDir(AliQA::GetDetName(det), AliQA::GetTaskName(task), refDir, refOCDBDir) ;
+ if ( refDir || refOCDBDir) {
+ qac->Init(det) ;
+ qac->SetRefandData(refDir, refOCDBDir) ;
+ qac->Run(index, list) ;
}
return kTRUE ;
#include <TFile.h>
#include "AliQA.h"
+class AliCDBEntry ;
class AliQACheckerBase ;
class AliQAChecker: public TNamed {
static AliQAChecker * Instance() ;
AliQACheckerBase * GetDetQAChecker(Int_t det) ;
- TDirectory * GetRefSubDir(const char * det, const char * task) ;
+ void GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TList *& dirOCDB) ;
// static TFile * GetQAResultFile() ;
// static const char * GetQAResultFileName() { return fgQAResultFileName.Data() ; }
// void SetQAResultDirName(const char * name) ;
// void SetRefDirName(const char * name) ;
virtual Bool_t Run(const char * fileName = NULL) ;
- virtual Bool_t Run(AliQA::DETECTORINDEX det, AliQA::TASKINDEX task, TList * list);
+ virtual Bool_t Run(AliQA::DETECTORINDEX det, AliQA::TASKINDEX task, TObjArray * list);
private:
static AliQAChecker *fgQAChecker ; // pointer to the instance of the singleton
TFile * fDataFile ; //! Data file to check
+ TFile * fRefFile ; //! Reference Data file
TString fFoundDetectors ; //! detectors for which the Quality assurance could be done
AliQACheckerBase * fCheckers[AliQA::kNDET] ; //! list of detectors checkers
ClassDef(AliQAChecker, 1) // class for running generation, simulation and digitization
AliQACheckerBase::AliQACheckerBase(const char * name, const char * title) :
TNamed(name, title),
fDataSubDir(0x0),
- fRefSubDir(0x0)
+ fRefSubDir(0x0),
+ fRefOCDBSubDir(0x0)
{
// ctor
}
//____________________________________________________________________________
-AliQACheckerBase::AliQACheckerBase(const AliQACheckerBase& qadm) :
- TNamed(qadm.GetName(), qadm.GetTitle()),
- fDataSubDir(qadm.fDataSubDir),
- fRefSubDir(qadm.fRefSubDir)
+AliQACheckerBase::AliQACheckerBase(const AliQACheckerBase& qac) :
+ TNamed(qac.GetName(), qac.GetTitle()),
+ fDataSubDir(qac.fDataSubDir),
+ fRefSubDir(qac.fRefSubDir),
+ fRefOCDBSubDir(qac.fRefOCDBSubDir)
{
//copy ctor
{
// Performs a basic checking
// Compares all the histograms stored in the directory
+ // With reference histograms either in a file of in OCDB
Double_t test = 0.0 ;
Int_t count = 0 ;
if (!fDataSubDir)
test = 1. ; // nothing to check
else
- if (!fRefSubDir)
+ if (!fRefSubDir && !fRefOCDBSubDir)
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())) ;
- }
-
- }
+ 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 = NULL ;
+ if (fRefSubDir)
+ href = static_cast<TH1*>(fRefSubDir->Get(key->GetName())) ;
+ else if (fRefOCDBSubDir) {
+ href = static_cast<TH1*>(fRefOCDBSubDir->FindObject(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 ;
}
//____________________________________________________________________________
-const Double_t AliQACheckerBase::Check(TList * list)
+const Double_t AliQACheckerBase::Check(TObjArray * list)
{
// Performs a basic checking
// Compares all the histograms in the list
if (list->GetEntries() == 0)
test = 1. ; // nothing to check
- else
+ else {
if (!fRefSubDir)
test = -1 ; // no reference data
else {
count = 0 ;
while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
if ( hdata) {
- TH1 * href = static_cast<TH1*>(fRefSubDir->Get(hdata->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("Data type cannot be processed") ;
- }
- }
- if (count != 0)
- test /= count ;
-
- return test ;
+ TH1 * href = NULL ;
+ if (fRefSubDir)
+ href = static_cast<TH1*>(fRefSubDir->Get(hdata->GetName())) ;
+ else if (fRefOCDBSubDir)
+ href = static_cast<TH1*>(fRefOCDBSubDir->FindObject(hdata->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("Data type cannot be processed") ;
+ }
+ }
+ }
+ if (count != 0)
+ test /= count ;
+ return test ;
}
//____________________________________________________________________________
}
//____________________________________________________________________________
-void AliQACheckerBase::Run(AliQA::ALITASK index, TList * list)
+void AliQACheckerBase::Run(AliQA::ALITASK index, TObjArray * list)
{
AliInfo(Form("Processing %s", AliQA::GetAliTaskName(index))) ;
#include "AliQA.h"
class TFile ;
class TH1 ;
-class TList ;
+class TObjArray ;
class TDirectory ;
// --- Standard library ---
virtual ~AliQACheckerBase() {;} // dtor
void Init(const AliQA::DETECTORINDEX det) ;
- void Run(AliQA::ALITASK tsk, TList * list=0x0);
- void SetRefandData(TDirectory * ref, TDirectory * data=NULL) { fRefSubDir = ref ; fDataSubDir = data ; }
+ void Run(AliQA::ALITASK tsk, TObjArray * list=0x0);
+ void SetRefandData(TDirectory * ref, TList * refOCDB, TDirectory * data=NULL) { fRefSubDir = ref ; fRefOCDBSubDir = refOCDB, fDataSubDir = data ; }
protected:
virtual const Double_t Check() ;
- virtual const Double_t Check(TList * list) ;
+ virtual const Double_t Check(TObjArray * list) ;
const Double_t DiffC(const TH1 * href, const TH1 * hin) const ;
const Double_t DiffK(const TH1 * href, const TH1 * hin) const ;
void Finish() const ;
- TDirectory * fDataSubDir ; //! directory for the current task directory in the current detector directory in the data file
- TDirectory * fRefSubDir ; //! directory for the current task directory in the current detector directory in the reference file
+ TDirectory * fDataSubDir ; //! directory for the current task directory in the current detector directory in the data file
+ TDirectory * fRefSubDir ; //! directory for the current task directory in the current detector directory in the reference file
+ TList * fRefOCDBSubDir ; //! Entry in OCDB for the current detector
ClassDef(AliQACheckerBase,1) // description
}
//____________________________________________________________________________
-Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TList * list)
+Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray * list)
{
// Set histograms memory resident and add to the list
hist->SetDirectory(0) ;
list->AddAt(hist, index) ;
- return list->LastIndex() ;
+ return list->GetLast() ;
}
//____________________________________________________________________________
{
// Finishes a cycle of QA data acquistion
- TList * list = 0x0 ;
+ TObjArray * list = 0x0 ;
switch (task) {
case AliQA::kESDS:
list = fESDsQAList ;
break ;
+
+ case AliQA::kNTASKINDEX:
+ break ;
}
EndOfDetectorCycle(task, list) ;
case AliQA::kRECPARTICLES:
AliInfo("Processing RecParticles QA: not existing anymore") ;
// MakeRecParticles(recpar) ;
- break ;
+ break ;
case AliQA::kESDS:
{
AliDebug(1, "Processing ESDs QA") ;
else
AliError("Wrong type of esd container") ;
break ;
+ case AliQA::kNTASKINDEX:
+ break ;
}
}
}
}
//____________________________________________________________________________
-TList * AliQADataMaker::Init(AliQA::TASKINDEX task, Int_t run, Int_t cycles)
+TObjArray * AliQADataMaker::Init(AliQA::TASKINDEX task, Int_t run, Int_t cycles)
{
// general intialisation
switch (task) {
case AliQA::kRAWS:
{
- fRawsQAList = new TList() ;
+ fRawsQAList = new TObjArray(100) ;
InitRaws() ;
return fRawsQAList ;
break ;
}
case AliQA::kHITS:
{
- fHitsQAList = new TList() ;
+ fHitsQAList = new TObjArray(100) ;
InitHits() ;
return fHitsQAList ;
break ;
}
case AliQA::kSDIGITS:
{
- fSDigitsQAList = new TList() ;
+ fSDigitsQAList = new TObjArray(100) ;
InitSDigits() ;
return fSDigitsQAList ;
break ;
}
case AliQA::kDIGITS:
{
- fDigitsQAList = new TList();
+ fDigitsQAList = new TObjArray(100);
InitDigits() ;
return fDigitsQAList ;
break ;
}
case AliQA::kRECPOINTS:
{
- fRecPointsQAList = new TList() ;
+ fRecPointsQAList = new TObjArray(100) ;
InitRecPoints() ;
return fRecPointsQAList ;
break ;
case AliQA::kESDS:
{
- fESDsQAList = new TList() ;
+ fESDsQAList = new TObjArray(100) ;
InitESDs() ;
return fESDsQAList ;
break ;
}
+ case AliQA::kNTASKINDEX:
+ break ;
}
return 0x0 ;
}
//____________________________________________________________________________
-void AliQADataMaker::Init(AliQA::TASKINDEX task, TList * list, Int_t run, Int_t cycles)
+void AliQADataMaker::Init(AliQA::TASKINDEX task, TObjArray * list, Int_t run, Int_t cycles)
{
// Intialisation by passing the list of QA data booked elsewhere
fESDsQAList = list ;
break ;
}
+ case AliQA::kNTASKINDEX:
+ break ;
}
}
subDir = fDetectorDir->mkdir(AliQA::GetTaskName(task)) ;
subDir->cd() ;
- TList * list = 0x0 ;
+ TObjArray * list = 0x0 ;
switch (task) {
case AliQA::kRAWS:
case AliQA::kESDS:
list = fESDsQAList ;
break ;
- }
+
+ case AliQA::kNTASKINDEX:
+ break ;
+}
TIter next(list) ;
TH1 * h ;
// --- ROOT system ---
#include <TH1.h>
-#include <TList.h>
+#include <TObjArray.h>
#include <TNamed.h>
-class TFile;
+class TClonesArray;
class TDirectory;
+class TFile;
class TObject;
class TTree;
class AliESDEvent;
class AliRawReader;
-class TClonesArray;
// --- Standard library ---
TH1 * GetSDigitsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fSDigitsQAList, index)) ; }
const char * GetDetectorDirName() { return fDetectorDirName.Data() ; }
const Int_t Increment() { return ++fCycleCounter ; }
- TList * Init(AliQA::TASKINDEX, Int_t run, Int_t cycles = -1) ;
- void Init(AliQA::TASKINDEX, TList * list, Int_t run, Int_t cycles = -1) ;
+ TObjArray * Init(AliQA::TASKINDEX, Int_t run, Int_t cycles = -1) ;
+ void Init(AliQA::TASKINDEX, TObjArray * list, Int_t run, Int_t cycles = -1) ;
const Bool_t IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; }
void Reset() ;
void SetCycle(Int_t nevts) { fCycle = nevts ; }
protected:
- Int_t Add2List(TH1 * hist, const Int_t index, TList * list) ;
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX, TList * ) {AliInfo("To be implemented by detectors");}
- TObject * GetData(TList * list, const Int_t index) { return list->At(index) ; }
+ Int_t Add2List(TH1 * hist, const Int_t index, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX, TObjArray * ) {AliInfo("To be implemented by detectors");}
+ TObject * GetData(TObjArray * list, const Int_t index) { return list->At(index) ; }
virtual void InitDigits() {AliInfo("To be implemented by detectors");}
virtual void InitESDs() {AliInfo("To be implemented by detectors");}
virtual void InitHits() {AliInfo("To be implemented by detectors");}
TFile * fOutput ; //! output root file
TDirectory * fDetectorDir ; //! directory for the given detector in the file
TString fDetectorDirName ; //! detector directory name in the quality assurance data file
- TList * fDigitsQAList ; //! list of the digits QA data objects
- TList * fESDsQAList ; //! list of the ESDs QA data objects
- TList * fHitsQAList ; //! list of the hits QA data objects
- TList * fRawsQAList ; //! list of the raws QA data objects
- TList * fRecPointsQAList ; //! list of the recpoints QA data objects
- TList * fSDigitsQAList ; //! list of the sdigits QA data objects
+ TObjArray * fDigitsQAList ; //! list of the digits QA data objects
+ TObjArray * fESDsQAList ; //! list of the ESDs QA data objects
+ TObjArray * fHitsQAList ; //! list of the hits QA data objects
+ TObjArray * fRawsQAList ; //! list of the raws QA data objects
+ TObjArray * fRecPointsQAList ; //! list of the recpoints QA data objects
+ TObjArray * fSDigitsQAList ; //! list of the sdigits QA data objects
Int_t fCurrentCycle ; //! current cycle number
Int_t fCycle ; //! length (# events) of the QA data acquisition cycle
Int_t fCycleCounter ; //! cycle counter
/* $Id$ */
+#include <TKey.h>
#include <TFile.h>
#include <TFileMerger.h>
#include <TPluginManager.h>
#include <TString.h>
#include <TSystem.h>
+#include "AliCDBManager.h"
+#include "AliCDBEntry.h"
+#include "AliCDBId.h"
+#include "AliCDBMetaData.h"
#include "AliESDEvent.h"
#include "AliHeader.h"
#include "AliLog.h"
case AliQA::kESDS :
qadm->Exec(taskIndex, fESD) ;
break;
+ case AliQA::kNTASKINDEX :
+ break;
} //task switch
qadm->Increment() ;
} //data maker exist
return rv ;
}
+//_____________________________________________________________________________
+Bool_t AliQADataMakerSteer::Finish(const AliQA::TASKINDEX taskIndex)
+{
+ // write output to file for all detectors
+ for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
+ if (IsSelected(AliQA::GetDetName(iDet))) {
+ AliQADataMaker * qadm = GetQADataMaker(iDet) ;
+ if (qadm) {
+ qadm->EndOfCycle(taskIndex) ;
+ }
+ }
+ }
+ return kTRUE ;
+}
+
+//_____________________________________________________________________________
+TList * AliQADataMakerSteer::GetFromOCDB(AliQA::DETECTORINDEX det, AliQA::TASKINDEX task) const
+{
+ // Retrieve the list of QA data for a given detector and a given task
+ TList * rv = NULL ;
+ AliCDBManager* man = AliCDBManager::Instance() ;
+ man->SetDefaultStorage("local://TestCDB") ;
+ char detOCDBDir[20] ;
+ sprintf(detOCDBDir, "QA/Ref/%s", AliQA::GetDetName((Int_t)det)) ;
+ AliInfo(Form("Retrieving reference data from local://TestCDB/%s %s", detOCDBDir, AliQA::GetTaskName(task).Data())) ;
+ AliCDBEntry* entry = man->Get(detOCDBDir,0) ;
+ TList * listDetQAD = dynamic_cast<TList *>(entry->GetObject()) ;
+ if ( listDetQAD )
+ rv = dynamic_cast<TList *>(listDetQAD->FindObject(AliQA::GetTaskName(task))) ;
+
+ return rv ;
+}
+
//_____________________________________________________________________________
AliLoader * AliQADataMakerSteer::GetLoader(Int_t iDet)
{
}
//_____________________________________________________________________________
-Bool_t AliQADataMakerSteer::Finish(const AliQA::TASKINDEX taskIndex)
-{
- // write output to file for all detectors
- for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
- if (IsSelected(AliQA::GetDetName(iDet))) {
- AliQADataMaker * qadm = GetQADataMaker(iDet) ;
- if (qadm) {
- qadm->EndOfCycle(taskIndex) ;
- }
- }
- }
- return kTRUE ;
-}
-
-//_____________________________________________________________________________
-Bool_t AliQADataMakerSteer::Merge()
+Bool_t AliQADataMakerSteer::Merge(const Int_t runNumber) const
{
// Merge all the cycles from all detectors in one single file per run
-
- gROOT->ProcessLine(".! ls *QA*.*.*.root > tempo.txt") ;
+ char cmd[80] ;
+ if ( runNumber == -1 )
+ sprintf(cmd, ".! ls *%s*.*.*.root > tempo.txt", AliQA::GetQADataFileName()) ;
+ else
+ sprintf(cmd, ".! ls *%s*.%d.*.root > tempo.txt", AliQA::GetQADataFileName(), runNumber) ;
+ gROOT->ProcessLine(cmd) ;
ifstream in("tempo.txt") ;
const Int_t runMax = 10 ;
TString file[AliQA::kNDET*runMax] ;
Int_t index = 0 ;
while ( 1 ) {
- in >> file[index++] ;
+ in >> file[index] ;
if ( !in.good() )
break ;
+ index++ ;
+ }
+
+ if ( index == 0 ) {
+ AliError(Form("run number %d not found", runNumber)) ;
+ return kFALSE ;
}
+
Int_t previousRun = -1 ;
Int_t runIndex = 0 ;
+ char stmp[10] ;
+ sprintf(stmp, ".%s.", AliQA::GetQADataFileName()) ;
for (Int_t ifile = 0 ; ifile < index-1 ; ifile++) {
TString tmp(file[ifile]) ;
tmp.ReplaceAll(".root", "") ;
TString det = tmp(0, tmp.Index(".")) ;
- tmp.Remove(0, tmp.Index(".QA.")+4) ;
+ tmp.Remove(0, tmp.Index(stmp)+4) ;
TString ttmp = tmp(0, tmp.Index(".")) ;
Int_t newRun = ttmp.Atoi() ;
if (newRun != previousRun) {
}
for (Int_t irun = 0 ; irun < runIndex ; irun++) {
TFileMerger merger ;
- char outFileName[runMax] ;
- sprintf(outFileName, "Merged.QA.%d.root", runIndex-1) ;
+ char outFileName[20] ;
+ sprintf(outFileName, "Merged.%s.%d.root", AliQA::GetQADataFileName(), runIndex-1) ;
merger.OutputFile(outFileName) ;
for (Int_t ifile = 0 ; ifile < index-1 ; ifile++) {
char pattern[100] ;
- sprintf(pattern, "QA.%d.", runIndex-1) ;
+ sprintf(pattern, "%s.%d.", AliQA::GetQADataFileName(), runIndex-1) ;
TString tmp(file[ifile]) ;
if (tmp.Contains(pattern))
merger.AddFile(tmp) ;
return rv ;
}
+
+//_____________________________________________________________________________
+Bool_t AliQADataMakerSteer::Save2OCDB(const Int_t runNumber, const Int_t cycleNumber, const char * detectors) const
+{
+ // take the locasl QA data merge into a single file and save in OCDB
+ Bool_t rv = kTRUE ;
+ TString tmp(AliQA::GetQARefStorage()) ;
+ if ( tmp.IsNull() ) {
+ AliError("No storage defined, use AliQA::SetQARefStorage") ;
+ return kFALSE ;
+ }
+ if ( !(tmp.Contains(AliQA::GetLabLocalOCDB()) || tmp.Contains(AliQA::GetLabAliEnOCDB())) ) {
+ AliError(Form("%s is a wrong storage, use %s or %s", AliQA::GetQARefStorage(), AliQA::GetLabLocalOCDB().Data(), AliQA::GetLabAliEnOCDB().Data())) ;
+ return kFALSE ;
+ }
+ TString sdet(detectors) ;
+ sdet.ToUpper() ;
+ TFile * inputFile ;
+ if ( sdet.Contains("ALL") ) {
+ rv = Merge(runNumber) ;
+ if ( ! rv )
+ return kFALSE ;
+ char inputFileName[20] ;
+ sprintf(inputFileName, "Merged.%s.%d.root", AliQA::GetQADataFileName(), runNumber) ;
+ inputFile = TFile::Open(inputFileName) ;
+ rv = SaveIt2OCDB(inputFile) ;
+ } else {
+ for (Int_t index = 0; index < AliQA::kNDET; index++) {
+ if (sdet.Contains(AliQA::GetDetName(index))) {
+ char inputFileName[20] ;
+ sprintf(inputFileName, "%s.%s.%d.%d.root", AliQA::GetDetName(index), AliQA::GetQADataFileName(), runNumber, cycleNumber) ;
+ inputFile = TFile::Open(inputFileName) ;
+ rv *= SaveIt2OCDB(inputFile) ;
+ }
+ }
+ }
+ return rv ;
+}
+
+//_____________________________________________________________________________
+Bool_t AliQADataMakerSteer::SaveIt2OCDB(TFile * inputFile) const
+{
+ // reads the TH1 from file and adds it to appropriate list before saving to OCDB
+ Bool_t rv = kTRUE ;
+ AliInfo(Form("Saving TH1s in %s to %s", inputFile->GetName(), AliQA::GetQARefStorage())) ;
+ AliCDBManager* man = AliCDBManager::Instance() ;
+ man->SetDefaultStorage(AliQA::GetQARefStorage()) ;
+
+ for ( Int_t detIndex = 0 ; detIndex < AliQA::kNDET ; detIndex++) {
+ TDirectory * detDir = inputFile->GetDirectory(AliQA::GetDetName(detIndex)) ;
+ if ( detDir ) {
+ AliInfo(Form("Entering %s", detDir->GetName())) ;
+ char detOCDBDir[20] ;
+ sprintf(detOCDBDir, "QA/Ref/%s", AliQA::GetDetName(detIndex)) ;
+ AliCDBId idr(detOCDBDir,0,999999999) ;
+ TList * listDetQAD = new TList() ;
+ char listName[20] ;
+ sprintf(listName, "%s QA data Reference", AliQA::GetDetName(detIndex)) ;
+ listDetQAD->SetName(listName) ;
+ TList * taskList = detDir->GetListOfKeys() ;
+ TIter nextTask(taskList) ;
+ TKey * taskKey ;
+ while ( (taskKey = dynamic_cast<TKey*>(nextTask())) ) {
+ TDirectory * taskDir = detDir->GetDirectory(taskKey->GetName()) ;
+ AliInfo(Form("Saving %s", taskDir->GetName())) ;
+ TList * listTaskQAD = new TList() ;
+ listTaskQAD->SetName(taskKey->GetName()) ;
+ listDetQAD->Add(listTaskQAD) ;
+ TList * histList = taskDir->GetListOfKeys() ;
+ TIter nextHist(histList) ;
+ TKey * histKey ;
+ while ( (histKey = dynamic_cast<TKey*>(nextHist())) ) {
+ TObject * odata = taskDir->Get(histKey->GetName()) ;
+ if ( odata->IsA()->InheritsFrom("TH1") ) {
+ AliInfo(Form("Adding %s", histKey->GetName())) ;
+ TH1 * hdata = static_cast<TH1*>(odata) ;
+ listTaskQAD->Add(hdata) ;
+ }
+ }
+ }
+ AliCDBMetaData mdr ;
+ man->Put(listDetQAD, idr, &mdr) ;
+ }
+ }
+ return rv ;
+}
AliQADataMakerSteer(const AliQADataMakerSteer & qas) ;
AliQADataMakerSteer & operator = (const AliQADataMakerSteer & qas) ;
virtual ~AliQADataMakerSteer() ;
- Bool_t Merge() ;
- void Reset() ;
- Bool_t Run(const char * detectors, const AliQA::TASKINDEX taskIndex, const char * fileName = NULL) ;
- Bool_t Run(const char * detectors, AliRawReader * rawReader) ;
- void SetCycleLength(const AliQA::DETECTORINDEX det, const Int_t cycle) { fQACycles[det] = cycle ; }
- void SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; }
+ TList * GetFromOCDB(AliQA::DETECTORINDEX det, AliQA::TASKINDEX task) const ;
+ Bool_t Merge(const Int_t runNumber = -1) const ;
+ void Reset() ;
+ Bool_t Run(const char * detectors, const AliQA::TASKINDEX taskIndex, const char * fileName = NULL) ;
+ Bool_t Run(const char * detectors, AliRawReader * rawReader) ;
+ Bool_t Save2OCDB(const Int_t runNumber, const Int_t cycleNumber, const char * detectors = "ALL") const ;
+ void SetCycleLength(const AliQA::DETECTORINDEX det, const Int_t cycle) { fQACycles[det] = cycle ; }
+ void SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; }
+
private:
Bool_t DoIt(const AliQA::TASKINDEX taskIndex) ;
AliLoader * GetLoader(Int_t iDet) ;
Bool_t InitRunLoader() ;
Bool_t IsSelected(const char * detName) ;
Bool_t Finish(const AliQA::TASKINDEX taskIndex) ;
+ Bool_t SaveIt2OCDB(TFile * inputFile) const ;
Bool_t fCycleSame ; //! true if 2 consecutive data making for a same detector
return *this;
}
//____________________________________________________________________________
-void AliT0QADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX task, TList * list)
+void AliT0QADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX task, TObjArray * list)
{
//Detector specific actions at end of cycle
// do the QA checking
if(i<12) fhHitsTime[i] = new TH1F(timename.Data(),timename.Data(),100,2000,3000);
else
fhHitsTime[i] = new TH1F(timename.Data(),timename.Data(),100,12000,13000);
- Add2HitsList( fhHitsTime[i],i);
+ Add2HitsList( fhHitsTime[i],i);
}
/*
TH2F *fhHitsEffA = new TH2F("hHitsEffA", "Hits Efficiency A side", 25,-0.5,24.5, 100,12,13 );
virtual void MakeDigits(TTree* digitsTree) ; //Fill Digit QA histo
virtual void MakeRecPoints(TTree * clusters) ; //Fill cluster QA histo
virtual void MakeESDs(AliESDEvent * esd) ; //Fill hit QA histo
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX, TList * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX, TObjArray * list) ;
virtual void StartOfDetectorCycle() ;
ClassDef(AliT0QADataMaker,1) // description
}
//____________________________________________________________________________
-void AliTOFQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX task, TList * list)
+void AliTOFQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX task, TObjArray * list)
{
//Detector specific actions at end of cycle
// do the QA checking
virtual void MakeRecPoints(TTree * recTree) ;
virtual void MakeRaws(AliRawReader* rawReader) ;
virtual void StartOfDetectorCycle() ;
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX, TList * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX, TObjArray * list) ;
virtual void GetMapIndeces(Int_t *in, Int_t *out) ;
ClassDef(AliTOFQADataMaker,1) // description
}
//____________________________________________________________________________
-void AliTRDQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX task, TList * list)
+void AliTRDQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX task, TObjArray * list)
{
//
// Detector specific actions at end of cycle
private:
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX task, TList * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX task, TObjArray * list) ;
virtual void InitHits() ;
virtual void InitESDs() ;
virtual void InitDigits() ;