Jpp  18.3.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JTreeSampler.hh
Go to the documentation of this file.
1 #ifndef __JSUPPORT__JTREESAMPLER__
2 #define __JSUPPORT__JTREESAMPLER__
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>
28  struct JTreeSampler :
29  public JTemplate< JTreeScanner<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  */
42  JTemplate< JTreeScanner<T> >(),
43  JObjectSampler<T, JSampler_t>(this->template get<JRewindableObjectIterator<T>,true>(), sampler)
44  {}
45  };
46 }
47 
48 #endif
Template class for sampling from a JRewindableObjectIterator.
Definition: JSampler.hh:22
Interface for object iteration with rewinding.
JSampler_t< T > sampler_type
Definition: JTreeSampler.hh:33
JTreeSampler(const sampler_type &sampler=sampler_type())
Constructor.
Definition: JTreeSampler.hh:41
Auxiliary class for managing multiple objects.
Definition: JTemplate.hh:40
then usage $script< detector file >< detectorfile > nIf the range of floors is the first detector file is aligned to the second before the comparison nIn this
Template definition for direct access of elements in ROOT TChain.
Auxiliary class to alleviate the diamond problem due to multiple inheritance.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Auxiliary class to sample objects from a JRewindableObjectIterator.
const T & get() const
Get reference to object.
Definition: JTemplate.hh:113
Auxiliary class to sample from a list of files.
Definition: JTreeSampler.hh:28
JSampler_t< T > sampler