Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
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
14namespace JSUPPORT {}
15namespace JPP { using namespace JSUPPORT; }
16
17namespace 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
Auxiliary class to alleviate the diamond problem due to multiple inheritance.
Auxiliary class to sample objects from a JRewindableObjectIterator.
JSampler_t< T > sampler
Interface for object iteration with rewinding.
Template definition for direct access of elements in ROOT TChain.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Support classes and methods for experiment specific I/O.
Template class for sampling from a JRewindableObjectIterator.
Definition JSampler.hh:22
Auxiliary class for managing multiple objects.
Definition JTemplate.hh:40
const T & get() const
Get reference to object.
Definition JTemplate.hh:113
Auxiliary class to sample from a list of files.
JSampler_t< T > sampler_type
JTreeSampler(const sampler_type &sampler=sampler_type())
Constructor.