ROOT logo
// @(#)root/tree:$Id$
// Author: Rene Brun   11/02/97

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TEventList
#define ROOT_TEventList


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TEventList                                                           //
//                                                                      //
// A list of selected entries in a TTree.                               //
//                                                                      //
//////////////////////////////////////////////////////////////////////////


#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

class TDirectory;
class TCollection;


class TEventList : public TNamed {

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
   
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);
   virtual void      Clear(Option_t *option="") {Reset(option);}
   virtual Bool_t    Contains(Long64_t entry);
   virtual Bool_t    ContainsRange(Long64_t entrymin, Long64_t entrymax);
   virtual void      DirectoryAutoAdd(TDirectory *);
   virtual void      Enter(Long64_t entry);
   TDirectory       *GetDirectory() const {return fDirectory;}
   virtual Long64_t  GetEntry(Int_t index) const;
   virtual Int_t     GetIndex(Long64_t entry) const;
   virtual Long64_t *GetList() const { return fList; }
   virtual Int_t     GetN() const { return fN; }
   virtual Bool_t    GetReapplyCut() const { return fReapply; };
   virtual Int_t     GetSize() const { return fSize; }
   virtual void      Intersect(const TEventList *list);
   virtual Int_t     Merge(TCollection *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) {fDelta = delta;}
   virtual void      SetDirectory(TDirectory *dir);
   virtual void      SetName(const char *name); // *MENU*
   virtual void      SetReapplyCut(Bool_t apply = kFALSE) {fReapply = apply;}; // *TOGGLE*
   virtual void      Sort();
   virtual void      Subtract(const TEventList *list);
   
   TEventList&       operator=(const TEventList &list);
   
   friend TEventList operator+(const TEventList &list1, const TEventList &list2);
   friend TEventList operator-(const TEventList &list1, const TEventList &list2);
   friend TEventList operator*(const TEventList &list1, const TEventList &list2);

   ClassDef(TEventList,4);  //A list of selected entries in a TTree.
};

#endif

 TEventList.h:1
 TEventList.h:2
 TEventList.h:3
 TEventList.h:4
 TEventList.h:5
 TEventList.h:6
 TEventList.h:7
 TEventList.h:8
 TEventList.h:9
 TEventList.h:10
 TEventList.h:11
 TEventList.h:12
 TEventList.h:13
 TEventList.h:14
 TEventList.h:15
 TEventList.h:16
 TEventList.h:17
 TEventList.h:18
 TEventList.h:19
 TEventList.h:20
 TEventList.h:21
 TEventList.h:22
 TEventList.h:23
 TEventList.h:24
 TEventList.h:25
 TEventList.h:26
 TEventList.h:27
 TEventList.h:28
 TEventList.h:29
 TEventList.h:30
 TEventList.h:31
 TEventList.h:32
 TEventList.h:33
 TEventList.h:34
 TEventList.h:35
 TEventList.h:36
 TEventList.h:37
 TEventList.h:38
 TEventList.h:39
 TEventList.h:40
 TEventList.h:41
 TEventList.h:42
 TEventList.h:43
 TEventList.h:44
 TEventList.h:45
 TEventList.h:46
 TEventList.h:47
 TEventList.h:48
 TEventList.h:49
 TEventList.h:50
 TEventList.h:51
 TEventList.h:52
 TEventList.h:53
 TEventList.h:54
 TEventList.h:55
 TEventList.h:56
 TEventList.h:57
 TEventList.h:58
 TEventList.h:59
 TEventList.h:60
 TEventList.h:61
 TEventList.h:62
 TEventList.h:63
 TEventList.h:64
 TEventList.h:65
 TEventList.h:66
 TEventList.h:67
 TEventList.h:68
 TEventList.h:69
 TEventList.h:70
 TEventList.h:71
 TEventList.h:72
 TEventList.h:73
 TEventList.h:74
 TEventList.h:75
 TEventList.h:76
 TEventList.h:77
 TEventList.h:78
 TEventList.h:79
 TEventList.h:80
 TEventList.h:81
 TEventList.h:82
 TEventList.h:83