AliPhysics  2c6b7ad (2c6b7ad)
AliBaseESDTask Class Referenceabstract

#include <AliBaseESDTask.h>

Inheritance diagram for AliBaseESDTask:

Public Member Functions

 AliBaseESDTask ()
 
 AliBaseESDTask (const char *name, const char *title, AliCorrectionManagerBase *manager)
 
virtual Bool_t Connect (const char *sumFile=0, const char *resFile=0)
 
virtual Bool_t Connect (const char *sumFile, const char *resFile, Bool_t old)
 
virtual Bool_t Setup ()
 
virtual Bool_t Book ()=0
 
virtual void PreCorrections (const AliESDEvent *esd)
 
virtual Bool_t PreData (const TAxis &vertex, const TAxis &eta)
 
virtual Bool_t PreEvent ()
 
virtual Bool_t Event (AliESDEvent &esd)=0
 
virtual Bool_t PostEvent ()
 
virtual Bool_t Finalize ()
 
Utility methods
virtual void Print (Option_t *option="") const
 
virtual void SetDebug (Int_t dbg)
 
virtual void SetDebugLevel (Int_t dbg)
 
void SetIPzMethod (const char *str)
 
Access sub-components
virtual Bool_t Configure (const char *macro="-default-")
 
virtual AliFMDEventInspectorGetEventInspector ()=0
 
virtual const AliFMDEventInspectorGetEventInspector () const =0
 

Protected Member Functions

 AliBaseESDTask (const AliBaseESDTask &o)
 
AliBaseESDTaskoperator= (const AliBaseESDTask &o)
 
virtual Bool_t IsMC () const
 
virtual TAxisDefaultEtaAxis () const
 
virtual TAxisDefaultVertexAxis () const
 
virtual AliCorrectionManagerBaseGetManager () const
 
virtual AliCorrectionManagerBaseGetManager ()
 
virtual void CreateBranches (AliAODHandler *)
 
virtual void MarkEventForStore () const
 
virtual Bool_t CheckCorrections (UInt_t what) const
 
virtual Bool_t ReadCorrections (const TAxis *&pe, const TAxis *&pv, Bool_t mc=false, Bool_t sat=false)
 
virtual AliESDEventGetESDEvent ()
 
virtual Bool_t StoreTrainName (Int_t no)
 
virtual const char * DefaultConfig () const
 
Task interface methods
void LocalInit ()
 
void UserCreateOutputObjects ()
 
void UserExec (Option_t *option)
 
void Terminate (Option_t *option)
 

Protected Attributes

Bool_t fFirstEvent
 
TListfList
 
TListfResults
 
UInt_t fNeededCorrections
 
UInt_t fExtraCorrections
 
Bool_t fCloneList
 

Private Attributes

AliCorrectionManagerBasefCorrManager
 

Detailed Description

Base class for tasks that analyse the FMD ESD. This wraps a single-event analysis task, and provides a modified interface to implement for the sub-classes:

class MyFMDESDTask : public AliBaseESDTask
{
public:
MyFMDESDTask() : AliBaseESDTask() {}
MyFMDESDTask(const char* name) : AliBaseESDTask(name)
{
}
AliFMDEventInspector& GetEventInspector() { return fInspector; }
const AliFMDEventInspector& GetEventInspector() const{ return fInspector; }
{
fSharingFilter.CreateUserObject(fList);
return true;
}
Bool_t PreData(const TAxis& vertex, const TAxis& eta)
{
fSharingFilter.SetupForData(eta);
return true;
}
Bool_t PreEvent() { fESDFMD.Clear(); return true; }
Bool_t PostEvent() { return true; }
{
Bool_t lowFlux = kFALSE;
UInt_t triggers = 0;
UShort_t ivz = 0;
TVector3 ip;
Double_t cent = -1;
UShort_t nClusters = 0;
UInt_t found = fEventInspector.Process(esd, triggers, lowFlux,
ivz, ip, cent, nClusters);
if (found & AliFMDEventInspector::kNoEvent) return false;
if (found & AliFMDEventInspector::kNoTriggers) return false;
if (found & AliFMDEventInspector::kNoSPD) return;
if (found & AliFMDEventInspector::kNoFMD) return;
if (found & AliFMDEventInspector::kNoVertex) return;
if (triggers & AliAODForwardMult::kPileUp) return;
if (found & AliFMDEventInspector::kBadVertex) return;
Bool_t ret = fSharingFilter.Filter(esd, lowFlux, fESDFMD, ip.Z());
return ret;
}
{
GetSharingFilter().Terminate(fList,fResults,Int_t(nTr));
return true;
}
protected:
AliFMDEventInsepctor fInspector;
AliFMDSharingFilter fSharingFilter;
AliESDFMD fESDFMD;
};

Definition at line 78 of file AliBaseESDTask.h.

Constructor & Destructor Documentation

AliBaseESDTask::AliBaseESDTask ( )

Default (I/O) constructor - do not use directly

Definition at line 20 of file AliBaseESDTask.cxx.

Referenced by SetDebugLevel().

AliBaseESDTask::AliBaseESDTask ( const char *  name,
const char *  title,
AliCorrectionManagerBase manager 
)

User constructor

Parameters
nameName of the task
titleClass name used in configuration script
managerCorrection manager

Definition at line 32 of file AliBaseESDTask.cxx.

AliBaseESDTask::AliBaseESDTask ( const AliBaseESDTask o)
protected

Copy constructor - left undefined

Parameters
oObject to copy from

Member Function Documentation

virtual Bool_t AliBaseESDTask::Book ( )
pure virtual

Book output objects. Derived class should define this to book output objects on the processing output list fList before the actual event processing. This is called on the master and on each slave.

If this member function returns false, the execution is stopped with a fatal signal.

Returns
true on success.

Implemented in AliForwardMultiplicityBase, AliFMDMCHitEnergyFitterTask, AliFMDMCTrackInspectorTask, AliForwardMCMultiplicityTask, AliFMDEnergyFitterTask, AliForwardQATask, ELossTimeTask, AliBaseMCCorrectionsTask, AliCentralMultiplicityTask, and AliCentralMCMultiplicityTask.

Referenced by Setup(), and UserCreateOutputObjects().

Bool_t AliBaseESDTask::CheckCorrections ( UInt_t  what) const
protectedvirtual

Check if all needed corrections are there and accounted for. If not, do a Fatal exit

Parameters
whatWhich corrections is needed
Returns
true if all present, false otherwise

Definition at line 319 of file AliBaseESDTask.cxx.

Referenced by CreateBranches(), and ReadCorrections().

Bool_t AliBaseESDTask::Configure ( const char *  macro = "-default-")
virtual

Configure this task via a macro

Parameters
macroMacro to configure va
Returns
true on success, false otherwise

Definition at line 156 of file AliBaseESDTask.cxx.

Referenced by AddTaskCentralMult(), AddTaskFMDELoss(), AddTaskForwardMult(), and SetDebugLevel().

virtual Bool_t AliBaseESDTask::Connect ( const char *  sumFile = 0,
const char *  resFile = 0 
)
inlinevirtual

Add this task to the manager and connect the outputs. If sumFile is null or the empty string, then the sum container is stored in the default output file of the manager. If resFile is null or the empty string, then it is set to resFile if defined, otherwise to the default output file of the manager.

Parameters
sumFileOutput file for sums
resFileOutput file for sums
Returns
true on success

Definition at line 106 of file AliBaseESDTask.h.

Referenced by AddTaskCentralMCCorr(), AddTaskCentralMult(), AddTaskFMDELoss(), AddTaskFMDMCHit(), AddTaskFMDMCTracks(), AddTaskForwardMCCorr(), AddTaskForwardMult(), AddTaskForwardQA(), and ELossTimeTask::Create().

Bool_t AliBaseESDTask::Connect ( const char *  sumFile,
const char *  resFile,
Bool_t  old 
)
virtual

Add this task to the manager and connect the outputs. If sumFile is null or the empty string, then the sum container is stored in the default output file of the manager. If resFile is null or the empty string, then it is set to resFile if defined, otherwise to the default output file of the manager.

Parameters
sumFileOutput file for sums
resFileOutput file for sums
oldUse old names
Returns
true on success

Definition at line 60 of file AliBaseESDTask.cxx.

virtual void AliBaseESDTask::CreateBranches ( AliAODHandler *  )
inlineprotectedvirtual

Create output branches - called from UserCreateOutputObjects

Reimplemented in AliForwardMultiplicityBase, AliForwardMCMultiplicityTask, AliCentralMultiplicityTask, and AliCentralMCMultiplicityTask.

Definition at line 330 of file AliBaseESDTask.h.

Referenced by UserCreateOutputObjects().

virtual const char* AliBaseESDTask::DefaultConfig ( ) const
inlineprotectedvirtual

Get default configuration script name

Returns
Script name

Reimplemented in AliFMDEnergyFitterTask.

Definition at line 378 of file AliBaseESDTask.h.

Referenced by Configure().

TAxis * AliBaseESDTask::DefaultEtaAxis ( ) const
protectedvirtual

Set the default eta axis to use in case we didn't get one from the read-in corretions. Override this if the sub class should go on even without a valid eta axis from the corrections (e.g. QA task)

Returns
null

Reimplemented in AliForwardMultiplicityBase, AliCentralMultiplicityTask, AliBaseMCCorrectionsTask, AliFMDEnergyFitterTask, AliFMDMCHitEnergyFitterTask, AliFMDMCTrackInspectorTask, and AliForwardQATask.

Definition at line 112 of file AliBaseESDTask.cxx.

Referenced by IsMC(), and ReadCorrections().

TAxis * AliBaseESDTask::DefaultVertexAxis ( ) const
protectedvirtual

Set the default eta axis to use in case we didn't get one from the read-in corretions. Override this if the sub class should go on even without a valid eta axis from the corrections (e.g. QA task)

Returns
null

Reimplemented in AliForwardMultiplicityBase, AliCentralMultiplicityTask, AliBaseMCCorrectionsTask, AliFMDEnergyFitterTask, AliFMDMCHitEnergyFitterTask, AliFMDMCTrackInspectorTask, and AliForwardQATask.

Definition at line 119 of file AliBaseESDTask.cxx.

Referenced by IsMC(), and ReadCorrections().

virtual Bool_t AliBaseESDTask::Event ( AliESDEvent esd)
pure virtual
virtual Bool_t AliBaseESDTask::Finalize ( )
inlinevirtual

Do the final analysis on the merged output.

Returns
true on success

Reimplemented in ELossTimeTask, AliForwardMultiplicityBase, AliFMDMCHitEnergyFitterTask, AliFMDMCTrackInspectorTask, AliFMDEnergyFitterTask, AliForwardQATask, AliCentralMultiplicityTask, and AliBaseMCCorrectionsTask.

Definition at line 186 of file AliBaseESDTask.h.

Referenced by Terminate().

AliESDEvent * AliBaseESDTask::GetESDEvent ( )
protectedvirtual

Get the ESD event. IF this is the first event, initialise

Returns
Pointer to ESD event structore

Definition at line 403 of file AliBaseESDTask.cxx.

Referenced by CreateBranches(), and UserExec().

virtual const AliFMDEventInspector& AliBaseESDTask::GetEventInspector ( ) const
pure virtual

Get a reference to the event inspector. User must override this to return proper object

Returns
Reference to the event inspector

Implemented in ELossTimeTask, AliForwardMCMultiplicityTask, AliForwardQATask, AliBaseMCCorrectionsTask, AliForwardMultiplicityTask, AliCentralMultiplicityTask, AliFMDEnergyFitterTask, AliFMDMCHitEnergyFitterTask, and AliFMDMCTrackInspectorTask.

virtual AliCorrectionManagerBase* AliBaseESDTask::GetManager ( ) const
inlineprotectedvirtual

Get the correction mananger. Derived class should overload this to return the proper object.

Returns
Pointer to correction manager

Definition at line 289 of file AliBaseESDTask.h.

Referenced by CheckCorrections(), CompareCentralSecMaps(), Print(), and ReadCorrections().

virtual AliCorrectionManagerBase* AliBaseESDTask::GetManager ( )
inlineprotectedvirtual

Get the correction mananger. Derived class should overload this to return the proper object.

Returns
Pointer to correction manager

Definition at line 296 of file AliBaseESDTask.h.

virtual Bool_t AliBaseESDTask::IsMC ( ) const
inlineprotectedvirtual

Evaluate wether this is for MC. User class can override this

Returns
true if we're to initialize corrections for MC input

Reimplemented in AliForwardQATask.

Definition at line 264 of file AliBaseESDTask.h.

Referenced by GetESDEvent().

void AliBaseESDTask::LocalInit ( )
protected

Initialize the task

Definition at line 186 of file AliBaseESDTask.cxx.

Referenced by GetManager().

void AliBaseESDTask::MarkEventForStore ( ) const
protectedvirtual
AliBaseESDTask& AliBaseESDTask::operator= ( const AliBaseESDTask o)
protected

Assignment operator - left undefined

Parameters
oObject to assign from
Returns
Reference to this object.

Referenced by SetDebugLevel().

virtual Bool_t AliBaseESDTask::PostEvent ( )
inlinevirtual

Called after processing a single event - should not do anything but clear data, etc.

Returns
true on success

Reimplemented in AliForwardMultiplicityBase, and AliForwardMCMultiplicityTask.

Definition at line 180 of file AliBaseESDTask.h.

Referenced by UserExec().

void AliBaseESDTask::PreCorrections ( const AliESDEvent esd)
inlinevirtual

Called on first event before reading corrections. Here, the user class can do additional checking to see if the some (more or less) corrections are needed.

Parameters
esdEvent

Reimplemented in AliFMDEnergyFitterTask, and AliForwardMultiplicityTask.

Definition at line 402 of file AliBaseESDTask.h.

Referenced by GetESDEvent(), and Setup().

Bool_t AliBaseESDTask::PreData ( const TAxis vertex,
const TAxis eta 
)
virtual

Called after reading in the first event. Here we can setup stuff depending on the conditions we're running under.

Returns
true on success. If this returns false, then we turn the task into a zombie and we do no more processing.

Reimplemented in AliForwardMultiplicityBase, AliFMDMCHitEnergyFitterTask, AliFMDMCTrackInspectorTask, AliFMDEnergyFitterTask, AliCentralMultiplicityTask, AliForwardQATask, and AliCentralMCMultiplicityTask.

Definition at line 311 of file AliBaseESDTask.cxx.

Referenced by GetESDEvent(), and Setup().

virtual Bool_t AliBaseESDTask::PreEvent ( )
inlinevirtual

Called before processing a single event - should not do anything but clear data, etc.

Returns
true on success

Reimplemented in AliForwardQATask, AliCentralMultiplicityTask, AliCentralMCMultiplicityTask, AliForwardMCMultiplicityTask, AliForwardMultiplicityTask, and AliForwardMCCorrectionsTask.

Definition at line 165 of file AliBaseESDTask.h.

Referenced by UserExec().

Bool_t AliBaseESDTask::ReadCorrections ( const TAxis *&  pe,
const TAxis *&  pv,
Bool_t  mc = false,
Bool_t  sat = false 
)
protectedvirtual

Read corrections

Parameters
peOn return, the eta axis
pvOn return ,the vertex axis
mcTrue assume MC input
satTrue if we need for satellite interactions too
Returns
true ons succcss

Definition at line 346 of file AliBaseESDTask.cxx.

Referenced by CreateBranches(), and GetESDEvent().

virtual void AliBaseESDTask::SetDebugLevel ( Int_t  dbg)
inlinevirtual

Overload super class method for setting debug level to call our SetDebug member function.

Parameters
dbgDebug level (0: no output, 1: essentials, 3: a whole lot)

Definition at line 209 of file AliBaseESDTask.h.

void AliBaseESDTask::SetIPzMethod ( const char *  str)

Definition at line 138 of file AliBaseESDTask.cxx.

Referenced by SetDebugLevel(), and AliBaseMCCorrectionsTask::SetSatellite().

virtual Bool_t AliBaseESDTask::Setup ( )
inlinevirtual

Called when initializing the train

Reimplemented in AliFMDMCHitEnergyFitterTask, AliFMDMCTrackInspectorTask, AliFMDEnergyFitterTask, and AliForwardQATask.

Definition at line 130 of file AliBaseESDTask.h.

Referenced by LocalInit().

Bool_t AliBaseESDTask::StoreTrainName ( Int_t  no)
protectedvirtual

Store the analysis trains name on the output pointed to by slot number no.

Parameters
noOutput slot

Definition at line 250 of file AliBaseESDTask.cxx.

Referenced by CreateBranches(), and Terminate().

void AliBaseESDTask::Terminate ( Option_t option)
protected

End of job

Parameters
optionNot used

Definition at line 273 of file AliBaseESDTask.cxx.

Referenced by GetManager().

void AliBaseESDTask::UserCreateOutputObjects ( )
protected

Create output objects

Definition at line 195 of file AliBaseESDTask.cxx.

Referenced by GetManager().

void AliBaseESDTask::UserExec ( Option_t option)
protected

Process each event

Parameters
optionNot used

Definition at line 222 of file AliBaseESDTask.cxx.

Referenced by GetManager().

Member Data Documentation

AliCorrectionManagerBase* AliBaseESDTask::fCorrManager
private

A pointer to the corrections manager. This is here to make the corrections manager persistent - that is, when we write the analysis train to a file (as done in PROOF) we should also write down the corrections mananger. This pointer ensures that.

Definition at line 398 of file AliBaseESDTask.h.

Referenced by AliBaseESDTask(), and GetManager().

Bool_t AliBaseESDTask::fFirstEvent
protected

The documentation for this class was generated from the following files: