Jpp
Public Types | Public Member Functions | Private Attributes | List of all members
JAANET::JWeightMupage Struct Reference

Implementation of event weighing for MUPAGE data. More...

#include <JWeightDAQ.hh>

Inheritance diagram for JAANET::JWeightMupage:
JLANG::JClonable< JClonable_t, JDerived_t > JLANG::JClonable< JClonable_t, JDerived_t >

Public Types

typedef JClonable< JClonable_t >::clone_type clone_type
 

Public Member Functions

virtual bool configure (const JHead &header)
 Configuration. More...
 
virtual double getWeight (const Evt &evt) const
 Get weight of given event. More...
 
virtual bool configure (const JHead &header)
 Configuration. More...
 
virtual double getWeight (const Evt &evt) const
 Get weight of given event. More...
 
virtual clone_type clone () const
 Get clone of this object. More...
 

Private Attributes

double W
 

Detailed Description

Implementation of event weighing for MUPAGE data.

Definition at line 12 of file JWeightDAQ.hh.

Member Typedef Documentation

◆ clone_type

template<class JClonable_t, class JDerived_t>
typedef JClonable<JClonable_t>::clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone_type
inherited

Definition at line 61 of file JClonable.hh.

Member Function Documentation

◆ configure() [1/2]

virtual bool JAANET::JWeightMupage::configure ( const JHead header)
inlinevirtual

Configuration.

Parameters
headerheader
Returns
true if okay; else false

Definition at line 21 of file JWeightDAQ.hh.

22  {
23  if (header.DAQ.livetime_s > 0.0) {
24 
25  W = 1.0 / header.DAQ.livetime_s;
26 
27  return true;
28 
29  } else {
30 
31  return false;
32  }
33  }

◆ getWeight() [1/2]

virtual double JAANET::JWeightMupage::getWeight ( const Evt evt) const
inlinevirtual

Get weight of given event.

Parameters
evtevent
Returns
weight [1/s]

Definition at line 41 of file JWeightDAQ.hh.

42  {
43  return W;
44  }

◆ configure() [2/2]

virtual bool JAANET::JWeightMupage::configure ( const JHead header)
inlinevirtual

Configuration.

Parameters
headerheader
Returns
true if okay; else false

Definition at line 21 of file JWeightMupage.hh.

22  {
23  if (header.livetime.numberOfSeconds > 0.0) {
24 
25  W = 1.0 / header.livetime.numberOfSeconds;
26 
27  return true;
28 
29  } else {
30 
31  return false;
32  }
33  }

◆ getWeight() [2/2]

virtual double JAANET::JWeightMupage::getWeight ( const Evt evt) const
inlinevirtual

Get weight of given event.

Parameters
evtevent
Returns
weight [1/s]

Definition at line 41 of file JWeightMupage.hh.

42  {
43  return W;
44  }

◆ clone()

template<class JClonable_t, class JDerived_t>
virtual clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone ( ) const
inlinevirtualinherited

Member Data Documentation

◆ W

double JAANET::JWeightMupage::W
private

Definition at line 47 of file JWeightDAQ.hh.


The documentation for this struct was generated from the following files:
JAANET::JWeightMupage::W
double W
Definition: JWeightDAQ.hh:47