Common Analysis Framework » QFRAMEWORK » TQAnalysisJob

class TQAnalysisJob: public TNamed


 TQAnalysisJob:

 The TQAnalysisJob class is the base class for every implementation of an analysis running
 on a set of samples. The idea of this class is to have a common class for encapsulating
 analysis implementations. The most important methods for the user it introduces are:

 - initialize(...) called before a new sample is analyzed
 - execute(...) called for every event in the sample
 - finalize() called after the last event in the sample was analyzed

 In this sense, it is similar to a TSelector (Begin(...) <-> initialize(...), Process(...)
 <-> execute(...), Terminate(...) <-> finalize()). One important difference is, that you
 don't need to do your event selection in the implementation of this class, but you rather
 attach an anaylsis job to an instance of TQCompiledCut, which is responsible for the event
 selection on a more general level. You can attach more than one analysis job to a cut and
 you can attach one analysis job to more than one cuts (the analysis job is then cloned for
 each cut it is attached to).

 In your individual implementation of a subclass of this class you may access after init-
 ialization the TQSample or its TTree by using the protected member fields fTree and fSample
 (please take care not to change these pointers).


Function Members (Methods)

 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

public:
virtual~TQAnalysisJob()
voidTObject::AbstractMethod(const char* method) const
intaddToCuts(TList* cuts, const TString& cutname = "*")
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
ULong_tTObject::CheckedHash()
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt,...) const
virtual boolexecute(double weight)
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt,...) const
virtual voidTNamed::FillBuffer(char*& buffer)
boolfinalize()
virtual boolfinalizeSampleFolder(TQSampleFolder* sf)
virtual boolfinalizeSelf()
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual TObjArray*getBranchNames()
virtual TQAnalysisJob*getClone()
TQCut*getCut()
virtual TStringgetDescription()
virtual Option_t*TObject::GetDrawOption() const
static Longptr_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
Bool_tTObject::HasInconsistentHash() const
virtual voidTObject::Info(const char* method, const char* msgfmt,...) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
boolinitialize(TQSample* sample)
virtual boolinitializeSampleFolder(TQSampleFolder* sf)
virtual boolinitializeSelf()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tTObject::IsDestructed() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual boolisPooling() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TQAnalysisJob&operator=(const TQAnalysisJob&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidprint(const TString& options = "")
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidreset()
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidsetCut(TQCut* cut_)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt,...) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TQAnalysisJob()
TQAnalysisJob(const TString& name_)
TQAnalysisJob(const TQAnalysisJob&)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt,...) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
voidcopyTransientMembersFrom(TQAnalysisJob* other)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
virtual Bool_tCheckTObjectHashConsistency() const

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::(anonymous)TObject::kInconsistent
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EDeprecatedStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
TQCut*fCut!
TStringTNamed::fNameobject identifier
TQSample*fSample!
TStringTNamed::fTitleobject title
static TObject::(anonymous)TObject::kOnlyPrepStep

Class Charts

Inheritance Chart:
TObject
TNamed
TQAnalysisJob
TQCutflowAnalysisJob
TQEventlistAnalysisJob
TQGraphMakerAnalysisJob
TQHistoMakerAnalysisJob
TQNTupleDumperAnalysisJob
TQPCAAnalysisJob
TQTHnBaseMakerAnalysisJob

Function documentation

TQAnalysisJob()
 Default constructor of TQAnalysisJob class: a new instance of TQAnalysisJob
 is created and reset. The new instance will be named "TQAnalysisJob".
TQAnalysisJob(const TString& name_)
 Constructor of TQAnalysisJob class: a new instance of TQFolder is created and
 reset. The new instance will be named as specified by the parameter "name_"
void reset()
 Reset this analysis job (this method may be overriden by a specific implemen-
 tation of an analysis job). This method is called after an analysis job was
 cloned
void copyTransientMembersFrom(TQAnalysisJob* other)
 copy the transient data members from another analysis job
TQAnalysisJob * getClone()
 Clone and reset (by calling reset()) this analysis job. This method is called
 when an analysis job is attached to a cut (instance of TQCompiledCut). It
 makes sure that an analysis job running at different cut stages is represented
 by different instances of this class, even if the same instance was passed to
 be attached to different cuts.
bool execute(double weight)
 Execute this analysis job on one event (this method is to be overwritten by a
 specific implementation of an analysis job). This method is called for every
 event of the sample to be analyzed (please note: as in most of the cases an
 analysis job will be attached to a certain cut, this method will only be
 called for events passing its selection criteria). You may indicate success
 or failure by returning true or false respectively
TString getDescription()
 Return a short description of this analysis job
void setCut(TQCut* cut_)
 Set the cut instance this analysis job is attached to. Please note: an
 analysis job has to be attached to exactly one cut instance
TQCompiledCut * getCut()
 Return the cut instance this analysis job is attached to
void print(const TString& options = "")
 print the name of this analysis job
TObjArray * getBranchNames()
 Return all used TTree branches in a TObjArray* of TString*
 The strings should include all used branch names,
 but can also include formulas, number, etc.
bool initialize(TQSample* sample)
 Initialize this analysis job on a sample to be analyzed. Try to get a tree
 token from the sample (by calling TQSample::getTreeToken()) and return true
 if this initialization process succeeded, return false otherwise. Set the
 protected variables fSample (TQSample*, pointing to the sample to be
 analyzed), fTree (TTree*, pointing to the ROOT tree of this sample) to be
 accessible in implementations of a subclass. For a specific implemenation of
 an analysis job, this method has to be called before performing specific
 initialization. In an inherited class implementation do for example

 bool initialize(TQSample * sample) {
 if (TQAnalysisJob::initialize(sample)) {
 /* make your specific initialization here *
 return true;
 } else {
 return false;
 }
 }
bool finalize()
 Finalize this analysis job. Return the tree token and reset the protected
 variables fSample and fTree. For a specific implemenation of an analysis job,
 this method has to be called after performing specific finalization. In an
 inherited class implementation do for example

 bool finalize() {
 /* make your finalization here (e.g write your analysis results) *
 return TQAnalysisJob::finalize();
 }
bool initializeSampleFolder(TQSampleFolder* sf)
 initiallize this algorithm on a sample folder
bool finalizeSampleFolder(TQSampleFolder* sf)
 finalize this algorithm on a sample folder
int addToCuts(TList* cuts, const TString& cutname = "*")
 add this algorithm to one (or more) cuts
~TQAnalysisJob()
 default destructor
bool isPooling() const
 default is no pooling
TQAnalysisJob()
bool initializeSelf()
bool finalizeSelf()