1#ifndef __JSUPPORT__JSINGLEFILESCANNER__
2#define __JSUPPORT__JSINGLEFILESCANNER__
55 std::string(file_name)
74 template<
class T = JNullType>
91 JTYPELIST<JSingleFileScanner_t, JLimit>::typelist>
121 this->setLimit(limit);
145 return in >>
static_cast<std::string&
>(file_name);
158 return out << static_cast<const std::string&>(file_name);
193 template<
class JTypelist_t>
261 if (
counter < getUpperLimit()) {
269 if (
counter < getLowerLimit()) {
340 template<
class JHead_t,
class JTail_t>
370 template<
class JTypelist_t>
423 THROW(
JException,
"JSingleFileScanner::skip(): inconsistent number of items skipped.");
431 template<
class JHead_t>
454 template<
class JTypelist_t>
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Auxiliaries for defining the range of iterations of objects.
Interface for object iteration with rewinding.
Object reading from file.
friend std::ostream & operator<<(std::ostream &out, const JSingleFileScanner &file_name)
Write single file scanner to output.
void configure(const input_type &input, const JLimit &limit)
Configure.
friend std::istream & operator>>(std::istream &in, JSingleFileScanner &file_name)
Read single file scanner from input.
void configure(const input_type &input)
Configure.
JSingleFileScanner_t input_type
JSingleFileScanner()
Default constructor.
virtual ~JSingleFileScanner()
Virtual destructor.
JSingleFileScanner(const input_type &file_name, const JLimit &limit)
Constructor.
JSingleFileScanner(const input_type &file_name)
Constructor.
JSingleFileScanner(const JSingleFileScanner< JTypelist_t > &input)
Copy constructor.
JSingleFileScanner()
Default constructor.
JSingleFileScanner ::input_type input_type
JSingleFileScanner()
Default constructor.
JSingleFileScanner ::input_type input_type
JSingleFileScanner(const input_type &file_name)
Constructor.
JSingleFileScanner(const input_type &file_name, const JLimit &limit)
Constructor.
virtual skip_type skip(const skip_type ns) override
Skip items.
virtual void rewind() override
Rewind.
JSingleFileScanner(const JSingleFileScanner< JTypelist_t > &input)
Copy constructor.
Object reading from a list of files.
JFileScanner< T > scanner
JSingleFileScanner()
Default constructor.
virtual void rewind() override
Rewind.
JRewindableObjectIterator< T >::pointer_type pointer_type
virtual bool hasNext() override
Check availability of next element.
counter_type getCounter() const
Get counter.
virtual const pointer_type & next() override
Get next element.
JSingleFileScanner(const input_type &file_name)
Constructor.
virtual skip_type skip(const skip_type ns) override
Skip items.
JSingleFileScanner(const JSingleFileScanner< JTypelist_t > &input)
Copy constructor.
JSingleFileScanner(const input_type &file_name, const JLimit &limit)
Constructor.
JSingleFileScanner ::input_type input_type
std::string getFilename(const std::string &file_name)
Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any.
unsigned int skip_type
Type definition for number of objects to skip.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Long64_t counter_type
Type definition for counter.
bool is_valid(const json &js)
Check validity of JSon data.
Support classes and methods for experiment specific I/O.
Template definition of auxiliary base class for data structures composed of multiple base classes wit...
Auxiliary class for no type definition.
Auxiliary class for recursive type list generation.
Auxiliary class for defining the range of iterations of objects.
Auxiliary base class for file name.
const JSingleFileScanner_t & getFilename() const
Get file name.
JSingleFileScanner_t()
Default constructor.
JSingleFileScanner_t(const std::string &file_name)
Constructor.