Jpp
JMultipleFileSampler.hh
Go to the documentation of this file.
1 #ifndef __JSUPPORT__JMULTIPLEFILESAMPLER__
2 #define __JSUPPORT__JMULTIPLEFILESAMPLER__
3 
4 #include "JLang/JSampler.hh"
5 #include "JLang/JTemplate.hh"
8 
9 
10 /**
11  * \author mdejong
12  */
13 
14 namespace JSUPPORT {}
15 namespace JPP { using namespace JSUPPORT; }
16 
17 namespace JSUPPORT {
18 
19  using JLANG::JSampler;
20  using JLANG::JTemplate;
22 
23 
24  /**
25  * Auxiliary class to sample from a list of files.
26  */
27  template<class T, template<class> class JSampler_t = JSampler>
29  public JTemplate< JMultipleFileScanner<T> >,
30  public JObjectSampler<T, JSampler_t>
31  {
32 
33  typedef JSampler_t<T> sampler_type;
34 
35 
36  /**
37  * Constructor.
38  *
39  * \param sampler sampler
40  */
43  JObjectSampler<T, JSampler_t>(this->template get<JRewindableObjectIterator<T>,true>(), sampler)
44  {}
45  };
46 }
47 
48 #endif
JLANG::JTemplate::get
const T & get() const
Get reference to object.
Definition: JTemplate.hh:113
JSampler.hh
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JObjectSampler.hh
JMultipleFileScanner.hh
JLANG::JRewindableObjectIterator
Interface for object iteration with rewinding.
Definition: JObjectIterator.hh:362
JSUPPORT::JMultipleFileSampler
Auxiliary class to sample from a list of files.
Definition: JMultipleFileSampler.hh:28
JSUPPORT::JRandomSampler< JDAQSummaryslice >
JLANG::JSampler
Template class for sampling from a JRewindableObjectIterator.
Definition: JSampler.hh:22
JSUPPORT::JMultipleFileScanner
General purpose class for object reading from a list of file names.
Definition: JMultipleFileScanner.hh:167
JLANG::JTemplate
Auxiliary class for managing multiple objects.
Definition: JTemplate.hh:40
JSUPPORT
Support classes and methods for experiment specific I/O.
Definition: JDataWriter.cc:38
JSUPPORT::JMultipleFileSampler::sampler_type
JSampler_t< T > sampler_type
Definition: JMultipleFileSampler.hh:33
JTemplate.hh
JLANG::JObjectSampler
Auxiliary class to sample objects from a rewindable object iterator.
Definition: JObjectSampler.hh:30
JSUPPORT::JMultipleFileSampler::JMultipleFileSampler
JMultipleFileSampler(const sampler_type &sampler=sampler_type())
Constructor.
Definition: JMultipleFileSampler.hh:41
JLANG::JObjectSampler::sampler
JSampler_t< T > sampler
Definition: JObjectSampler.hh:145