1 #ifndef __JSUPPORT__JSINGLEFILESCANNER__
2 #define __JSUPPORT__JSINGLEFILESCANNER__
23 namespace JPP {
using namespace JSUPPORT; }
55 std::string(file_name)
74 template<
class T = JNullType>
91 JTYPELIST<JSingleFileScanner_t, JLimit>::typelist>
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>
JFileScanner< T > scanner
Interface for object iteration with rewinding.
virtual skip_type skip(const skip_type ns)
Skip items.
JRewindableObjectIterator< T >::pointer_type pointer_type
virtual skip_type skip(const skip_type ns)
Skip items.
virtual ~JSingleFileScanner()
Virtual destructor.
JSingleFileScanner_t()
Default constructor.
JSingleFileScanner(const JSingleFileScanner< JTypelist_t > &input)
Copy constructor.
unsigned int skip_type
Type definition for number of objects to skip.
JSingleFileScanner::input_type input_type
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Long64_t counter_type
Type definition for counter.
JSingleFileScanner(const JSingleFileScanner< JTypelist_t > &input)
Copy constructor.
Template definition of auxiliary base class for data structures composed of multiple base classes wit...
Auxiliary base class for file name.
Auxiliary class for defining the range of iterations of objects.
Auxiliary class for recursive type list generation.
bool is_valid(const json &js)
Check validity of JSon data.
JSingleFileScanner_t(const std::string &file_name)
Constructor.
Auxiliary class for no type definition.
JSingleFileScanner(const input_type &file_name, const JLimit &limit=JLimit())
Constructor.
virtual void rewind()
Constructor.
JSingleFileScanner()
Default constructor.
JSingleFileScanner(const JSingleFileScanner< JTypelist_t > &input)
Copy constructor.
JSingleFileScanner()
Default constructor.
counter_type getCounter() const
Get counter.
JSingleFileScanner_t input_type
virtual const pointer_type & next()
Get next element.
void configure(const input_type &input, const JLimit &limit)
Configure.
const JSingleFileScanner_t & getFilename() const
Get file name.
virtual void rewind()
Rewind.
JSingleFileScanner::input_type input_type
JSingleFileScanner()
Default constructor.
Object reading from file.
std::string getFilename(const std::string &file_name)
Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any.
virtual bool hasNext()
Check availability of next element.
Object reading from a list of files.
friend std::istream & operator>>(std::istream &in, JSingleFileScanner &file_name)
Read single file scanner from input.
JSingleFileScanner()
Default constructor.
Auxiliaries for defining the range of iterations of objects.
JSingleFileScanner::input_type input_type
JSingleFileScanner(const input_type &file_name, const JLimit &limit=JLimit())
Constructor.
friend std::ostream & operator<<(std::ostream &out, const JSingleFileScanner &file_name)
Write single file scanner to output.