/* History of cvs commits:
*
* $Log$
- * Revision 1.51 2007/08/07 14:12:03 kharlov
- * Quality assurance added (Yves Schutz)
+ * Revision 1.56 2007/10/19 18:04:29 schutz
+ * The standalone QA data maker is called from AliSimulation and AliReconstruction outside the event loop; i.e. re-reading the data. The QA data making in the event loop has been commented out.
*
- * Revision 1.50 2006/08/28 10:01:56 kharlov
- * Effective C++ warnings fixed (Timur Pocheptsov)
+ * Revision 1.55 2007/10/14 21:08:10 schutz
+ * Introduced the checking of QA results from previous step before entering the event loop
*
- * Revision 1.49 2006/05/10 06:42:53 kharlov
- * Remove redundant loop over primaries
+ * Revision 1.54 2007/10/10 09:05:10 schutz
+ * Changing name QualAss to QA
*
- * Revision 1.48 2006/04/22 10:30:17 hristov
- * Add fEnergy to AliPHOSDigit and operate with EMC amplitude in energy units (Yu.Kharlov)
+ * Revision 1.53 2007/09/30 17:08:20 schutz
+ * Introducing the notion of QA data acquisition cycle (needed by online)
*
- * Revision 1.47 2005/05/28 14:19:04 schutz
- * Compilation warnings fixed by T.P.
+ * Revision 1.52 2007/09/26 14:22:18 cvetan
+ * Important changes to the reconstructor classes. Complete elimination of the run-loaders, which are now steered only from AliReconstruction. Removal of the corresponding Reconstruct() and FillESD() methods.
*
+ * Revision 1.51 2007/08/07 14:12:03 kharlov
+ * Quality assurance added (Yves Schutz)
*/
//_________________________________________________________________________
// deb all - print # and list of produced SDigits
// tim - print benchmarking information
//
-//*-- Author : Dmitri Peressounko (SUBATECH & KI)
+//-- Author : Dmitri Peressounko (SUBATECH & KI)
//////////////////////////////////////////////////////////////////////////////
#include "AliPHOSGetter.h"
#include "AliPHOSHit.h"
#include "AliPHOSSDigitizer.h"
-#include "AliPHOSQualAssDataMaker.h"
ClassImp(AliPHOSSDigitizer)
//____________________________________________________________________________
AliPHOSSDigitizer::AliPHOSSDigitizer() :
TTask("",""),
- fA(0.f), fB(0.f),
fPrimThreshold(0.f),
fDefaultInit(kTRUE),
fEventFolderName(""),
fInit(kFALSE),
fSDigitsInRun(0),
fFirstEvent(0),
- fLastEvent(0),
- fQADM (0x0)
+ fLastEvent(0)
{
// ctor
// Intialize the quality assurance data maker
AliPHOSSDigitizer::AliPHOSSDigitizer(const char * alirunFileName,
const char * eventFolderName):
TTask("PHOS"+AliConfig::Instance()->GetSDigitizerTaskName(), alirunFileName),
- fA(0.f), fB(0.f),
fPrimThreshold(0.f),
fDefaultInit(kFALSE),
fEventFolderName(eventFolderName),
fInit(kFALSE),
fSDigitsInRun(0),
fFirstEvent(0),
- fLastEvent(0),
- fQADM (0x0)
+ fLastEvent(0)
{
// ctor
InitParameters() ;
Init();
fDefaultInit = kFALSE ;
- // Intialize the quality assurance data maker
- GetQualAssDataMaker()->Init(AliQualAss::kHITS) ;
- GetQualAssDataMaker()->Init(AliQualAss::kSDIGITS) ;
}
//____________________________________________________________________________
AliPHOSSDigitizer::AliPHOSSDigitizer(const AliPHOSSDigitizer& sd) :
TTask(sd.GetName(), sd.GetTitle()),
- fA(sd.fA), fB(sd.fB),
fPrimThreshold(sd.fPrimThreshold),
fDefaultInit(kFALSE),
fEventFolderName(sd.fEventFolderName),
fInit(kFALSE),
fSDigitsInRun(sd.fSDigitsInRun),
fFirstEvent(sd.fFirstEvent),
- fLastEvent(sd.fLastEvent),
- fQADM (sd.fQADM)
+ fLastEvent(sd.fLastEvent)
{
// cpy ctor
- // Intialize the quality assurance data maker
- GetQualAssDataMaker()->Init(AliQualAss::kHITS) ;
- GetQualAssDataMaker()->Init(AliQualAss::kSDIGITS) ;
}
-
//_____________________________________________________________________________
AliPHOSSDigitizer& AliPHOSSDigitizer::operator = (const AliPHOSSDigitizer& qa)
{
//____________________________________________________________________________
AliPHOSSDigitizer::~AliPHOSSDigitizer() {
//dtor
- // AliPHOSGetter * gime =
- // AliPHOSGetter::Instance(GetTitle(),fEventFolderName.Data());
AliPHOSGetter * gime =
AliPHOSGetter::Instance();
gime->PhosLoader()->CleanSDigitizer();
- delete fQADM ;
}
//____________________________________________________________________________
gime->PostSDigitizer(this);
gime->PhosLoader()->GetSDigitsDataLoader()->GetBaseTaskLoader()->SetDoNotReload(kTRUE);
- fQADM = new AliPHOSQualAssDataMaker() ;
-
}
//____________________________________________________________________________
void AliPHOSSDigitizer::InitParameters()
{
// initializes the parameters for digitization
- fA = 0;
- fB = 10000000.;
fPrimThreshold = 0.01 ;
fSDigitsInRun = 0 ;
}
if(strstr(option,"tim"))
gBenchmark->Start("PHOSSDigitizer");
+/*
+ // check the QA result for RAWS
+ AliQA * qa = AliQA::Instance(AliQA::kPHOS) ;
+ if ( qa->IsSet(AliQA::kPHOS, AliQA::kRAW, AliQA::kFATAL)) {
+ AliFatal("QA status in RAW was Fatal") ;
+ } else if ( qa->IsSet(AliQA::kPHOS, AliQA::kRAW, AliQA::kERROR)) {
+ AliError("QA status in RAW was Error") ;
+ } else if ( qa->IsSet(AliQA::kPHOS, AliQA::kRAW, AliQA::kWARNING) ) {
+ AliWarning("QA status in RAW was Warning") ;
+ } else if ( qa->IsSet(AliQA::kPHOS, AliQA::kRAW, AliQA::kINFO) ) {
+ AliInfo("QA status in RAW was Info") ;
+ }
+*/
AliPHOSGetter * gime = AliPHOSGetter::Instance() ;
//switch off reloading of this task while getting event
Int_t ievent, i;
- //AliMemoryWatcher memwatcher;
-
for (ievent = fFirstEvent; ievent <= fLastEvent; ievent++) {
gime->Event(ievent,"H") ;
TTree * treeS = gime->TreeS();
digit->SetIndexInList(i) ;
}
- // make Quality Assurance data
-
- GetQualAssDataMaker()->Exec(AliQualAss::kHITS, hits) ;
- GetQualAssDataMaker()->Exec(AliQualAss::kSDIGITS, sdigits) ;
-
-
+// // make Quality Assurance data
+//
+// if (GetQADataMaker()->IsCycleDone() ) {
+// GetQADataMaker()->EndOfCycle(AliQA::kHITS) ;
+// GetQADataMaker()->EndOfCycle(AliQA::kSDIGITS) ;
+// GetQADataMaker()->StartOfCycle(AliQA::kHITS) ;
+// GetQADataMaker()->StartOfCycle(AliQA::kSDIGITS, kTRUE) ;
+// }
+// GetQADataMaker()->Exec(AliQA::kHITS, hits) ;
+// GetQADataMaker()->Exec(AliQA::kSDIGITS, sdigits) ;
+// GetQADataMaker()->Increment() ;
+
//Now write SDigits
if(strstr(option,"deb"))
PrintSDigits(option) ;
- //memwatcher.Watch(ievent);
}// event loop
- //Write the quality assurance data
- GetQualAssDataMaker()->Finish(AliQualAss::kHITS) ;
- GetQualAssDataMaker()->Finish(AliQualAss::kSDIGITS) ;
+// //Write the quality assurance data
+// GetQADataMaker()->EndOfCycle(AliQA::kHITS) ;
+// GetQADataMaker()->EndOfCycle(AliQA::kSDIGITS) ;
+// GetQADataMaker()->Finish() ;
Unload();
gBenchmark->GetCpuTime("PHOSSDigitizer"), gBenchmark->GetCpuTime("PHOSSDigitizer")/nEvents) ;
}
- //TFile f("out.root","RECREATE");
- //memwatcher.WriteToFile();
- //f.Close();
}
//__________________________________________________________________
// Prints parameters of SDigitizer
Info("Print", "\n------------------- %s -------------", GetName() ) ;
printf(" Writing SDigits to branch with title %s\n", fEventFolderName.Data()) ;
- printf(" with digitization parameters A = %f\n", fA) ;
- printf(" B = %f\n", fB) ;
printf(" Threshold for Primary assignment= %f\n", fPrimThreshold) ;
printf("---------------------------------------------------\n") ;
// Equal operator.
// SDititizers are equal if their pedestal, slope and threshold are equal
- if( (fA==sd.fA)&&(fB==sd.fB)&&(fPrimThreshold==sd.fPrimThreshold))
+ if(fPrimThreshold==sd.fPrimThreshold)
return kTRUE ;
else
return kFALSE ;
AliPHOSGetter * gime = AliPHOSGetter::Instance() ;
+
+ // Get PHOS Geometry object
+ AliPHOSGeometry *geom;
+ if (!(geom = AliPHOSGeometry::GetInstance()))
+ geom = AliPHOSGeometry::GetInstance("IHEP","");
+
const TClonesArray * sdigits = gime->SDigits() ;
Info( "\nPrintSDigits", "event # %d %d sdigits", gAlice->GetEvNumber(), sdigits->GetEntriesFast() ) ;
//loop over digits
AliPHOSDigit * digit;
printf("\nEMC sdigits\n") ;
- Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
+ Int_t maxEmc = geom->GetNModules() * geom->GetNCristalsInModule() ;
Int_t index ;
for (index = 0 ; (index < sdigits->GetEntriesFast()) &&
((dynamic_cast<AliPHOSDigit *> (sdigits->At(index)))->GetId() <= maxEmc) ; index++) {
//loop over CPV digits
AliPHOSDigit * digit;
printf("\nCPV sdigits\n") ;
- Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
+ Int_t maxEmc = geom->GetNModules() * geom->GetNCristalsInModule() ;
Int_t index ;
for (index = 0 ; index < sdigits->GetEntriesFast(); index++) {
digit = dynamic_cast<AliPHOSDigit *>( sdigits->At(index) ) ;