1#ifndef __JSUPPORT_JEVTWEIGHTFILESCANNERSET__ 
    2#define __JSUPPORT_JEVTWEIGHTFILESCANNERSET__ 
   57  template<
class JFileScanner_t = JMultipleFileScanner<Evt>,
 
   58           class JComparator_t  = std::less<JHead> >
 
   60    public std::vector< JEvtWeightFileScanner<JFileScanner_t> >
 
   71    typedef typename std::vector<filescanner_type>::const_iterator           
const_iterator;
 
  106      for (
typename input_type::const_iterator i = input.begin(); i != input.end(); ++i) {
 
  107        n += size_t(this->
put(*i));
 
 
  120    bool put(
const std::string& input)
 
  127      iterator i = lower_bound(this->begin(),  this->end(),  head,
 
  130      if (i == this->end() || !i->getHeader().match(head)) {
 
  134      return i->put(input);
 
 
  149        if (i->match(head)) {
 
  154      THROW(
JValueOutOfRange, 
"JEvtWeightFileScannerSet::get(): No corresponding scanner found for given header.");
 
 
  173      for (
iterator i = this->begin(); i != this->end(); ++i) {
 
  174        n += (size_t) i->setEvtWeightFactor(category, factor);
 
 
  195                              const bool                    requireAll = 
false)
 
  204        for (
iterator i = this->begin(); i != this->end(); ++i) {
 
  205          n += (size_t) i->setEvtWeightFactor(categories, factor);
 
  210        for (
iterator i = this->begin(); i != this->end(); ++i) {
 
  214          for (JEvtCategorySet::const_iterator 
j = categories.cbegin(); 
j != categories.cend() && !isSet; ++
j) {
 
  215            isSet = i->setEvtWeightFactor(*
j, factor);
 
 
  239    template<
class JEvtWeightFactorHelper_t>
 
  241                              const bool                                       requireAll = 
false)
 
  250        for (
iterator i = this->begin(); i != this->end(); ++i) {
 
  256        for (
iterator i = this->begin(); i != this->end(); ++i) {
 
  261            isSet = i->setEvtWeightFactor(
j->first, 
j->second);
 
 
  300                   const bool             requireAll = 
false)
 
 
  318                   const bool                          requireAll = 
false)
 
 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
 
Scanning of objects from multiple files according a format that follows from the extension of each fi...
 
ROOT TTree parameter settings of various packages.
 
Auxiliary class for reading a map of event categories.
 
map_type::const_iterator const_iterator
 
const JHead & getHeader() const
Get header.
 
Exception for accessing a value in a collection that is outside of its range.
 
JEvtWeighter getEventWeighter
Function object for mapping header to event weighter.
 
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Support classes and methods for experiment specific I/O.
 
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
 
Helper class for event categories.
 
Container for a set of event categories.
 
Helper class for event-weight factor.
 
Helper class for flux function.
 
Auxiliary class for organising Monte Carlo file scanners associated with event weighters.
 
size_t setEvtWeightFactor(const JEvtCategoryHelper &category, const JEvtWeightFactorHelper &factor)
Set event-weighting factor for all MC-files corresponding to a given PDG code.
 
const_reference find(const JHead &head) const
Find file scanner compatible with a given header.
 
size_t setFlux(const JEvtCategoryMap< JFluxHelper > &object, const bool requireAll=false)
Set event-weight factor of all MC-files according to a given map between event categories and event-w...
 
size_t setFlux(const JEvtCategoryHelper &category, const JFluxHelper &flux)
Set flux function for all MC-files corresponding to a given event category.
 
std::vector< filescanner_type >::value_type value_type
 
JEvtWeightFileScannerSet(const input_type &input)
Constructor.
 
size_t setEvtWeightFactor(const JEvtCategorySet &categories, const JEvtWeightFactorHelper &factor, const bool requireAll=false)
Set event-weight factor of all MC-files corresponding to a given set of event categories.
 
std::vector< filescanner_type >::const_reverse_iterator const_reverse_iterator
 
std::vector< filescanner_type >::const_reference const_reference
 
std::vector< filescanner_type >::const_iterator const_iterator
 
size_t setEvtWeightFactor(const JEvtCategoryMap< JEvtWeightFactorHelper_t > &object, const bool requireAll=false)
Set event-weight factor of all MC-files according to a given map between event categories and event-w...
 
JEvtWeightFileScanner< JFileScanner_t > filescanner_type
 
bool put(const std::string &input)
Put file.
 
size_t put(const input_type &input)
Put files.
 
JEvtWeightFileScannerSet()
Default constructor.
 
JComparator_t compare
Function object for comparison of headers.
 
size_t setFlux(const JEvtCategorySet &categories, const JFluxHelper &flux, const bool requireAll=false)
Set flux function of all MC-files corresponding to a given set of event categories.
 
filescanner_type::input_type input_type
 
JEvtWeightFileScannerSet< JFileScanner_t, JComparator_t > filescannerset_type
 
std::vector< filescanner_type >::reference reference
 
std::vector< filescanner_type >::iterator iterator
 
std::vector< filescanner_type >::reverse_iterator reverse_iterator
 
Template event-weighter-associated file scanner.
 
JFileScanner_t::input_type input_type