Go to the documentation of this file. 1 #ifndef __JSUPPORT__JSINGLEFILESCANNER__
2 #define __JSUPPORT__JSINGLEFILESCANNER__
55 std::string(file_name)
66 return static_cast<const JSingleFileScanner_t&>(*
this);
74 template<
class T = JNullType>
91 JTYPELIST<JSingleFileScanner_t, JLimit>::typelist>
119 static_cast<JSingleFileScanner_t&>(*
this) = input;
121 this->setLimit(limit);
134 return in >> static_cast<std::string&>(file_name);
147 return out << static_cast<const std::string&>(file_name);
182 template<
class JTypelist_t>
238 if (
counter < getUpperLimit()) {
246 if (
counter < getLowerLimit()) {
317 template<
class JHead_t,
class JTail_t>
347 template<
class JTypelist_t>
389 throw JException(
"JSingleFileScanner::skip(): inconsistent number of items skipped.");
397 template<
class JHead_t>
420 template<
class JTypelist_t>
unsigned int skip_type
Type definition for number of objects to skip.
Object reading from file.
counter_type getCounter() const
Get counter.
virtual ~JSingleFileScanner()
Virtual destructor.
Auxiliary class for defining the range of iterations of objects.
JSingleFileScanner(const JSingleFileScanner< JTypelist_t > &input)
Copy constructor.
bool is_valid(const T &value)
Check validity of given value.
JSingleFileScanner_t()
Default constructor.
JSingleFileScanner()
Default constructor.
virtual const pointer_type & next()
Get next element.
Auxiliary class for no type definition.
Auxiliary class for recursive type list generation.
JRewindableObjectIterator< T >::pointer_type pointer_type
virtual bool hasNext()
Check availability of next element.
JSingleFileScanner(const input_type &file_name, const JLimit &limit=JLimit())
Constructor.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JSingleFileScanner(const JSingleFileScanner< JTypelist_t > &input)
Copy constructor.
JFileScanner< T > scanner
JSingleFileScanner()
Default constructor.
virtual void rewind()
Rewind.
virtual skip_type skip(const skip_type ns)
Skip items.
std::string getFilename(const std::string &file_name)
Get file name part, i.e.
JSingleFileScanner_t(const std::string &file_name)
Constructor.
JSingleFileScanner ::input_type input_type
JSingleFileScanner ::input_type input_type
void configure(const input_type &input, const JLimit &limit)
Configure.
Interface for object iteration with rewinding.
Template definition of auxiliary base class for composite data structures composed of base classes wi...
virtual skip_type skip(const skip_type ns)
Skip items.
Auxiliary base class for file name.
JSingleFileScanner(const input_type &file_name, const JLimit &limit=JLimit())
Constructor.
friend std::istream & operator>>(std::istream &in, JSingleFileScanner &file_name)
Read single file scanner from input.
virtual void rewind()
Rewind.
JSingleFileScanner ::input_type input_type
Support classes and methods for experiment specific I/O.
const JSingleFileScanner_t & getFilename() const
Get file name.
JSingleFileScanner(const input_type &file_name, const JLimit &limit=JLimit())
Constructor.
JSingleFileScanner()
Default constructor.
JSingleFileScanner()
Default constructor.
JSingleFileScanner(const JSingleFileScanner< JTypelist_t > &input)
Copy constructor.
Long64_t counter_type
Type definition for counter.
JSingleFileScanner_t input_type
friend std::ostream & operator<<(std::ostream &out, const JSingleFileScanner &file_name)
Write single file scanner to output.
Object reading from a list of files.