library: libTree #include "TEventList.h" |
TEventList
class description - source file - inheritance tree (.pdf)
public:
TEventList()
TEventList(const char* name, const char* title = "", Int_t initsize = 0, Int_t delta = 0)
TEventList(const TEventList& list)
virtual ~TEventList()
virtual void Add(const TEventList* list)
static TClass* Class()
virtual void Clear(Option_t* option = "")
virtual Bool_t Contains(Long64_t entry)
virtual void Enter(Long64_t entry)
TDirectory* GetDirectory() const
virtual Long64_t GetEntry(Int_t index) const
virtual Int_t GetIndex(Long64_t entry) const
virtual Long64_t* GetList() const
virtual Int_t GetN() const
virtual Bool_t GetReapplyCut() const
virtual Int_t GetSize() const
virtual void Intersect(const TEventList* list)
virtual TClass* IsA() const
virtual Int_t Merge(TCollection* list)
TEventList& operator=(const TEventList& list)
virtual void Print(Option_t* option = "") const
virtual void Reset(Option_t* option = "")
virtual void Resize(Int_t delta = 0)
virtual void SetDelta(Int_t delta = 100)
virtual void SetDirectory(TDirectory* dir)
virtual void SetName(const char* name)
virtual void SetReapplyCut(Bool_t apply = kFALSE)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Sort()
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
virtual void Subtract(const TEventList* list)
protected:
Int_t fN Number of elements in the list
Int_t fSize Size of array
Int_t fDelta Increment size
Bool_t fReapply If true, TTree::Draw will 'reapply' the original cut
Long64_t* fList [fN]Array of elements
TDirectory* fDirectory ! Pointer to directory holding this tree
A TEventList object is a list of selected events (entries) in a TTree
A TEventList is automatically generated by TTree::Draw: example
tree->Draw(">>elist1","x<0 && y> 0");
In this example, a TEventList object named "elist1" will be
generated. (Previous contents are overwritten).
tree->Draw(">>+elist1","x<0 && y> 0");
In this example, selected entries are added to the list.
The TEventList object is added to the list of objects in the current
directory.
Use TTree:SetEventList(TEventList *list) to inform TTree that you
want to use the list as input. The following code gets a pointer to
the TEventList object created in the above commands:
TEventList *list = (TEventList*)gDirectory->Get("elist1");
Use function Enter to enter an element in the list
The function Add may be used to merge two lists.
The function Subtract may be used to subtract two lists.
The function Reset may be used to reset a list.
Use TEventList::Print(option) to print the contents.
(option "all" prints all the list entries).
Operators + and - correspond to functions Add and Subtract.
A TEventList object can be saved on a file via the Write function.
TEventList(): TNamed()
*-*-*-*-*-*Default constructor for a EventList*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ==================================
TEventList(const char *name, const char *title, Int_t initsize, Int_t delta)
:TNamed(name,title), fReapply(kFALSE)
*-*-*-*-*-*-*-*-*-*-*-*-*Create a EventList*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* =================
This Eventlist is added to the list of objects in current directory
TEventList(const TEventList &list) : TNamed(list)
*-*-*-*-*-*-*-*-*-*-*-*-*Copy constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ================
~TEventList()
*-*-*-*-*-*Default destructor for a EventList*-*-*-*-*-*-*-*-*-*-*-*
*-* =================================
void Add(const TEventList *alist)
Merge contents of alist with this list.
Both alist and this list are assumed to be sorted prior to this call
Bool_t Contains(Long64_t entry)
Return TRUE if list contains entry.
void Enter(Long64_t entry)
Enter element entry into the list
Long64_t GetEntry(Int_t index) const
Return value of entry at index in the list.
Return -1 if index is not in the list range
Int_t GetIndex(Long64_t entry) const
Return index in the list of element with value entry
array is supposed to be sorted prior to this call.
If match is found, function returns position of element.
If no match found, function returns -1.
void Intersect(const TEventList *alist)
Remove elements from this list that are NOT present in alist.
Int_t Merge(TCollection *list)
Merge entries in all the TEventList in the collection in this event list
void Print(Option_t *option) const
Print contents of this list
void Reset(Option_t *)
Reset number of entries in event list
void Resize(Int_t delta)
Resize list by delta entries
void SetDirectory(TDirectory *dir)
Remove reference to this EventList from current directory and add
reference to new directory dir. dir can be 0 in which case the list
does not belong to any directory.
void SetName(const char *name)
Change the name of this TEventList
void Sort()
Sort list entries in increasing order
void Streamer(TBuffer &b)
Stream an object of class TEventList.
void Subtract(const TEventList *alist)
Remove elements from this list that are present in alist.
Inline Functions
void Clear(Option_t* option = "")
TDirectory* GetDirectory() const
Long64_t* GetList() const
Int_t GetN() const
Bool_t GetReapplyCut() const
Int_t GetSize() const
void SetDelta(Int_t delta = 100)
void SetReapplyCut(Bool_t apply = kFALSE)
TEventList& operator=(const TEventList& list)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void StreamerNVirtual(TBuffer& b)
Author: Rene Brun 11/02/97
Last update: root/tree:$Name: $:$Id: TEventList.cxx,v 1.13 2005/06/03 07:37:06 brun 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.