TEventList


class description - source file - inheritance tree

class TEventList : public TNamed


    public:
TEventList TEventList() TEventList TEventList(const char* name, const char* title, Int_t initsize = 0, Int_t delta = 0) TEventList TEventList(const TEventList& list) virtual void ~TEventList() virtual void Add(const TEventList* list) static TClass* Class() virtual Bool_t Contains(Int_t entry) virtual void Enter(Int_t entry) TDirectory* GetDirectory() const virtual Int_t GetEntry(Int_t index) const virtual Int_t GetIndex(Int_t entry) const virtual Int_t* GetList() const virtual Int_t GetN() const virtual Int_t GetSize() const virtual TClass* IsA() const 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 ShowMembers(TMemberInspector& insp, char* parent) virtual void Sort() virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void Subtract(const TEventList* list)

Data Members

protected:
Int_t fN Number of elements in the list Int_t fSize Size of array Int_t fDelta Increment size Int_t* fList [fN]Array of elements TDirectory* fDirectory ! Pointer to directory holding this tree

Class Description

                                                                      
 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)
*-*-*-*-*-*-*-*-*-*-*-*-*Create a EventList*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                      =================

  This Eventlist is added to the list of objects in current directory

TEventList(const TEventList &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(Int_t entry)
          Return TRUE if list contains entry.

void Enter(Int_t entry)
          Enter element entry into the list

Int_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(Int_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 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


        TDirectory* GetDirectory() const
             Int_t* GetList() const
              Int_t GetN() const
              Int_t GetSize() const
               void SetDelta(Int_t delta = 100)
        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.5 2000/12/13 15:13:56 brun 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.