#endif
//_____________________________________________________________________
AliFMDQADataMakerSim::AliFMDQADataMakerSim()
- : AliQADataMakerSim(AliQA::GetDetName(AliQA::kFMD),
- "FMD Quality Assurance Data Maker"),
- fSDigitsArray("AliFMDSDigit", 1000),
- fDigitsArray("AliFMDDigit", 1000),
- fHitsArray("AliFMDHit", 10)
+ : AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kFMD),
+ "FMD Quality Assurance Data Maker")
{
// ctor
}
//_____________________________________________________________________
-AliFMDQADataMakerSim::AliFMDQADataMakerSim(const AliFMDQADataMakerSim& qadm)
- : AliQADataMakerSim(),
- fSDigitsArray(qadm.fSDigitsArray),
- fDigitsArray(qadm.fDigitsArray),
- fHitsArray(qadm.fHitsArray)
+AliFMDQADataMakerSim::AliFMDQADataMakerSim(const AliFMDQADataMakerSim& /*qadm*/)
+ : AliQADataMakerSim()
{
- //copy ctor
-
+ // copy ctor
+ //
// Parameters:
// qadm Object to copy from
}
//_____________________________________________________________________
-AliFMDQADataMakerSim& AliFMDQADataMakerSim::operator = (const AliFMDQADataMakerSim& qadm )
+AliFMDQADataMakerSim&
+AliFMDQADataMakerSim::operator = (const AliFMDQADataMakerSim& )
{
- fSDigitsArray = qadm.fSDigitsArray;
- fDigitsArray = qadm.fDigitsArray;
- fHitsArray = qadm.fHitsArray;
return *this;
}
}
//_____________________________________________________________________
-void AliFMDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task,
- TObjArray * list)
+void AliFMDQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task,
+ TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
+ ResetEventTrigClasses(); // reset triggers list to select all histos
AliLog::Message(5,"FMD: end of detector cycle",
"AliFMDQADataMakerSim","AliFMDQADataMakerSim",
"AliFMDQADataMakerSim::EndOfDetectorCycle",
"AliFMDQADataMakerSim.cxx",83);
- AliQAChecker::Instance()->Run(AliQA::kFMD, task, list) ;
+ AliQAChecker::Instance()->Run(AliQAv1::kFMD, task, list) ;
}
//_____________________________________________________________________
void AliFMDQADataMakerSim::InitSDigits()
{
// create SDigits histograms in SDigits subdir
- TH1I* hADCCounts = new TH1I("hADCCounts","Dist of ADC counts",1024,0,1024);
+ const Bool_t expert = kTRUE ;
+ const Bool_t image = kTRUE ;
+
+ TH1I* hADCCounts = new TH1I("hADCCounts",
+ "Dist of ADC counts;ADC counts;Entries",
+ 1024,0,1024);
hADCCounts->SetXTitle("ADC counts");
- Add2SDigitsList(hADCCounts, 0);
+ Add2SDigitsList(hADCCounts, 0, !expert, image);
+ //
+ ClonePerTrigClass(AliQAv1::kSDIGITS); // this should be the last line
}
//____________________________________________________________________
void AliFMDQADataMakerSim::InitHits()
{
// create Digits histograms in Digits subdir
- TH1F* hEnergyOfHits = new TH1F("hEnergyOfHits","Energy distribution",100,0,3);
+ const Bool_t expert = kTRUE ;
+ const Bool_t image = kTRUE ;
+
+ TH1F* hEnergyOfHits = new TH1F("hEnergyOfHits",
+ "Energy distribution;Energy [MeV];Counts",
+ 100,0,3);
hEnergyOfHits->SetXTitle("Edep");
hEnergyOfHits->SetYTitle("Counts");
- Add2HitsList(hEnergyOfHits, 0);
+ Add2HitsList(hEnergyOfHits, 0, !expert, image);
+ //
+ ClonePerTrigClass(AliQAv1::kHITS); // this should be the last line
}
//_____________________________________________________________________
void AliFMDQADataMakerSim::InitDigits()
{
// create Digits histograms in Digits subdir
- TH1I* hADCCounts = new TH1I("hADCCounts","Dist of ADC counts",1024,0,1024);
+ const Bool_t expert = kTRUE ;
+ const Bool_t image = kTRUE ;
+
+ TH1I* hADCCounts = new TH1I("hADCCounts",
+ "Dist of ADC counts; ADC counts;Entries",
+ 1024,0,1024);
hADCCounts->SetXTitle("ADC counts");
- Add2DigitsList(hADCCounts, 0);
+ Add2DigitsList(hADCCounts, 0, !expert, image);
+ //
+ ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
}
//_____________________________________________________________________
-void AliFMDQADataMakerSim::MakeHits(TClonesArray * hits)
+void AliFMDQADataMakerSim::MakeHits()
{
- TIter next(hits);
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(0) )
+ InitHits() ;
+
+ TIter next(fHitsArray);
AliFMDHit * hit;
- while ((hit = static_cast<AliFMDHit *>(next())))
- GetHitsData(0)->Fill(hit->Edep()/hit->Length()*0.032);
+ while ((hit = static_cast<AliFMDHit *>(next()))) FillHitsData(0,hit->Edep()/hit->Length()*0.032);
+ //
}
//_____________________________________________________________________
void AliFMDQADataMakerSim::MakeHits(TTree * hitTree)
{
// make QA data from Hit Tree
-
- fHitsArray.Clear();
+ //
+ // Parameters:
+ // hitTree Hits container
+ //
+ if (!fHitsArray)
+ fHitsArray = new TClonesArray("AliFMDHit", 1000) ;
+ fHitsArray->Clear() ;
TBranch * branch = hitTree->GetBranch("FMD") ;
if (!branch) {
AliWarning("FMD branch in Hit Tree not found") ;
return;
}
-
- TClonesArray* hitsAddress = &fHitsArray;
-
- branch->SetAddress(&hitsAddress) ;
-
+
+ branch->SetAddress(&fHitsArray) ;
+ //
for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) {
branch->GetEntry(ientry);
- MakeHits(hitsAddress); //tmp);
- }
-
+ MakeHits(); //tmp);
+ fHitsArray->Clear() ;
+ }
+ //
+ IncEvCountCycleHits();
+ IncEvCountTotalHits();
+ //
}
//_____________________________________________________________________
-void AliFMDQADataMakerSim::MakeDigits(TClonesArray * digits)
+void AliFMDQADataMakerSim::MakeDigits()
{
// makes data from Digits
- if(!digits) return;
-
- for(Int_t i = 0 ; i < digits->GetEntriesFast() ; i++) {
+ //
+ // Parameters:
+ // none
+ if(!fDigitsArray) return;
+
+ for(Int_t i = 0 ; i < fDigitsArray->GetEntriesFast() ; i++) {
//Raw ADC counts
- AliFMDDigit* digit = static_cast<AliFMDDigit*>(digits->At(i));
- GetDigitsData(0)->Fill(digit->Counts());
+ AliFMDDigit* digit = static_cast<AliFMDDigit*>(fDigitsArray->At(i));
+ FillDigitsData(0,digit->Counts());
}
+ //
}
//_____________________________________________________________________
void AliFMDQADataMakerSim::MakeDigits(TTree * digitTree)
{
+ // Make data from digits.
+ //
+ // Parameters:
+ // digitTree Tree holding digits.
+ // RS: counters are incremented in MakeDigits()
+
+ if (!fDigitsArray)
+ fDigitsArray = new TClonesArray("AliFMDDigit", 1000) ;
+ fDigitsArray->Clear();
- fDigitsArray.Clear();
TBranch * branch = digitTree->GetBranch("FMD") ;
if (!branch) {
AliWarning("FMD branch in Digit Tree not found") ;
return;
}
- TClonesArray* digitAddress = &fDigitsArray;
- branch->SetAddress(&digitAddress) ;
+ branch->SetAddress(&fDigitsArray) ;
+
+ if (fDigitsArray) fDigitsArray->Clear();
+
branch->GetEntry(0) ;
- MakeDigits(digitAddress) ;
+ MakeDigits() ;
+ //
+ IncEvCountCycleDigits();
+ IncEvCountTotalDigits();
+ //
}
//_____________________________________________________________________
-void AliFMDQADataMakerSim::MakeSDigits(TClonesArray * sdigits)
+void AliFMDQADataMakerSim::MakeSDigits()
{
// makes data from Digits
- if(!sdigits) return;
+ //
+ // Parameters:
+ // none
+ if(!fSDigitsArray) return;
- for(Int_t i = 0 ; i < sdigits->GetEntriesFast() ; i++) {
+ for(Int_t i = 0 ; i < fSDigitsArray->GetEntriesFast() ; i++) {
//Raw ADC counts
- AliFMDSDigit* sdigit = static_cast<AliFMDSDigit*>(sdigits->At(i));
- GetSDigitsData(0)->Fill(sdigit->Counts());
+ AliFMDSDigit* sdigit = static_cast<AliFMDSDigit*>(fSDigitsArray->At(i));
+ FillSDigitsData(0,sdigit->Counts());
}
+ //
}
//_____________________________________________________________________
void AliFMDQADataMakerSim::MakeSDigits(TTree * sdigitTree)
{
-
- fSDigitsArray.Clear();
+ // Make data from digits.
+ //
+ // Parameters:
+ // digitTree Tree holding digits.
+ //
+ if (!fSDigitsArray)
+ fSDigitsArray = new TClonesArray("AliFMDSDigit", 1000) ;
+ fSDigitsArray->Clear() ;
+
TBranch * branch = sdigitTree->GetBranch("FMD") ;
if (!branch) {
AliWarning("FMD branch in SDigit Tree not found") ;
return;
}
- TClonesArray* sdigitAddress = &fSDigitsArray;
- branch->SetAddress(&sdigitAddress) ;
+ branch->SetAddress(&fSDigitsArray) ;
branch->GetEntry(0) ;
- MakeSDigits(sdigitAddress) ;
+ MakeSDigits() ;
+ //
+ IncEvCountCycleSDigits();
+ IncEvCountTotalSDigits();
+ //
}
//_____________________________________________________________________
void AliFMDQADataMakerSim::StartOfDetectorCycle()
{
-
+ // Does
+ // not
+ // do
+ // anything
}
//_____________________________________________________________________
//