for (Int_t mod = 0; mod < modMax; mod++) {
sprintf(title, "Raws x Columns for PHOS module %d", mod+1) ;
sprintf(name, "hPHOSxyMod%d", mod+1) ;
- h1[mod] = new TH2I(name, title, 64, 0, 63, 56, 0, 55) ;
+ h1[mod] = new TH2I(name, title, 64, 1, 65, 56, 1, 57) ;
Add2RawsList(h1[mod], mod+1) ;
}
TH1F * h6 = new TH1F("hPhosRawtime", "Time of raw hits in PHOS", 100, 0, 100.) ;
AliQualAss * AliQualAss::fgQA = 0x0 ;
TFile * AliQualAss::fgDataFile = 0x0 ;
- TString AliQualAss::fgDataName = "QAData" ;
+ TString AliQualAss::fgDataName = "QA" ;
TString AliQualAss::fgDetNames[] = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD",
"ZDC", "PMD", "T0", "VZERO", "ACORDE", "HLT"} ;
TString AliQualAss::fgTaskNames[] = {"Raws", "Hits", "SDigits", "Digits", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ;
//_______________________________________________________________
-TFile * AliQualAss::GetQADMOutFile(Int_t run, Int_t cycle)
+TFile * AliQualAss::GetQADMOutFile(const char * name, const Int_t run, const Int_t cycle)
{
// opens the file to store the detectors Quality Assurance Data Maker results
char temp[100] ;
- sprintf(temp, "%s_%d_%d.root", fgDataName.Data(), run, cycle) ;
+ sprintf(temp, "%s.%s.%d.%d.root", name, fgDataName.Data(), run, cycle) ;
TString opt ;
if (! fgDataFile ) {
if (gSystem->AccessPathName(temp))
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 TFile * GetQADMOutFile(Int_t run, Int_t cycle) ;
+ static TFile * GetQADMOutFile(const char * name, const Int_t run, const Int_t cycle) ;
void Set(QABIT bit) ;
void Show() const { ShowStatus(fDet) ; }
void ShowAll() const ;
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)
+ 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 {
+ else {
Double_t rv = DiffK(hdata, href) ;
AliInfo(Form("%s ->Test = %f", hdata->GetName(), rv)) ;
test += rv ;
fRun(0)
{
// ctor
- TString tmp(GetName()) ;
- tmp.Append("QA") ;
- SetName(tmp.Data()) ;
fDetectorDirName = GetName() ;
}
void AliQualAssDataMaker::Finish(AliQualAss::TASKINDEX) const
{
// write to the output File
+ fOutput->Close() ;
}
//____________________________________________________________________________
if (cycles > 0)
SetCycle(cycles) ;
- switch (task) {
+ switch (task) {
case AliQualAss::kRAWS:
{
fRawsQAList = new TList() ;
{
// Finishes a cycle of QA data acquistion
- if ( (strcmp(sameCycle, "same") != 0) ) {
- fCurrentCycle++ ;
+ if ( (strcmp(sameCycle, "new") == 0) ) {
ResetCycle() ;
- } else if ( !(strcmp(sameCycle, "") != 0) )
- AliFatal(Form("%s is an invalid option, valid options are: same", sameCycle)) ;
-
- fOutput = AliQualAss::GetQADMOutFile(fRun, fCurrentCycle) ;
-
+ if (fOutput)
+ fOutput->Close() ;
+ fOutput = AliQualAss::GetQADMOutFile(GetName(), fRun, fCurrentCycle) ;
+ }
+
AliInfo(Form(" Run %d Cycle %d task %s file %s",
fRun, fCurrentCycle, AliQualAss::GetTaskName(task).Data(), fOutput->GetName() )) ;
const Int_t Increment() { return ++fCycleCounter ; }
TList * Init(AliQualAss::TASKINDEX, Int_t run, Int_t cycles = -1) ;
const Bool_t IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; }
- const Int_t Add2DigitsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fDigitsQAList) ; }
- const Int_t Add2ESDsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fESDsQAList) ; }
- const Int_t Add2HitsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fHitsQAList) ; }
- const Int_t Add2RecPointsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fRecPointsQAList) ; }
- const Int_t Add2RawsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fRawsQAList) ; }
- const 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)) ; }
+ const Int_t Add2DigitsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fDigitsQAList) ; }
+ const Int_t Add2ESDsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fESDsQAList) ; }
+ const Int_t Add2HitsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fHitsQAList) ; }
+ const Int_t Add2RecPointsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fRecPointsQAList) ; }
+ const Int_t Add2RawsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fRawsQAList) ; }
+ const Int_t Add2SDigitsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fSDigitsQAList) ; }
+ TH1 * GetDigitsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fDigitsQAList, index)) ; }
+ TH1 * GetESDsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fESDsQAList, index)) ; }
+ TH1 * GetHitsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fHitsQAList, index)) ; }
+ TH1 * GetRecPointsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fRecPointsQAList, index)) ; }
+ TH1 * GetRawsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fRawsQAList, index)) ; }
+ TH1 * GetSDigitsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fSDigitsQAList, index)) ; }
void SetCycle(Int_t nevts) { fCycle = nevts ; }
- void StartOfCycle(AliQualAss::TASKINDEX, Option_t * sameCycle = "") ;
+ void StartOfCycle(AliQualAss::TASKINDEX, Option_t * sameCycle = "new") ;
protected:
- Int_t Add2List(TH1 * hist, Int_t index, TList * list) { list->AddAt(hist, index) ; return list->LastIndex() ; }
+ Int_t Add2List(TH1 * hist, const Int_t index, TList * list) { list->AddAt(hist, index) ; return list->LastIndex() ; }
virtual void EndOfDetectorCycle() {AliInfo("To be implemented by detectors");}
- TObject * GetData(TList * list, Int_t index) { return list->At(index) ; }
+ TObject * GetData(TList * 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");}
virtual void MakeRecPoints(TTree * ) {AliInfo("To be implemented by detectors");}
virtual void MakeSDigits(TClonesArray * ) {AliInfo("To be implemented by detectors");}
//virtual void MakeTrackSegments(TTree * ) {AliInfo("To be implemented by detectors");}
- void ResetCycle() { fCycleCounter = 0 ; }
+ void ResetCycle() { fCurrentCycle++ ; fCycleCounter = 0 ; }
virtual void StartOfDetectorCycle() {AliInfo("To be implemented by detectors");}
TFile * fOutput ; //! output root file