1 #ifndef __JSUPPORT__JEVTWEIGHTFILESCANNER__  
    2 #define __JSUPPORT__JEVTWEIGHTFILESCANNER__  
   51   template<
class JFileScanner_t = JMultipleFileScanner<Evt> >
 
  110       static const char SEPARATOR = 
'.';
 
  114       if (header.simul.size() > 0) {
 
  116         string name = header.simul.cbegin()->program;
 
  126         THROW(
JNoValue, 
"JEvtWeightFileScanner::getProgramName(): Missing simul header-field!");
 
  139       JFileScanner_t  ::clear();
 
  153       for (
typename input_type::const_iterator i = input.begin(); i != input.end(); ++i) {
 
  154         n += size_t(this->
put(*i));
 
  173       if (this->
check(head)) {
 
  176         JFileScanner_t  ::push_back(input);
 
  199     template<
class JEvtWeightFactor_t = JEvtWeightFactor>
 
  201                             const JEvtWeightFactor_t& factor)
 
  214       if ((header.primary.type == type)                       ||
 
  216           (header.flux.size() == 1 && i != header.flux.end())) {
 
  218         JEvtWeightFactorHelper_t* helper = 
dynamic_cast<JEvtWeightFactorHelper_t*
>(this->
get());
 
  220         if (helper != NULL) {
 
  222           helper->configure(factor);
 
  245     template<
class JEvtWeightFactor_t = JEvtWeightFactor>
 
  247                             const JEvtWeightFactor_t& factor)
 
  254       bool matching = (!types.empty());
 
  264         matching = (flux != header.flux.cend());
 
  269         JEvtWeightFactorHelper_t* helper = 
dynamic_cast<JEvtWeightFactorHelper_t*
>(this->
get());
 
  271         if (helper != NULL) {
 
  273           helper->configure(factor);
 
  294     template<
class JEvtWeightFactor_t = JEvtWeightFactor>
 
  302       typedef typename JEvtWeightFactorMultiParticle_t::const_iterator    const_iterator;
 
  304       bool matching = (!multiParticleFactor.empty());
 
  308       for (const_iterator i = multiParticleFactor.cbegin(); i != multiParticleFactor.cend() && matching; ++i) {
 
  314         matching = (flux != header.flux.cend());
 
  319         JEvtWeightFactorHelper_t* helper = 
dynamic_cast<JEvtWeightFactorHelper_t*
>(this->
get());
 
  321         if (helper != NULL) {
 
  323           helper->configure(multiParticleFactor);
 
  343                  const JFlux& 
function)
 
  345       return setEvtWeightFactor<JFlux>(type, 
function);
 
  360                  const JFlux&         
function)
 
  362       return setEvtWeightFactor<JFlux>(types, 
function);
 
  377       return setEvtWeightFactor<JFlux>(multiParticleFlux);
 
bool is_mupage(const JHead &header)
Check for generator. 
 
JEvtWeighter getEventWeighter
Function object for mapping header to event weighter. 
 
void configure(const JEvtWeight &weighter)
Configuration. 
 
void reset(const JEvtWeight &weighter)
Reset file scanner and event weighter. 
 
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member. 
 
bool setFlux(const std::set< int > &types, const JFlux &function)
Set flux function corresponding to a given set of PDG codes. 
 
bool setEvtWeightFactor(const int type, const JEvtWeightFactor_t &factor)
Set event-weight factor corresponding to a given PDG code. 
 
const JHead & getHeader() const 
Get header. 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
bool check(const JHead &header) const 
Check if a given header is consistent with this event weighter. 
 
then echo Enter input within $TIMEOUT_S seconds echo n User name
 
JEvtWeightFileScanner(const input_type &input)
Constructor. 
 
#define MAKE_STRING(A)
Make string. 
 
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header. 
 
Exception for missing value. 
 
Abstract base class for event weighing. 
 
bool setEvtWeightFactor(const JEvtWeightFactorMultiParticle< JEvtWeightFactor_t > &multiParticleFactor)
Set event-weight factor corresponding to a given multi-particle weighting factor interface. 
 
Implementation of event-weight factor for multiple particle types. 
 
Helper class for event-weight factor. 
 
bool setFlux(const int type, const JFlux &function)
Set flux function corresponding to a given PDG code. 
 
Low-level interface for retrieving the flux corresponding to a given event. 
 
Scanning of objects from multiple files according a format that follows from the extension of each fi...
 
JFileScanner_t::input_type input_type
 
JEvtWeightFileScanner()
Default constructor. 
 
bool put(const std::string &input)
Put file. 
 
size_t put(const input_type &input)
Put files. 
 
Template event-weighter-associated file scanner. 
 
virtual void reset() override
Reset pointer. 
 
Low-level interface for retrieving a specifiable multiplication factor corresponding to a given event...
 
bool setFlux(const JEvtWeightFactorMultiParticle< JFlux > &multiParticleFlux)
Set flux function corresponding to a given multi-particle flux interface. 
 
bool setEvtWeightFactor(const std::set< int > &types, const JEvtWeightFactor_t &factor)
Set event-weight factor corresponding to a given set of PDG codes. 
 
Helper class for event weighing. 
 
void add(const JHead &header)
Add header. 
 
JEvtWeightFileScanner(const JEvtWeight &weighter)
Constructor. 
 
std::string getProgramName() const 
Get name of simulation program.