TSelector
class description - source file - inheritance tree
public:
TSelector TSelector()
TSelector TSelector(const TSelector&)
virtual void ~TSelector()
virtual void Begin(TTree*)
static TClass* Class()
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
virtual Bool_t Notify()
virtual Bool_t Process(int)
virtual Bool_t ProcessCut(int)
virtual void ProcessFill(int)
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 Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
virtual void Terminate()
protected:
Int_t fStatus Selector 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)
TList* fOutput list of objects created during processing (on PROOF)
See also
-
TSelectorCint, TSelectorDraw
A TSelector object is used by the TTree::Draw, TTree::Scan,
TTree::Loop, TTree::Process to navigate in a TTree and make
selections.
The following members functions are called by the TTree functions.
Init: Attach a new TTree during the loop
Begin: called everytime a loop on the tree(s) starts.
a convenient place to create your histograms.
Notify(): This function is called at the first entry of a new
tree in a chain.
ProcessCut: called at the beginning of each entry to return a flag
true if the entry must be analyzed.
ProcessFill: called in the entry loop for all entries accepted
by Select.
Terminate: called at the end of a loop on a TTree.
a convenient place to draw/fit your histograms.
TSelector() : TObject()
Default selector ctor.
~TSelector()
Selector destructor.
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,
where TSelector has the following member functions:
void TSelector::Init(TTree *t). Called every time a new TTree is attached.
void TSelector::Begin(). This function is called before looping on the
events in the Tree. The user can create his histograms in this function.
Bool_t TSelector::Notify(). This function is called at the first entry
of a new file in a chain.
Bool_t TSelector::Process(Int_t entry). This function 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.
This method is used by PROOF.
Bool_t TSelector::ProcessCut(Int_t entry). This function 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.
void TSelector::ProcessFill(Int_t entry). This function is called for
all selected events. User fills histograms in this function.
void TSelector::Terminate(). This function is called at the end of
the loop on all events.
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
Inline Functions
void Init(TTree*)
void Begin(TTree*)
Bool_t Notify()
const char* GetOption() const
Int_t GetStatus() const
Bool_t ProcessCut(int)
void ProcessFill(int)
Bool_t Process(int)
void SetOption(const char* option)
void SetObject(TObject* obj)
void SetInputList(TList* input)
void SetStatus(Int_t status)
TList* GetOutputList() const
void Terminate()
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
TSelector TSelector(const TSelector&)
Author: Rene Brun 05/02/97
Last update: root/treeplayer:$Name: $:$Id: TSelector.cxx,v 1.13 2003/03/18 14:29:59 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - 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.