Jpp
JEvtEvaluator.hh
Go to the documentation of this file.
1 #ifndef __JEVTEVALUATOR__
2 #define __JEVTEVALUATOR__
3 
5 
6 #include "JDAQ/JDAQHeader.hh"
7 #include "JDAQ/JDAQEvent.hh"
8 
9 /**
10  * \author mlincetto
11  */
12 
13 namespace JAANET {}
14 namespace JPP { using namespace JAANET; }
15 
16 namespace JAANET {
17 
18  /**
19  * Auxiliary class to determine value of Evt objects.
20  */
21  struct JEvtEvaluator {
22  /**
23  * Default constructor.
24  */
26  {}
27 
28 
29  /**
30  * Get value of event.
31  *
32  * \param event event
33  * \return value
34  */
35  inline double operator()(const Evt& event) const
36  {
37  if (!event.mc_trks.empty())
38  return event.mc_trks[0].t;
39  else
40  return 0.0;
41  } // ()
42 
43  }; // struct JEvtEvaluator
44 
45  /**
46  * Function object for evaluation of DAQ objects.
47  */
48  static const JEvtEvaluator getEvtValue;
49 
50 } // namespace
51 
52 #endif
JAANET::JEvtEvaluator
Auxiliary class to determine value of Evt objects.
Definition: JEvtEvaluator.hh:21
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JAANET::JEvtEvaluator::operator()
double operator()(const Evt &event) const
Get value of event.
Definition: JEvtEvaluator.hh:35
JAAnetToolkit.hh
JDAQHeader.hh
JAANET::JEvtEvaluator::JEvtEvaluator
JEvtEvaluator()
Default constructor.
Definition: JEvtEvaluator.hh:25
JAANET
Extensions to AAnet data format.
Definition: JAAnetToolkit.hh:36
JDAQEvent.hh
JAANET::getEvtValue
static const JEvtEvaluator getEvtValue
Function object for evaluation of DAQ objects.
Definition: JEvtEvaluator.hh:48