Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
ROOT TTree parameter settings.
JWeightFileScanner(const JMultipleFileScanner_t &input_files, const JWeightEvent &weight, const JLimit &limit=JLimit())
Constructor.
JWeightFileScanner()
Default constructor.
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:41
Helper class for event weighing.
Low-level interface for event weighing.
Definition: JWeightEvent.hh:17
Template file scanner with event weight.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Definition: Head.hh:66
Scanning of objects from multiple files according a format that follows from the extension of each fi...
virtual clone_type clone() const
Get clone of this object.
Definition: JClonable.hh:69
Auxiliary base class for list of file names.
void configure(const T &value, const JAbstractCollection< JAbscissa_t > &bounds, JBool< false > option)
Configuration of value.
bool configure(const JMultipleFileScanner_t &input_files)
Configuration.
General purpose class for object reading from a list of file names.
virtual void reset()
Reset pointer.
bool configure(const JMultipleFileScanner_t &input_files, const JWeightEvent &weight, const JLimit &limit=JLimit())
Configure.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Definition: Evt.hh:19
std::vector< double > weight
Definition: JAlgorithm.hh:428