1 #ifndef __JSUPPORT__JTREESCANNERINTERFACE__
2 #define __JSUPPORT__JTREESCANNERINTERFACE__
17 namespace JPP {
using namespace JSUPPORT; }
31 template<
class T,
class JEvaluator_t = JNullType>
44 template<
class JClass_t>
54 struct basic_iterator :
64 virtual bool equals(
const T& cursor)
const
66 return index == cursor.index;
77 return ++index < pTreeScanner->getEntries();
100 return (index += offset) < pTreeScanner->getEntries();
112 return (index -= offset) >= 0;
171 virtual Long64_t getEntries()
const = 0;
180 virtual JClass_t* getEntry(Long64_t index) = 0;
198 return JClass_t::Class_Name();
206 public basic_iterator<iterator>
224 return this->pTreeScanner->getEntry(this->index);
235 return *(this->pTreeScanner->getEntry(this->index));
254 struct reverse_iterator :
255 public basic_iterator<reverse_iterator>
273 return (this->pTreeScanner->getEntry(this->pTreeScanner->getEntries() - this->index - 1));
284 return *(this->pTreeScanner->getEntry(this->pTreeScanner->getEntries() - this->index - 1));
295 basic_iterator<reverse_iterator>(p, i)
307 return getEntries() == 0;
318 return iterator(
this, this->getLowerLimit());
329 return iterator(
this, this->getUpperLimit() < this->getEntries() ? this->getUpperLimit() : this->getEntries());
340 return reverse_iterator(
this, this->getLowerLimit());
351 return reverse_iterator(
this, this->getUpperLimit() < this->getEntries() ? this->getUpperLimit() : this->getEntries());
362 template<
class JClass_t,
class JEvaluator_t>
382 virtual Long64_t
find(
const double value)
const = 0;
392 Long64_t
find(
const T&
object)
const
virtual bool equals(const T &cursor) const
Equality of iterator.
Interface for object iteration with rewinding.
const data_type & operator*()
Dereference operator.
data_type * operator->()
Smart pointer operator.
virtual bool decrement(const size_t offset)
Decrement iterator.
void configure(const JMultipleFileScanner_t &file_list)
Configure.
bool empty() const
Check emptyness.
iterator()
Default constructor.
reverse_iterator rbegin()
Get reverse iterator to begin of data.
virtual bool decrement()
Decrement iterator.
reverse_iterator rend()
Get reverse iterator to end of data.
data_type & operator*()
Dereference operator.
Long64_t counter_type
Type definition for counter.
virtual Long64_t find(const double value) const =0
Find index of element that is closest in value to given value.
iterator begin()
Get iterator to begin of data.
Auxiliary interface for direct access of elements in ROOT TChain.
const data_type * operator->()
Smart pointer operator.
basic_iterator(JTreeScannerInterface *p, const counter_type i)
Constructor.
virtual const char * getClassName() const
Get actual class name.
Auxiliary class for defining the range of iterations of objects.
Template interface for method bool decrement().
iterator(JTreeScannerInterface *p, const counter_type i)
Constructor.
JRewindableObjectIterator< JClass_t >::pointer_type pointer_type
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Template definition of auxiliary base class for comparison of data structures.
Auxiliary class for no type definition.
basic_iterator()
Default constructor.
virtual bool increment(const size_t offset)
Increment iterator.
JTreeScannerInterface * pTreeScanner
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Auxiliary base class for list of file names.
JTreeScannerInterface(const JEvaluator_t &evaluator=JEvaluator_t())
Constructor.
iterator end()
Get iterator to end of data.
reverse_iterator(JTreeScannerInterface *p, const counter_type i)
Constructor.
virtual bool increment()
Increment iterator.
Long64_t find(const T &object) const
Find index of element that is closest in value to given object.
Auxiliaries for defining the range of iterations of objects.
const JEvaluator_t & getEvaluator() const
Get evaluator.
reverse_iterator()
Default constructor.