ROOT
6.07/01
Reference Guide
|
A TEventList object is a list of selected events (entries) in a TTree.
A TEventList is automatically generated by TTree::Draw: example
In this example, a TEventList object named "elist1" will be generated. (Previous contents are overwritten).
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:
Definition at line 33 of file TEventList.h.
Public Member Functions | |
TEventList () | |
Pointer to directory holding this tree. More... | |
TEventList (const char *name, const char *title="", Int_t initsize=0, Int_t delta=0) | |
Create a EventList. More... | |
TEventList (const TEventList &list) | |
Copy constructor. More... | |
virtual | ~TEventList () |
Default destructor for a EventList. More... | |
virtual void | Add (const TEventList *list) |
Merge contents of alist with this list. More... | |
virtual void | Clear (Option_t *option="") |
Set name and title to empty strings (""). More... | |
virtual Bool_t | Contains (Long64_t entry) |
Return TRUE if list contains entry. More... | |
virtual Bool_t | ContainsRange (Long64_t entrymin, Long64_t entrymax) |
Return TRUE if list contains entries from entrymin to entrymax included. More... | |
virtual void | DirectoryAutoAdd (TDirectory *) |
Called by TKey and others to automatically add us to a directory when we are read from a file. More... | |
virtual void | Enter (Long64_t entry) |
Enter element entry into the list. More... | |
TDirectory * | GetDirectory () const |
virtual Long64_t | GetEntry (Int_t index) const |
Return value of entry at index in the list. More... | |
virtual 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. More... | |
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) |
Remove elements from this list that are NOT present in alist. More... | |
virtual Int_t | Merge (TCollection *list) |
Merge entries in all the TEventList in the collection in this event list. More... | |
virtual void | Print (Option_t *option="") const |
Print contents of this list. More... | |
virtual void | Reset (Option_t *option="") |
Reset number of entries in event list. More... | |
virtual void | Resize (Int_t delta=0) |
Resize list by delta entries. More... | |
virtual void | SetDelta (Int_t delta=100) |
virtual void | SetDirectory (TDirectory *dir) |
Remove reference to this EventList from current directory and add reference to new directory dir. More... | |
virtual void | SetName (const char *name) |
Change the name of this TEventList. More... | |
virtual void | SetReapplyCut (Bool_t apply=kFALSE) |
virtual void | Sort () |
Sort list entries in increasing order. More... | |
virtual void | Subtract (const TEventList *list) |
Remove elements from this list that are present in alist. More... | |
TEventList & | operator= (const TEventList &list) |
Assingment. More... | |
ClassDef (TEventList, 4) | |
Public Member Functions inherited from TNamed | |
TNamed () | |
TNamed (const char *name, const char *title) | |
TNamed (const TString &name, const TString &title) | |
TNamed (const TNamed &named) | |
TNamed & | operator= (const TNamed &rhs) |
TNamed assignment operator. More... | |
virtual | ~TNamed () |
virtual TObject * | Clone (const char *newname="") const |
Make a clone of an object using the Streamer facility. More... | |
virtual Int_t | Compare (const TObject *obj) const |
Compare two TNamed objects. More... | |
virtual void | Copy (TObject &named) const |
Copy this to obj. More... | |
virtual void | FillBuffer (char *&buffer) |
Encode TNamed into output buffer. More... | |
virtual const char * | GetName () const |
Returns name of object. More... | |
virtual const char * | GetTitle () const |
Returns title of object. More... | |
virtual ULong_t | Hash () const |
Return hash value for this object. More... | |
virtual Bool_t | IsSortable () const |
virtual void | SetNameTitle (const char *name, const char *title) |
Change (i.e. set) all the TNamed parameters (name and title). More... | |
virtual void | SetTitle (const char *title="") |
Change (i.e. set) the title of the TNamed. More... | |
virtual void | ls (Option_t *option="") const |
List TNamed name and title. More... | |
virtual Int_t | Sizeof () const |
Return size of the TNamed part of the TObject. More... | |
Public Member Functions inherited from TObject | |
TObject () | |
TObject (const TObject &object) | |
TObject copy ctor. More... | |
TObject & | operator= (const TObject &rhs) |
TObject assignment operator. More... | |
virtual | ~TObject () |
TObject destructor. More... | |
virtual void | AppendPad (Option_t *option="") |
Append graphics object to current pad. More... | |
virtual void | Browse (TBrowser *b) |
Browse object. May be overridden for another default action. More... | |
virtual const char * | ClassName () const |
Returns name of class to which the object belongs. More... | |
virtual void | Delete (Option_t *option="") |
Delete this object. More... | |
virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
Computes distance from point (px,py) to the object. More... | |
virtual void | Draw (Option_t *option="") |
Default Draw method for all objects. More... | |
virtual void | DrawClass () const |
Draw class inheritance tree of the class to which this object belongs. More... | |
virtual TObject * | DrawClone (Option_t *option="") const |
Draw a clone of this object in the current pad. More... | |
virtual void | Dump () const |
Dump contents of object on stdout. More... | |
virtual void | Execute (const char *method, const char *params, Int_t *error=0) |
Execute method on this object with the given parameter string, e.g. More... | |
virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=0) |
Execute method on this object with parameters stored in the TObjArray. More... | |
virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
Execute action corresponding to an event at (px,py). More... | |
virtual TObject * | FindObject (const char *name) const |
Must be redefined in derived classes. More... | |
virtual TObject * | FindObject (const TObject *obj) const |
Must be redefined in derived classes. More... | |
virtual Option_t * | GetDrawOption () const |
Get option used by the graphics system to draw this object. More... | |
virtual UInt_t | GetUniqueID () const |
Return the unique object id. More... | |
virtual const char * | GetIconName () const |
Returns mime type name of object. More... | |
virtual Option_t * | GetOption () const |
virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
Returns string containing info about the object at position (px,py). More... | |
virtual Bool_t | HandleTimer (TTimer *timer) |
Execute action in response of a timer timing out. More... | |
virtual Bool_t | InheritsFrom (const char *classname) const |
Returns kTRUE if object inherits from class "classname". More... | |
virtual Bool_t | InheritsFrom (const TClass *cl) const |
Returns kTRUE if object inherits from TClass cl. More... | |
virtual void | Inspect () const |
Dump contents of this object in a graphics canvas. More... | |
virtual Bool_t | IsFolder () const |
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More... | |
virtual Bool_t | IsEqual (const TObject *obj) const |
Default equal comparison (objects are equal if they have the same address in memory). More... | |
Bool_t | IsOnHeap () const |
Bool_t | IsZombie () const |
virtual Bool_t | Notify () |
This method must be overridden to handle object notification. More... | |
virtual void | Paint (Option_t *option="") |
This method must be overridden if a class wants to paint itself. More... | |
virtual void | Pop () |
Pop on object drawn in a pad to the top of the display list. More... | |
virtual Int_t | Read (const char *name) |
Read contents of object with specified name from the current directory. More... | |
virtual void | RecursiveRemove (TObject *obj) |
Recursively remove this object from a list. More... | |
virtual void | SaveAs (const char *filename="", Option_t *option="") const |
Save this object in the file specified by filename. More... | |
virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
Save a primitive as a C++ statement(s) on output stream "out". More... | |
virtual void | SetDrawOption (Option_t *option="") |
Set drawing option for object. More... | |
virtual void | SetUniqueID (UInt_t uid) |
Set the unique object id. More... | |
virtual void | UseCurrentStyle () |
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More... | |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) |
Write this object to the current directory. More... | |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const |
Write this object to the current directory. More... | |
void * | operator new (size_t sz) |
void * | operator new[] (size_t sz) |
void * | operator new (size_t sz, void *vp) |
void * | operator new[] (size_t sz, void *vp) |
void | operator delete (void *ptr) |
Operator delete. More... | |
void | operator delete[] (void *ptr) |
Operator delete []. More... | |
void | SetBit (UInt_t f, Bool_t set) |
Set or unset the user status bits as specified in f. More... | |
void | SetBit (UInt_t f) |
void | ResetBit (UInt_t f) |
Bool_t | TestBit (UInt_t f) const |
Int_t | TestBits (UInt_t f) const |
void | InvertBit (UInt_t f) |
virtual void | Info (const char *method, const char *msgfmt,...) const |
Issue info message. More... | |
virtual void | Warning (const char *method, const char *msgfmt,...) const |
Issue warning message. More... | |
virtual void | Error (const char *method, const char *msgfmt,...) const |
Issue error message. More... | |
virtual void | SysError (const char *method, const char *msgfmt,...) const |
Issue system error message. More... | |
virtual void | Fatal (const char *method, const char *msgfmt,...) const |
Issue fatal error message. More... | |
void | AbstractMethod (const char *method) const |
Use this method to implement an "abstract" method that you don't want to leave purely abstract. More... | |
void | MayNotUse (const char *method) const |
Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More... | |
void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
Use this method to declare a method obsolete. More... | |
Protected Attributes | |
Int_t | fN |
Int_t | fSize |
Int_t | fDelta |
Bool_t | fReapply |
Long64_t * | fList |
TDirectory * | fDirectory |
Protected Attributes inherited from TNamed | |
TString | fName |
TString | fTitle |
Friends | |
TEventList | operator+ (const TEventList &list1, const TEventList &list2) |
Addition. More... | |
TEventList | operator- (const TEventList &list1, const TEventList &list2) |
Substraction. More... | |
TEventList | operator* (const TEventList &list1, const TEventList &list2) |
Intersection. More... | |
Additional Inherited Members | |
Public Types inherited from TObject | |
enum | EStatusBits { kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4), kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13) } |
enum | { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff } |
enum | { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) } |
Static Public Member Functions inherited from TObject | |
static Long_t | GetDtorOnly () |
Return destructor only flag. More... | |
static void | SetDtorOnly (void *obj) |
Set destructor only flag. More... | |
static Bool_t | GetObjectStat () |
Get status of object stat flag. More... | |
static void | SetObjectStat (Bool_t stat) |
Turn on/off tracking of objects in the TObjectTable. More... | |
Protected Member Functions inherited from TObject | |
void | MakeZombie () |
virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
Interface to ErrorHandler (protected). More... | |
#include <TEventList.h>
TEventList::TEventList | ( | ) |
Pointer to directory holding this tree.
TEventList::TEventList | ( | const char * | name, |
const char * | title = "" , |
||
Int_t | initsize = 0 , |
||
Int_t | delta = 0 |
||
) |
Create a EventList.
This Eventlist is added to the list of objects in current directory.
Definition at line 71 of file TEventList.cxx.
TEventList::TEventList | ( | const TEventList & | list | ) |
Copy constructor.
Definition at line 87 of file TEventList.cxx.
|
virtual |
Default destructor for a EventList.
Definition at line 102 of file TEventList.cxx.
|
virtual |
Merge contents of alist with this list.
Both alist and this list are assumed to be sorted prior to this call
Definition at line 114 of file TEventList.cxx.
Referenced by TProofPlayerRemote::AddOutput(), TProofPlayerRemote::AddOutputObject(), Merge(), operator+(), and TProofPlayerRemote::StoreOutput().
TEventList::ClassDef | ( | TEventList | , |
4 | |||
) |
Set name and title to empty strings ("").
Reimplemented from TNamed.
Definition at line 49 of file TEventList.h.
Return TRUE if list contains entry.
Definition at line 160 of file TEventList.cxx.
Return TRUE if list contains entries from entrymin to entrymax included.
Definition at line 169 of file TEventList.cxx.
Referenced by TTreeCache::FillBuffer(), and TTreeCacheUnzip::FillBuffer().
|
virtual |
Called by TKey and others to automatically add us to a directory when we are read from a file.
Definition at line 181 of file TEventList.cxx.
Enter element entry into the list.
Definition at line 189 of file TEventList.cxx.
Referenced by TEveSelectorToEventList::Process(), TDSetElement::SetEntryList(), TDSet::SplitEntryList(), and TSelectorDraw::TakeAction().
|
inline |
Definition at line 54 of file TEventList.h.
Return value of entry at index in the list.
Return -1 if index is not in the list range.
Definition at line 220 of file TEventList.cxx.
Referenced by TMultiLayerPerceptron::ComputeDEDw(), TMLPAnalyzer::DrawNetwork(), TMultiLayerPerceptron::DrawResult(), TMLPAnalyzer::GatherInformations(), TEventIter::GetEntryNumber(), TMultiLayerPerceptron::GetError(), TEventIterTree::GetNextEvent(), TMultiLayerPerceptron::MLP_Stochastic(), TDSetElement::SetEntryList(), TChain::SetEventList(), TTree::SetEventList(), and TDSet::SplitEntryList().
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.
Definition at line 233 of file TEventList.cxx.
Referenced by Contains(), Intersect(), Subtract(), and TSelectorDraw::TakeAction().
|
inlinevirtual |
Definition at line 57 of file TEventList.h.
Referenced by Add(), TProofPlayerRemote::AddOutput(), TProofPlayerRemote::AddOutputObject(), and TProofPlayerRemote::StoreOutput().
|
inlinevirtual |
Definition at line 58 of file TEventList.h.
Referenced by Add(), TProofPlayerRemote::AddOutput(), TProofPlayerRemote::AddOutputObject(), ClassImp(), TMultiLayerPerceptron::ComputeDEDw(), TMLPAnalyzer::DrawNetwork(), TMultiLayerPerceptron::DrawResult(), TMLPAnalyzer::GatherInformations(), TMultiLayerPerceptron::GetError(), TEventIterObj::GetNextEvent(), TEventIterTree::GetNextEvent(), TEventIterObj::GetNextPacket(), TEventIterTree::GetNextPacket(), Merge(), TMultiLayerPerceptron::MLP_Stochastic(), TChain::SetEventList(), TTree::SetEventList(), TDSet::SplitEntryList(), TProofPlayerRemote::StoreOutput(), TProofDrawEventList::Terminate(), and TMultiLayerPerceptron::Train().
|
inlinevirtual |
Definition at line 59 of file TEventList.h.
Referenced by TChain::SetEventList(), and TTree::SetEventList().
|
inlinevirtual |
Definition at line 60 of file TEventList.h.
|
virtual |
Remove elements from this list that are NOT present in alist.
Definition at line 250 of file TEventList.cxx.
Referenced by operator*().
|
virtual |
Merge entries in all the TEventList in the collection in this event list.
Definition at line 277 of file TEventList.cxx.
TEventList & TEventList::operator= | ( | const TEventList & | list | ) |
Assingment.
Definition at line 455 of file TEventList.cxx.
Print contents of this list.
Reimplemented from TNamed.
Definition at line 300 of file TEventList.cxx.
Reset number of entries in event list.
Definition at line 326 of file TEventList.cxx.
Referenced by TSelectorDraw::Begin(), Clear(), and TTable::Draw().
Definition at line 66 of file TEventList.h.
|
virtual |
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.
Definition at line 349 of file TEventList.cxx.
Referenced by DetachRes(), and DirectoryAutoAdd().
|
virtual |
Change the name of this TEventList.
Reimplemented from TNamed.
Definition at line 360 of file TEventList.cxx.
Referenced by TProofDrawEventList::Terminate().
Definition at line 69 of file TEventList.h.
|
virtual |
Sort list entries in increasing order.
Definition at line 372 of file TEventList.cxx.
|
virtual |
Remove elements from this list that are present in alist.
Definition at line 428 of file TEventList.cxx.
Referenced by operator-().
|
friend |
Intersection.
Definition at line 495 of file TEventList.cxx.
|
friend |
Addition.
Definition at line 475 of file TEventList.cxx.
|
friend |
Substraction.
Definition at line 485 of file TEventList.cxx.
|
protected |
Definition at line 38 of file TEventList.h.
Referenced by Enter(), operator=(), Resize(), SetDelta(), and TEventList().
|
protected |
Definition at line 41 of file TEventList.h.
Referenced by GetDirectory(), SetDirectory(), SetName(), TEventList(), and ~TEventList().
|
protected |
Definition at line 40 of file TEventList.h.
Referenced by Add(), ContainsRange(), Enter(), GetEntry(), GetIndex(), GetList(), Intersect(), operator=(), Print(), Resize(), Sort(), Subtract(), TEventList(), and ~TEventList().
|
protected |
Definition at line 36 of file TEventList.h.
Referenced by Add(), ContainsRange(), Enter(), GetEntry(), GetIndex(), GetN(), Intersect(), operator=(), Print(), Reset(), Resize(), Sort(), Subtract(), and TEventList().
|
protected |
Definition at line 39 of file TEventList.h.
Referenced by GetReapplyCut(), SetReapplyCut(), and TEventList().
|
protected |
Definition at line 37 of file TEventList.h.
Referenced by Add(), Enter(), GetSize(), operator=(), Print(), Resize(), Sort(), and TEventList().