75 if (initsize > 100) fSize = initsize;
77 if (delta > 100) fDelta = delta;
122 for (i=0;i<an;i++)
fList[i] = alst[i];
127 Int_t newsize = fN + an;
132 while (alpos < an &&
fList[i] > alst[alpos]) {
133 newlist[newpos] = alst[alpos];
137 if (alpos < an &&
fList[i] == alst[alpos]) alpos++;
138 newlist[newpos] =
fList[i];
142 newlist[newpos] = alst[alpos];
153 TCut updated = orig || added;
197 if (fN>0 && entry==
fList[fN-1])
return;
202 if(fN==0 || entry>
fList[fN-1]) {
207 if(pos>=0 && entry==
fList[pos])
210 memmove( &(
fList[pos+1]), &(
fList[pos]), 8*(fN-pos));
222 if (!
fList)
return -1;
223 if (index < 0 || index >= fN)
return -1;
238 while(nabove-nbelow > 1) {
239 middle = (nabove+nbelow)/2;
240 if (entry ==
fList[middle-1])
return middle-1;
241 if (entry <
fList[middle-1]) nabove = middle;
242 else nbelow = middle;
260 newlist[newpos] =
fList[i];
270 TCut updated = orig && removed;
279 if (!list)
return -1;
291 nevents += el->
GetN();
303 if (!strstr(option,
"all"))
return;
307 char *
line =
new char[100];
308 snprintf(line,100,
"%5d : ",0);
313 snprintf(line,100,
"%5d : ",i);
316 snprintf(element,10,
"%7lld ",
fList[i]);
317 strlcat(line,element,100);
319 if (nbuf)
printf(
"%s\n",line);
336 if (!delta) delta =
fDelta;
380 newlist[i] =
fList[ind];
382 for (i=fN;i<
fSize;i++) {
393 void TEventList::Streamer(
TBuffer &b)
438 newlist[newpos] =
fList[i];
448 TCut updated = orig && !removed;
459 if (fSize < list.
fSize) {
virtual void Enter(Long64_t entry)
Enter element entry into the list.
virtual const char * GetTitle() const
Returns title of object.
virtual Bool_t Contains(Long64_t entry)
Return TRUE if list contains entry.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
virtual void Print(Option_t *option="") const
Print contents of this list.
virtual void Intersect(const TEventList *list)
Remove elements from this list that are NOT present in alist.
Buffer base class used for serializing objects.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
ClassImp(TEventList) TEventList
Default constructor for a EventList.
virtual void DirectoryAutoAdd(TDirectory *)
Called by TKey and others to automatically add us to a directory when we are read from a file...
TEventList & operator=(const TEventList &list)
Assingment.
virtual void Sort()
Sort list entries in increasing order.
virtual void Resize(Int_t delta=0)
Resize list by delta entries.
virtual Int_t GetN() const
The TNamed class is the base class for all named ROOT classes.
virtual Bool_t ContainsRange(Long64_t entrymin, Long64_t entrymax)
Return TRUE if list contains entries from entrymin to entrymax included.
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TEventList()
Pointer to directory holding this tree.
virtual void SetDirectory(TDirectory *dir)
Remove reference to this EventList from current directory and add reference to new directory dir...
A specialized string object used for TTree selections.
virtual Long64_t GetEntry(Int_t index) const
Return value of entry at index in the list.
TEventList operator*(const TEventList &list1, const TEventList &list2)
Intersection.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Collection abstract base class.
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
A TEventList object is a list of selected events (entries) in a TTree.
virtual ~TEventList()
Default destructor for a EventList.
virtual const char * GetName() const
Returns name of object.
TEventList operator+(const TEventList &list1, const TEventList &list2)
Addition.
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Int_t Merge(TCollection *list)
Merge entries in all the TEventList in the collection in this event list.
virtual TObject * Remove(TObject *)
Remove an object from the in-memory list.
Describe directory structure in memory.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
virtual void SetName(const char *name)
Change the name of this TEventList.
virtual void Add(const TEventList *list)
Merge contents of alist with this list.
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 cal...
virtual Long64_t * GetList() const
virtual void Subtract(const TEventList *list)
Remove elements from this list that are present in alist.
Short_t Max(Short_t a, Short_t b)
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
TEventList operator-(const TEventList &list1, const TEventList &list2)
Substraction.
Long64_t BinarySearch(Long64_t n, const T *array, T value)
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual void Reset(Option_t *option="")
Reset number of entries in event list.