const Bool_t AliQualAss::CheckRange(ALITASK task) const
{
// check if task is given taskk range: 0:kNTASK
- Bool_t rv = ( task < kSIM || task > kNTASK ) ? kFALSE : kTRUE ;
+ Bool_t rv = ( task < kRAW || task > kNTASK ) ? kFALSE : kTRUE ;
if (!rv)
AliFatal(Form("Module index %d is out of range: 0 <= index <= %d", task, kNTASK)) ;
return rv ;
switch (tsk) {
case kNULLTASK:
break ;
+ case kRAW:
+ tskName = "RAW" ;
+ break ;
case kSIM:
tskName = "SIM" ;
break ;
switch (tsk) {
case kNULLTASK:
break ;
- case kSIM:
+ case kRAW:
+ fgQA = new AliQualAss(tsk) ;
+ break ;
+ case kSIM:
fgQA = new AliQualAss(tsk) ;
break ;
case kREC:
switch (tsk) {
case kNULLTASK:
break ;
- case kSIM:
+ case kRAW:
offset+= 0 ;
break ;
- case kREC:
+ case kSIM:
offset+= 4 ;
break ;
- case kESD:
+ case kREC:
offset+= 8 ;
break ;
- case kANA:
+ case kESD:
offset+= 12 ;
break ;
+ case kANA:
+ offset+= 16 ;
+ break ;
case kNTASK:
break ;
}
kZDC, kPMD, kT0, kVZERO, kACORDE, kHLT, kNDET
};
enum ALITASK {
- kNULLTASK=-1, kSIM, kREC, kESD, kANA, kNTASK
+ kNULLTASK=-1, kRAW, kSIM, kREC, kESD, kANA, kNTASK
};
enum QABIT {
kNULLBit=-1, kINFO, kWARNING, kERROR, kFATAL, kNBIT
};
enum TASKINDEX {
- kHITS, kSDIGITS, kDIGITS, kRECPOINTS, kTRACKSEGMENTS, kRECPARTICLES, kESDS
+ kRAWS, kHITS, kSDIGITS, kDIGITS, kRECPOINTS, kTRACKSEGMENTS, kRECPARTICLES, kESDS
};
// Creators - destructors
// --- ROOT system ---
#include <TSystem.h>
#include <TFile.h>
-#include <TClonesArray.h>
+#include <TList.h>
#include <TTree.h>
// --- Standard library ---
AliQualAssDataMaker::AliQualAssDataMaker(const char * name, const char * title) :
TNamed(name, title),
fOutput(0x0),
- fDetectorDir(0x0)
+ fDetectorDir(0x0),
+ fDigitsQAList(0x0),
+ fESDsQAList(0x0),
+ fHitsQAList(0x0),
+ fRawsQAList(0x0),
+ fRecPointsQAList(0x0),
+ fSDigitsQAList(0x0)
{
// ctor
TString tmp(GetName()) ;
AliQualAssDataMaker::AliQualAssDataMaker(const AliQualAssDataMaker& qadm) :
TNamed(qadm.GetName(), qadm.GetTitle()),
fOutput(qadm.fOutput),
- fDetectorDir(qadm.fDetectorDir)
+ fDetectorDir(qadm.fDetectorDir),
+ fDigitsQAList(qadm.fDigitsQAList),
+ fESDsQAList(qadm.fESDsQAList),
+ fHitsQAList(qadm.fHitsQAList),
+ fRawsQAList(qadm.fRecPointsQAList),
+ fRecPointsQAList(qadm.fRecPointsQAList),
+ fSDigitsQAList(qadm.fSDigitsQAList)
{
//copy ctor
fDetectorDirName = GetName() ;
fDetectorDir = fOutput->mkdir(GetDetectorDirName()) ;
switch (task) {
+
+ case AliQualAss::kRAWS:
+ AliInfo("Processing Raws QA") ;
+ MakeRaws(data) ;
+ break ;
+
case AliQualAss::kHITS:
AliInfo("Processing Hits QA") ;
MakeHits(data) ;
case AliQualAss::kRECPOINTS:
AliInfo("Processing RecPoints QA") ;
- {
- TTree * recpoints = dynamic_cast<TTree *>(data) ;
- if (recpoints)
- MakeRecPoints(recpoints) ;
- else
- AliError("Wrong type of recpoints container") ;
- }
+ TTree * recpoints = dynamic_cast<TTree *>(data) ;
+ if (recpoints)
+ MakeRecPoints(recpoints) ;
+ else
+ AliError("Wrong type of recpoints container") ;
break ;
case AliQualAss::kTRACKSEGMENTS:
}
//____________________________________________________________________________
-void AliQualAssDataMaker::Init(AliQualAss::TASKINDEX task)
+TList * AliQualAssDataMaker::Init(AliQualAss::TASKINDEX task)
{
// general intialisation
-
TDirectory * subDir = 0x0 ;
switch (task) {
+ case AliQualAss::kRAWS:
+ subDir = fDetectorDir->GetDirectory("Raws") ;
+ if (!subDir)
+ subDir = fDetectorDir->mkdir("Raws") ;
+ subDir->cd() ;
+ fRawsQAList = new TList() ;
+ InitRaws() ;
+ return fRawsQAList ;
+ break ;
+
case AliQualAss::kHITS:
subDir = fDetectorDir->GetDirectory("Hits") ;
if (!subDir)
subDir = fDetectorDir->mkdir("Hits") ;
subDir->cd() ;
+ fHitsQAList = new TList() ;
InitHits() ;
+ return fHitsQAList ;
break ;
case AliQualAss::kSDIGITS:
if (!subDir)
subDir = fDetectorDir->mkdir("SDigits") ;
subDir->cd() ;
+ fSDigitsQAList = new TList() ;
InitSDigits() ;
+ return fSDigitsQAList ;
break ;
case AliQualAss::kDIGITS:
subDir = fDetectorDir->GetDirectory("Digits") ;
if (!subDir)
subDir = fDetectorDir->mkdir("Digits") ;
- subDir->cd() ;
+ subDir->cd() ;
+ fDigitsQAList = new TList();
InitDigits() ;
+ return fDigitsQAList ;
break ;
case AliQualAss::kRECPOINTS:
if(!subDir)
subDir = fDetectorDir->mkdir("RecPoints") ;
subDir->cd() ;
+ fRecPointsQAList = new TList ;
InitRecPoints() ;
+ return fRecPointsQAList ;
break ;
case AliQualAss::kTRACKSEGMENTS:
- subDir = fDetectorDir->GetDirectory("TrackSegments") ;
- if (!subDir)
- subDir = fDetectorDir->mkdir("TrackSegments") ;
- subDir->cd() ;
- InitTrackSegments() ;
+// subDir = fDetectorDir->GetDirectory("TrackSegments") ;
+// if (!subDir)
+// subDir = fDetectorDir->mkdir("TrackSegments") ;
+// subDir->cd() ;
+// InitTrackSegments() ;
break ;
case AliQualAss::kRECPARTICLES:
- subDir = fDetectorDir->GetDirectory("RecParticles") ;
- if (!subDir)
- subDir = fDetectorDir->mkdir("RecParticles") ;
- subDir->cd() ;
- InitRecParticles() ;
+// subDir = fDetectorDir->GetDirectory("RecParticles") ;
+// if (!subDir)
+// subDir = fDetectorDir->mkdir("RecParticles") ;
+// subDir->cd() ;
+// InitRecParticles() ;
break ;
case AliQualAss::kESDS:
if (!subDir)
subDir = fDetectorDir->mkdir("ESDs") ;
subDir->cd() ;
- InitESDs() ;
+ fESDsQAList = new TList() ;
+ InitESDs() ;
+ return fRecPointsQAList ;
break ;
}
+ return 0x0 ;
}
// --- ROOT system ---
+#include <TH1.h>
+#include <TList.h>
#include <TNamed.h>
class TFile;
class TDirectory;
virtual void Exec(AliQualAss::TASKINDEX, TObject * data) ;
void Finish(AliQualAss::TASKINDEX task) const ;
static const char * GetDetectorDirName() { return fDetectorDirName.Data() ; }
- void Init(AliQualAss::TASKINDEX) ;
-
+ TList * Init(AliQualAss::TASKINDEX) ;
+ Int_t Add2DigitsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fDigitsQAList) ; }
+ Int_t Add2ESDsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fESDsQAList) ; }
+ Int_t Add2HitsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fHitsQAList) ; }
+ Int_t Add2RecPointsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fRecPointsQAList) ; }
+ Int_t Add2RawsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fRawsQAList) ; }
+ Int_t Add2SDigitsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fSDigitsQAList) ; }
+ TH1 * GetDigitsData(Int_t index) { return dynamic_cast<TH1 *>(GetData(fDigitsQAList, index)) ; }
+ TH1 * GetESDsData(Int_t index) { return dynamic_cast<TH1 *>(GetData(fESDsQAList, index)) ; }
+ TH1 * GetHitsData(Int_t index) { return dynamic_cast<TH1 *>(GetData(fHitsQAList, index)) ; }
+ TH1 * GetRecPointsData(Int_t index) { return dynamic_cast<TH1 *>(GetData(fRecPointsQAList, index)) ; }
+ TH1 * GetRawsData(Int_t index) { return dynamic_cast<TH1 *>(GetData(fRawsQAList, index)) ; }
+ TH1 * GetSDigitsData(Int_t index) { return dynamic_cast<TH1 *>(GetData(fSDigitsQAList, index)) ; }
+
protected:
+ Int_t Add2List(TH1 * hist, Int_t index, TList * list) { list->AddAt(hist, index) ; return list->LastIndex() ; }
+ TObject * GetData(TList * list, Int_t index) { return list->At(index) ; }
virtual void InitDigits() {AliInfo("To ne implemented by detectors");}
virtual void InitESDs() {AliInfo("To ne implemented by detectors");}
virtual void InitHits() {AliInfo("To ne implemented by detectors");}
- virtual void InitRecParticles() {AliInfo("To ne implemented by detectors");}
+ //virtual void InitRecParticles() {AliInfo("To ne implemented by detectors");}
virtual void InitRecPoints() {AliInfo("To ne implemented by detectors");}
+ virtual void InitRaws() {AliInfo("To ne implemented by detectors");}
virtual void InitSDigits() {AliInfo("To ne implemented by detectors");}
- virtual void InitTrackSegments() {AliInfo("To ne implemented by detectors");}
+ //virtual void InitTrackSegments() {AliInfo("To ne implemented by detectors");}
virtual void MakeESDs(AliESDEvent * ) {AliInfo("To ne implemented by detectors");}
virtual void MakeHits(TObject * ) {AliInfo("To ne implemented by detectors");}
virtual void MakeDigits(TObject * ) {AliInfo("To ne implemented by detectors");}
// virtual void MakeRecParticles(TClonesArray * ) {AliInfo("To ne implemented by detectors");}
+ virtual void MakeRaws(TObject * ) {AliInfo("To ne implemented by detectors");}
virtual void MakeRecPoints(TTree * ) {AliInfo("To ne implemented by detectors");}
virtual void MakeSDigits(TObject * ) {AliInfo("To ne implemented by detectors");}
//virtual void MakeTrackSegments(TTree * ) {AliInfo("To ne implemented by detectors");}
- TFile * fOutput ; //! output root file
- TDirectory * fDetectorDir ; //! directory for the given detector in the file
+ TFile * fOutput ; //! output root file
+ TDirectory * fDetectorDir ; //! directory for the given detector in the file
static TString fDetectorDirName ; //! detector directory name in the quality assurance data file
- ClassDef(AliQualAssDataMaker,1) // description
+ 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
+ ClassDef(AliQualAssDataMaker,1) // description
};