Implementation of event weighing for DAQ data.  
 More...
#include <JEvtWeightDAQ.hh>
 | 
|   | JEvtWeightDAQ () | 
|   | Default constructor.  
  | 
|   | 
|   | JEvtWeightDAQ (const JHead &header) | 
|   | Constructor.  
  | 
|   | 
| const char *const  | getName () const override final | 
|   | Get name.  
  | 
|   | 
| void  | configure (const JHead &header) override final | 
|   | Configuration.  
  | 
|   | 
| bool  | check (const JHead &header) const override final | 
|   | Check whether header is consistent with this event weighter.  
  | 
|   | 
| double  | getWeight (const Evt &evt) const override final | 
|   | Get weight of given event.  
  | 
|   | 
| virtual clone_type  | clone () const override | 
|   | Get clone of this object.  
  | 
|   | 
Implementation of event weighing for DAQ data. 
Definition at line 32 of file JEvtWeightDAQ.hh.
 
◆ clone_type
template<class JClonable_t , class JDerived_t > 
 
 
◆ JEvtWeightDAQ() [1/2]
  
  
      
        
          | JAANET::JEvtWeightDAQ::JEvtWeightDAQ  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JEvtWeightDAQ() [2/2]
  
  
      
        
          | JAANET::JEvtWeightDAQ::JEvtWeightDAQ  | 
          ( | 
          const JHead & |           header | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 47 of file JEvtWeightDAQ.hh.
   48    {
   50    }
void configure(const JHead &header) override final
Configuration.
 
 
 
 
◆ getName()
  
  
      
        
          | const char *const JAANET::JEvtWeightDAQ::getName  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinefinaloverride   | 
  
 
Get name. 
- Returns
 - name 
 
Definition at line 58 of file JEvtWeightDAQ.hh.
   59    {
   60      return "DAQ";
   61    }
 
 
 
◆ configure()
  
  
      
        
          | void JAANET::JEvtWeightDAQ::configure  | 
          ( | 
          const JHead & |           header | ) | 
           | 
         
       
   | 
  
inlinefinaloverride   | 
  
 
Configuration. 
- Parameters
 - 
  
  
 
Definition at line 69 of file JEvtWeightDAQ.hh.
   70    {
   72      
   74 
   75        setNormalisation(1.0 / header.DAQ.livetime_s);
   76 
   77      } else {
   78        
   79        THROW(
JValueOutOfRange, 
"JEvtWeightDAQ::configure(): Provided header is inconsistent with a DAQ-header.");
 
   80      }
   81    }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
 
Exception for accessing a value in a collection that is outside of its range.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
bool check(const JHead &header) const override final
Check whether header is consistent with this event weighter.
 
 
 
 
◆ check()
  
  
      
        
          | bool JAANET::JEvtWeightDAQ::check  | 
          ( | 
          const JHead & |           header | ) | 
           const | 
         
       
   | 
  
inlinefinaloverride   | 
  
 
Check whether header is consistent with this event weighter. 
- Parameters
 - 
  
  
 
- Returns
 - true if consistent; else false 
 
Definition at line 90 of file JEvtWeightDAQ.hh.
   91    {
   93    }
bool is_daq(const JHead &header)
Check for real data.
 
 
 
 
◆ getWeight()
  
  
      
        
          | double JAANET::JEvtWeightDAQ::getWeight  | 
          ( | 
          const Evt & |           evt | ) | 
           const | 
         
       
   | 
  
inlinefinaloverride   | 
  
 
Get weight of given event. 
- Parameters
 - 
  
  
 
- Returns
 - weight [1/s] 
 
Definition at line 102 of file JEvtWeightDAQ.hh.
  103    {
  106      } else {
  107        return getNormalisation(evt);
  108      }
  109    }
std::vector< double > w
MC: Weights w[0]=w1, w[1]=w2, w[2]=w3 (see e.g. Tag list or km3net-dataformat/definitions)
 
static const int WEIGHTLIST_RESCALED_EVENT_RATE
Rescaled event rate [s-1].
 
 
 
 
◆ clone()
template<class JClonable_t , class JDerived_t > 
  
  | 
      
   | 
  
inlineoverridevirtualinherited   | 
  
 
Get clone of this object. 
- Returns
 - pointer to newly created object 
 
Reimplemented in JPHYSICS::JPD0Transformer_t< JArgument_t >, JPHYSICS::JPDFTransformer< 2, JArgument_t >, JPHYSICS::JPDFTransformer< 3, JArgument_t >, JPHYSICS::JPDFTransformer< 4, JArgument_t >, JPHYSICS::JPDFTransformer< 5, JArgument_t >, JPHYSICS::JPDFTransformer_t< JArgument_t >, JPHYSICS::JPDGTransformer_t< JArgument_t >, and JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer.
Definition at line 69 of file JClonable.hh.
   70    {
   71      return new JDerived_t(static_cast<const JDerived_t&>(*this));
   72    }
 
 
 
The documentation for this struct was generated from the following file: