Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TEventList.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/tree:$Id$
0002 // Author: Rene Brun   11/02/97
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TEventList
0013 #define ROOT_TEventList
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TEventList                                                           //
0019 //                                                                      //
0020 // A list of selected entries in a TTree.                               //
0021 //                                                                      //
0022 //////////////////////////////////////////////////////////////////////////
0023 
0024 
0025 #include "TNamed.h"
0026 
0027 class TDirectory;
0028 class TCollection;
0029 
0030 
0031 class TEventList : public TNamed {
0032 
0033 protected:
0034    Int_t            fN;           ///<  Number of elements in the list
0035    Int_t            fSize;        ///<  Size of array
0036    Int_t            fDelta;       ///<  Increment size
0037    bool             fReapply;     ///<  If true, TTree::Draw will 'reapply' the original cut
0038    Long64_t        *fList;        ///<[fN]Array of elements
0039    TDirectory      *fDirectory;   ///<! Pointer to directory holding this tree
0040 
0041 public:
0042    TEventList();
0043    TEventList(const char *name, const char *title="",Int_t initsize=0, Int_t delta = 0);
0044    TEventList(const TEventList &list);
0045              ~TEventList() override;
0046    virtual void      Add(const TEventList *list);
0047    void      Clear(Option_t *option="") override {Reset(option);}
0048    virtual bool      Contains(Long64_t entry);
0049    virtual bool      ContainsRange(Long64_t entrymin, Long64_t entrymax);
0050    virtual void      DirectoryAutoAdd(TDirectory *);
0051    virtual void      Enter(Long64_t entry);
0052    TDirectory       *GetDirectory() const {return fDirectory;}
0053    virtual Long64_t  GetEntry(Int_t index) const;
0054    virtual Int_t     GetIndex(Long64_t entry) const;
0055    virtual Long64_t *GetList() const { return fList; }
0056    virtual Int_t     GetN() const { return fN; }
0057    virtual bool      GetReapplyCut() const { return fReapply; };
0058    virtual Int_t     GetSize() const { return fSize; }
0059    virtual void      Intersect(const TEventList *list);
0060    virtual Int_t     Merge(TCollection *list);
0061    void      Print(Option_t *option="") const override;
0062    virtual void      Reset(Option_t *option="");
0063    virtual void      Resize(Int_t delta=0);
0064    virtual void      SetDelta(Int_t delta=100) {fDelta = delta;}
0065    virtual void      SetDirectory(TDirectory *dir);
0066    void      SetName(const char *name) override; // *MENU*
0067    virtual void      SetReapplyCut(bool apply = false) {fReapply = apply;}; // *TOGGLE*
0068    virtual void      Sort();
0069    virtual void      Subtract(const TEventList *list);
0070 
0071    TEventList&       operator=(const TEventList &list);
0072 
0073    friend TEventList operator+(const TEventList &list1, const TEventList &list2);
0074    friend TEventList operator-(const TEventList &list1, const TEventList &list2);
0075    friend TEventList operator*(const TEventList &list1, const TEventList &list2);
0076 
0077    ClassDefOverride(TEventList,4);  //A list of selected entries in a TTree.
0078 };
0079 
0080 #endif
0081