Jpp  18.3.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JEventToolkit.hh
Go to the documentation of this file.
1 #ifndef __JTRIGGER__JEVENTTOOLKIT__
2 #define __JTRIGGER__JEVENTTOOLKIT__
3 
4 #include "JTrigger/JEvent.hh"
6 
7 
8 /**
9  * \author mdejong
10  */
11 
12 namespace JTRIGGER {}
13 namespace JPP { using namespace JTRIGGER; }
14 
15 namespace JTRIGGER {
16 
18 
19 
20  /**
21  * Get time range (i.e.\ earlist and latest hit time) of triggered event.
22  *
23  * \param event event
24  * \return time range
25  */
26  inline JTimeRange getTimeRange(const JEvent& event)
27  {
28  if (!event.empty())
29  return JTimeRange(event.begin()->getT(), event.rbegin()->getT());
30  else
32  }
33 }
34 
35 #endif
JTimeRange getTimeRange(const Evt &event)
Get time range (i.e. time between earliest and latest hit) of Monte Carlo event.
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [ns]).
static JRange< double, std::less< double > > DEFAULT_RANGE()
Default range.
Definition: JRange.hh:555
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [s]).
Triggered event.