Jpp  19.1.0
the software that should make you happy
JMultipleFileSampler.hh
Go to the documentation of this file.
1 #ifndef __JSUPPORT__JMULTIPLEFILESAMPLER__
2 #define __JSUPPORT__JMULTIPLEFILESAMPLER__
3 
4 #include "JLang/JSampler.hh"
7 
8 
9 /**
10  * \author mdejong
11  */
12 
13 namespace JSUPPORT {}
14 namespace JPP { using namespace JSUPPORT; }
15 
16 namespace JSUPPORT {
17 
18  using JLANG::JSampler;
20 
21  /**
22  * Auxiliary base class to sample from a list of files.
23  */
24  template<class T>
26  /**
27  * Smart pointer operator.
28  *
29  * \return pointer to scanner
30  */
31  const JMultipleFileScanner<T>* const operator->() const
32  {
33  return &scanner;
34  }
35 
36  /**
37  * Smart pointer operator.
38  *
39  * \return pointer to scanner
40  */
42  {
43  return &scanner;
44  }
45 
46  protected:
48  };
49 
50 
51  /**
52  * Auxiliary class to sample from a list of files.
53  */
54  template<class T, template<class> class JSampler_t = JSampler>
56  public JMultipleFileSampler_t<T>,
57  public JObjectSampler<T, JSampler_t>
58  {
59 
60  typedef JSampler_t<T> sampler_type;
61 
62 
63  /**
64  * Constructor.
65  *
66  * \param sampler sampler
67  */
70  JObjectSampler<T, JSampler_t>(this->scanner, sampler)
71  {}
72  };
73 }
74 
75 #endif
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Auxiliary class to sample objects from a JRewindableObjectIterator.
JSampler_t< T > sampler
General purpose class for object reading from a list of file names.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Support classes and methods for experiment specific I/O.
Definition: JDataWriter.cc:38
Template class for sampling from a JRewindableObjectIterator.
Definition: JSampler.hh:22
Auxiliary base class to sample from a list of files.
JMultipleFileScanner< T > * operator->()
Smart pointer operator.
const JMultipleFileScanner< T > *const operator->() const
Smart pointer operator.
JMultipleFileScanner< T > scanner
Auxiliary class to sample from a list of files.
JMultipleFileSampler(const sampler_type &sampler=sampler_type())
Constructor.