Jpp
JWeightFileScanner.hh
Go to the documentation of this file.
1 #ifndef __JAANET__JWEIGHTFILESCANNER__
2 #define __JAANET__JWEIGHTFILESCANNER__
3 
4 #include "JWeightEventHelper.hh"
5 #include "JWeightMupage.hh"
8 #include "JSupport/JSupport.hh"
9 
10 class Head;
11 class Evt;
12 
13 namespace JAANET {
14 
16  using JSUPPORT::JLimit;
17 
18  /**
19  * Template file scanner with event weight.
20  */
21  template<class JFileScanner_t = JMultipleFileScanner<Evt> >
23  public JFileScanner_t,
24  public JWeightEventHelper
25  {
26  /**
27  * Default constructor.
28  */
30  {}
31 
32 
33  /**
34  * Constructor.
35  *
36  * \param input_files input files
37  * \param weight event weight
38  * \param limit limit
39  */
41  const JWeightEvent& weight,
42  const JLimit& limit = JLimit())
43  {
44  this->configure(input_files, weight);
45  }
46 
47 
48  /**
49  * Configure.
50  *
51  * \param input_files input files
52  * \param weight event weight
53  * \param limit limit
54  */
55  bool configure(const JMultipleFileScanner_t& input_files,
56  const JWeightEvent& weight,
57  const JLimit& limit = JLimit())
58  {
59  using namespace JPP;
60 
61  JFileScanner_t::configure(input_files, limit);
62 
63  this->reset(weight.clone());
64 
65  return JWeightEventHelper::configure(input_files);
66  }
67  };
68 }
69 
70 #endif
JSUPPORT::JLimit
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:41
JSUPPORT::JMultipleFileScanner_t
Auxiliary base class for list of file names.
Definition: JMultipleFileScanner.hh:44
JAANET::JWeightFileScanner
Template file scanner with event weight.
Definition: JWeightFileScanner.hh:22
JAANET::JWeightFileScanner::JWeightFileScanner
JWeightFileScanner()
Default constructor.
Definition: JWeightFileScanner.hh:29
JAANET::JWeightFileScanner::JWeightFileScanner
JWeightFileScanner(const JMultipleFileScanner_t &input_files, const JWeightEvent &weight, const JLimit &limit=JLimit())
Constructor.
Definition: JWeightFileScanner.hh:40
JSupport.hh
JLANG::JClonable::clone
virtual clone_type clone() const
Get clone of this object.
Definition: JClonable.hh:69
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JWeightMupage.hh
JMultipleFileScanner.hh
JAANET::JWeightEvent
Low-level interface for event weighing.
Definition: JWeightEvent.hh:17
JAANET
Extensions to AAnet data format.
Definition: JAAnetToolkit.hh:36
JAANET::JWeightEventHelper
Helper class for event weighing.
Definition: JWeightEventHelper.hh:23
JSUPPORT::JMultipleFileScanner
General purpose class for object reading from a list of file names.
Definition: JMultipleFileScanner.hh:167
JLANG::JSharedPointer::reset
virtual void reset()
Reset pointer.
Definition: JSharedPointer.hh:171
JAANET::JWeightEventHelper::configure
bool configure(const JMultipleFileScanner_t &input_files)
Configuration.
Definition: JWeightEventHelper.hh:33
JMonteCarloFileSupportkit.hh
JWeightEventHelper.hh
JAANET::JWeightFileScanner::configure
bool configure(const JMultipleFileScanner_t &input_files, const JWeightEvent &weight, const JLimit &limit=JLimit())
Configure.
Definition: JWeightFileScanner.hh:55
JTOOLS::configure
void configure(const T &value, const JAbstractCollection< JAbscissa_t > &bounds, JBool< false > option)
Configuration of value.
Definition: JToolsToolkit.hh:285