TSelector
class description - header file - source file - inheritance tree (.pdf)
public:
TSelector()
TSelector(const TSelector&)
virtual ~TSelector()
virtual void Abort(const char* why, TSelector::EAbort what = kAbortProcess)
virtual void Begin(TTree*)
static TClass* Class()
virtual TSelector::EAbort GetAbort() const
virtual Int_t GetEntry(Long64_t, Int_t = 0)
virtual const char* GetOption() const
virtual TList* GetOutputList() const
static TSelector* GetSelector(const char* filename)
virtual Int_t GetStatus() const
virtual void Init(TTree*)
virtual TClass* IsA() const
static Bool_t IsStandardDraw(const char* selec)
virtual Bool_t Notify()
TSelector& operator=(const TSelector&)
virtual Bool_t Process(Long64_t)
virtual Bool_t ProcessCut(Long64_t)
virtual void ProcessFill(Long64_t)
virtual void SetInputList(TList* input)
virtual void SetObject(TObject* obj)
virtual void SetOption(const char* option)
virtual void SetStatus(Int_t status)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void SlaveBegin(TTree*)
virtual void SlaveTerminate()
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
virtual void Terminate()
virtual int Version() const
protected:
Int_t fStatus selector status
TSelector::EAbort fAbort abort status
TString fOption option given to TTree::Process
TObject* fObject current object if processing object (vs. TTree)
TList* fInput list of objects available during processing (on PROOF)
TSelectorList* fOutput list of objects created during processing (on PROOF)
public:
static const TSelector::EAbort kContinue
static const TSelector::EAbort kAbortProcess
static const TSelector::EAbort kAbortFile
A TSelector object is used by the TTree::Draw, TTree::Scan,
TTree::Loop, TTree::Process to navigate in a TTree and make
selections. It contains the following main methods:
void TSelector::Init(TTree *t). Called every time a new TTree is
attached.
void TSelector::Begin(). This method is called before looping on the
events in the Tree. The user can create his histograms in this
function. When using PROOF Begin() is called on the client only.
Histogram creation should preferable be done in SlaveBegin() in
that case.
void TSelector::SlaveBegin(). This method is called on each PROOF
worker node. The user can create his histograms in this method.
In local mode this method is called on the client too.
Bool_t TSelector::Notify(). This method is called at the first entry
of a new file in a chain.
Bool_t TSelector::Process(Long64_t entry). This method is called
to process an event. It is the user's responsability to read
the corresponding entry in memory (may be just a partial read).
Once the entry is in memory one can apply a selection and if the
event is selected histograms can be filled. Processing stops
when this function returns kFALSE. This function combines the
next two functions in one, avoiding to have to maintain state
in the class to communicate between these two funtions.
See WARNING below about entry.
This method is used by PROOF.
Bool_t TSelector::ProcessCut(Long64_t entry). This method is called
before processing entry. It is the user's responsability to read
the corresponding entry in memory (may be just a partial read).
The function returns kTRUE if the entry must be processed,
kFALSE otherwise. This method is obsolete, use Process().
See WARNING below about entry.
void TSelector::ProcessFill(Long64_t entry). This method is called
for all selected events. User fills histograms in this function.
This method is obsolete, use Process().
See WARNING below about entry.
void TSelector::SlaveTerminate(). This method is called at the end of
the loop on all PROOF worker nodes. In local mode this method is
called on the client too.
void TSelector::Terminate(). This method is called at the end of
the loop on all events. When using PROOF Terminate() is call on
the client only. Typically one performs the fits on the produced
histograms or write the histograms to file in this method.
WARNING when a selector is used with a TChain:
in the Process, ProcessCut, ProcessFill function, you must use
the pointer to the current Tree to call GetEntry(entry).
entry is always the local entry number in the current tree.
Assuming that fChain is the pointer to the TChain being processed,
use fChain->GetTree()->GetEntry(entry);
TSelector * GetSelector(const char *filename)
The code in filename is loaded (interpreted or compiled, see below),
filename must contain a valid class implementation derived from TSelector.
If filename is of the form file.C, the file will be interpreted.
If filename is of the form file.C++, the file file.C will be compiled
and dynamically loaded. The corresponding binary file and shared
library will be deleted at the end of the function.
If filename is of the form file.C+, the file file.C will be compiled
and dynamically loaded. At next call, if file.C is older than file.o
and file.so, the file.C is not compiled, only file.so is loaded.
The static function returns a pointer to a TSelector object
Author: Rene Brun 05/02/97
Last update: root/tree:$Name: $:$Id: TSelector.cxx,v 1.26 2006/07/04 23:35:37 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.