#include <TROOT.h>
#include <TString.h>
#include <TSystem.h>
+#include <TStopwatch.h>
#include "AliCDBManager.h"
#include "AliCDBEntry.h"
fRunLoader(NULL),
fTasks(""),
fEventSpecie(AliRecoParam::kDefault),
- fPrintImage(kTRUE)
+ fPrintImage(kTRUE),
+ fSaveData(kTRUE)
{
// default ctor
fMaxEvents = fNumberOfEvents ;
fRunLoader(NULL),
fTasks(""),
fEventSpecie(AliRecoParam::kDefault),
- fPrintImage(kTRUE)
+ fPrintImage(kTRUE),
+ fSaveData(kTRUE)
{
// default ctor
fMaxEvents = fNumberOfEvents ;
fRunLoader(NULL),
fTasks(qas.fTasks),
fEventSpecie(qas.fEventSpecie),
- fPrintImage(qas.fPrintImage)
+ fPrintImage(qas.fPrintImage),
+ fSaveData(qas.fSaveData)
{
// cpy ctor
delete fRawReader ;
fRawReader = NULL ;
}
- TCanvas fakeCanvas ;
- if (fPrintImage)
- fakeCanvas.Print(Form("%s%s%d.%s]", AliQAv1::GetImageFileName(), GetMode(), fRunNumber, AliQAv1::GetImageFileFormat()));
+// TCanvas fakeCanvas ;
+// if (fPrintImage)
+// fakeCanvas.Print(Form("%s%s%d.%s]", AliQAv1::GetImageFileName(), GetMode(), fRunNumber, AliQAv1::GetImageFileFormat()), "ps");
}
//_____________________________________________________________________________
}
break ;
case AliQAv1::kSDIGITS :
- if( loader ) {
- loader->LoadSDigits() ;
- data = loader->TreeS() ;
- if ( ! data ) {
- AliWarning(Form(" SDigit Tree not found for %s", AliQAv1::GetDetName(iDet))) ;
- break ;
- }
- qadm->Exec(taskIndex, data) ;
+ {
+
+ TString fileName(Form("%s.SDigits.root", AliQAv1::GetDetName(iDet))) ;
+ if (gSystem->FindFile("./", fileName)) {
+ if( loader ) {
+ loader->LoadSDigits() ;
+ data = loader->TreeS() ;
+ if ( ! data ) {
+ AliWarning(Form(" SDigit Tree not found for %s", AliQAv1::GetDetName(iDet))) ;
+ break ;
+ }
+ qadm->Exec(taskIndex, data) ;
+ }
}
+ }
break;
case AliQAv1::kDIGITS :
if( loader ) {
if ( AliRecoParam::Convert(qadm->GetRecoParam()->GetEventSpecie()) != AliRecoParam::kDefault)
qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ;
- } else if ( iDet < AliQAv1::kHLT ) {
+ } else if ( iDet < AliQAv1::kGLOBAL ) {
// load the QA data maker object
TPluginManager* pluginManager = gROOT->GetPluginManager() ;
// End of cycle QADataMakers
AliQAChecker::Instance()->SetRunNumber(fRunNumber) ;
- if (fPrintImage) {
- TCanvas fakeCanvas ;
- fakeCanvas.Print(Form("%s%s%d.%s[", AliQAv1::GetImageFileName(), GetMode(), fRunNumber, AliQAv1::GetImageFileFormat())) ;
- }
+ TCanvas fakeCanvas ;
+ if (fPrintImage)
+ fakeCanvas.Print(Form("%s%s%d.%s[", AliQAv1::GetImageFileName(), GetMode(), fRunNumber, AliQAv1::GetImageFileFormat()), "ps") ;
for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
if (IsSelected(AliQAv1::GetDetName(iDet))) {
AliQADataMaker * qadm = GetQADataMaker(iDet) ;
if (!det || !det->IsActive())
continue ;
}
- qac->SetPrintImage(fPrintImage) ;
-
- for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
- if ( fTasks.Contains(Form("%d", taskIndex)) )
- qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ;
- }
+ if (qac)
+ qac->SetPrintImage(fPrintImage) ;
+ for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
+ if ( fTasks.Contains(Form("%d", taskIndex)) )
+ qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ;
+ }
qadm->Finish();
}
}
+ if (fPrintImage)
+ fakeCanvas.Print(Form("%s%s%d.%s]", AliQAv1::GetImageFileName(), GetMode(), fRunNumber, AliQAv1::GetImageFileFormat()), "ps");
}
//_____________________________________________________________________________
// End of cycle QADataMakers
AliQAChecker::Instance()->SetRunNumber(fRunNumber) ;
- if (fPrintImage) {
- TCanvas fakeCanvas ;
- fakeCanvas.Print(Form("%s%s%d.%s[", AliQAv1::GetImageFileName(), GetMode(), fRunNumber, AliQAv1::GetImageFileFormat())) ;
- }
+ TCanvas fakeCanvas ;
+ if (fPrintImage)
+ fakeCanvas.Print(Form("%s%s%d.%s[", AliQAv1::GetImageFileName(), GetMode(), fRunNumber, AliQAv1::GetImageFileFormat()), "ps") ;
for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
if (IsSelected(AliQAv1::GetDetName(iDet))) {
AliQADataMaker * qadm = GetQADataMaker(iDet) ;
// skip non active detectors
if (!detectors.Contains(AliQAv1::GetDetName(iDet)))
continue ;
- qac->SetPrintImage(fPrintImage) ;
- for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
- if ( fTasks.Contains(Form("%d", taskIndex)) )
- qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ;
- }
+ if (qac)
+ qac->SetPrintImage(fPrintImage) ;
+ for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
+ if ( fTasks.Contains(Form("%d", taskIndex)) )
+ qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ;
+ }
qadm->Finish();
}
}
+ if (fPrintImage)
+ fakeCanvas.Print(Form("%s%s%d.%s]", AliQAv1::GetImageFileName(), GetMode(), fRunNumber, AliQAv1::GetImageFileFormat()), "ps");
}
//_____________________________________________________________________________
InitQADataMaker(fRunNumber, detArray) ; //, fCycleSame, kTRUE, detArray) ;
if (fPrintImage) {
TCanvas fakeCanvas ;
- fakeCanvas.Print(Form("%s%s%d.%s[", AliQAv1::GetImageFileName(), GetMode(), fRunNumber, AliQAv1::GetImageFileFormat())) ;
+ TStopwatch timer ;
+ timer.Start() ;
+ while (timer.CpuTime()<5) {
+ timer.Continue();
+ gSystem->ProcessEvents();
+ }
+ fakeCanvas.Print(Form("%s%s%d.%s[", AliQAv1::GetImageFileName(), GetMode(), fRunNumber, AliQAv1::GetImageFileFormat()), "ps") ;
}
return kTRUE ;
}
Bool_t rv = kFALSE;
const TString detName(det) ;
// always activates Correlation
- if ( detName.Contains(AliQAv1::GetDetName(AliQAv1::kCORR))) {
+ if ( detName.Contains(AliQAv1::GetDetName(AliQAv1::kCORR)) || detName.Contains(AliQAv1::GetDetName(AliQAv1::kGLOBAL))) {
rv = kTRUE ;
} else {
// check if all detectors are selected
//Runs all the QA data Maker for Raws only and on one event only (event loop done by calling method)
if ( ! rawReader )
return ;
- AliCodeTimerAuto("") ;
- if (fTasks.Contains(Form("%d", AliQAv1::kRAWS)) || fTasks.Contains("ALL")){
+ if (fTasks.Contains(Form("%d", AliQAv1::kRAWS))){
for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
if (!IsSelected(AliQAv1::GetDetName(iDet)))
continue;
if ( qadm->IsCycleDone() ) {
qadm->EndOfCycle() ;
}
- AliCodeTimerStart(Form("running RAW quality assurance data maker for %s", AliQAv1::GetDetName(iDet)));
qadm->SetEventSpecie(fEventSpecie) ;
if ( qadm->GetRecoParam() )
if ( AliRecoParam::Convert(qadm->GetRecoParam()->GetEventSpecie()) != AliRecoParam::kDefault)
qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ;
qadm->Exec(AliQAv1::kRAWS, rawReader) ;
- AliCodeTimerStop(Form("running RAW quality assurance data maker for %s", AliQAv1::GetDetName(iDet)));
}
}
}
{
//Runs all the QA data Maker for ESDs only and on one event only (event loop done by calling method)
- AliCodeTimerAuto("") ;
- if (fTasks.Contains(Form("%d", AliQAv1::kESDS)) || fTasks.Contains("ALL")) {
+ if (fTasks.Contains(Form("%d", AliQAv1::kESDS))) {
for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
if (!IsSelected(AliQAv1::GetDetName(iDet)))
continue;
if ( qadm->IsCycleDone() ) {
qadm->EndOfCycle() ;
}
- AliCodeTimerStart(Form("running ESD quality assurance data maker for %s", AliQAv1::GetDetName(iDet)));
qadm->Exec(AliQAv1::kESDS, esd) ;
- AliCodeTimerStop(Form("running ESD quality assurance data maker for %s", AliQAv1::GetDetName(iDet)));
}
}
}
// Runs all the QA data Maker for ESDs only and on one event only (event loop done by calling method)
TString test(tree->GetName()) ;
- AliCodeTimerAuto("") ;
- if (fTasks.Contains(Form("%d", AliQAv1::kRECPOINTS)) || fTasks.Contains("ALL")) {
+ if (fTasks.Contains(Form("%d", AliQAv1::kRECPOINTS))) {
if (IsSelected(AliQAv1::GetDetName(det))) {
AliQADataMaker *qadm = GetQADataMaker(det);
if (qadm) {
qadm->SetEventSpecie(fEventSpecie) ;
- if ( qadm->GetRecoParam() )
+ if ( qadm->GetRecoParam() ) {
if ( AliRecoParam::Convert(qadm->GetRecoParam()->GetEventSpecie()) != AliRecoParam::kDefault)
- qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ;
+ qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ;
+ else
+ AliError(Form("%d defined by %s is not an event specie", qadm->GetRecoParam()->GetEventSpecie(), qadm->GetName())) ;
+ }
if ( qadm->IsCycleDone() ) {
qadm->EndOfCycle() ;
}
- AliCodeTimerStart(Form("running RecPoints quality assurance data maker for %s", AliQAv1::GetDetName(det)));
if (test.Contains("TreeD")) {
qadm->Exec(AliQAv1::kDIGITSR, tree) ;
} else if (test.Contains("TreeR")) {
qadm->Exec(AliQAv1::kRECPOINTS, tree) ;
- AliCodeTimerStop(Form("running RecPoints quality assurance data maker for %s", AliQAv1::GetDetName(det)));
}
}
}
return rv ;
}
+//_____________________________________________________________________________
+
+void AliQAManager::SetCheckerExternParam(AliQAv1::DETECTORINDEX_t detIndex, TList * parameterList)
+{
+ // set the external parameters list for the detector checkers
+ AliQACheckerBase * qac = AliQAChecker::Instance()->GetDetQAChecker(detIndex) ;
+ qac->SetExternParamlist(parameterList) ;
+ qac->PrintExternParam() ;
+}
+
//_____________________________________________________________________________
void AliQAManager::SetEventSpecie(AliRecoParam::EventSpecie_t es)
{