Go to the documentation of this file. 1 #ifndef __JSUPPORT__JTREESCANNERINTERFACE__
2 #define __JSUPPORT__JTREESCANNERINTERFACE__
33 template<
class T,
class JEvaluator_t = JNullType>
46 template<
class JClass_t>
79 virtual Long64_t getEntries()
const = 0;
88 virtual JClass_t* getEntry(Long64_t index) = 0;
106 return JClass_t::Class_Name();
135 return pTreeScanner->getEntry(index);
146 return *(pTreeScanner->getEntry(index));
158 return index == cursor.index;
169 return ++index < pTreeScanner->getEntries();
204 struct reverse_iterator :
226 return (this->pTreeScanner->getEntry(this->pTreeScanner->getEntries() - this->index - 1));
237 return *(this->pTreeScanner->getEntry(this->pTreeScanner->getEntries() - this->index - 1));
247 virtual bool equals(
const reverse_iterator& cursor)
const
249 return index == cursor.index;
260 return ++index < pTreeScanner->getEntries();
299 return getEntries() == 0;
310 return iterator(
this, this->getLowerLimit());
321 return iterator(
this, this->getUpperLimit() < this->getEntries() ? this->getUpperLimit() : this->getEntries());
332 return reverse_iterator(
this, this->getLowerLimit());
343 return reverse_iterator(
this, this->getUpperLimit() < this->getEntries() ? this->getUpperLimit() : this->getEntries());
354 template<
class JClass_t,
class JEvaluator_t>
374 virtual Long64_t
find(
const double value)
const = 0;
384 Long64_t
find(
const T&
object)
const
iterator end()
Get iterator to end of data.
JTreeScannerInterface * pTreeScanner
Auxiliary class for defining the range of iterations of objects.
Auxiliary base class for list of file names.
reverse_iterator()
Default constructor.
virtual bool increment()
Increment iterator.
virtual bool decrement()
Decrement iterator.
JTreeScannerInterface(const JEvaluator_t &evaluator=JEvaluator_t())
Constructor.
Template definition of auxiliary base class for comparison of data structures.
const JEvaluator_t & getEvaluator() const
Get evaluator.
virtual bool equals(const reverse_iterator &cursor) const
Equality of iterator.
Auxiliary class for no type definition.
virtual const char * getClassName() const
Get actual class name.
bool empty() const
Check emptyness.
Template interface for method bool decrement().
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
const data_type * operator->()
Smart pointer operator.
reverse_iterator(JTreeScannerInterface *__p, const counter_type __i)
Constructor.
reverse_iterator rend()
Get reverse iterator to end of data.
Long64_t find(const T &object) const
Find index of element that is closest in value to given object.
JTreeScannerInterface * pTreeScanner
Auxiliary interface for direct access of elements in ROOT TChain.
virtual bool equals(const iterator &cursor) const
Equality of iterator.
virtual bool increment()
Increment iterator.
virtual bool decrement()
Decrement iterator.
Interface for object iteration with rewinding.
virtual Long64_t find(const double value) const =0
Find index of element that is closest in value to given value.
iterator()
Default constructor.
iterator begin()
Get iterator to begin of data.
data_type & operator*()
Dereference operator.
Support classes and methods for experiment specific I/O.
void configure(const JMultipleFileScanner_t &file_list)
Configure.
const data_type & operator*()
Dereference operator.
JRewindableObjectIterator< JClass_t >::pointer_type pointer_type
Long64_t counter_type
Type definition for counter.
reverse_iterator rbegin()
Get reverse iterator to begin of data.
iterator(JTreeScannerInterface *__p, const counter_type __i)
Constructor.
data_type * operator->()
Smart pointer operator.