Jpp  17.3.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JDAQHitSelector.hh
Go to the documentation of this file.
1 #ifndef __JTRIGGER__JDAQHITSELECTOR__
2 #define __JTRIGGER__JDAQHITSELECTOR__
3 
5 
6 #include "JLang/JClonable.hh"
7 
8 
9 /**
10  * \author mdejong
11  */
12 
13 namespace JTRIGGER {}
14 namespace JPP { using namespace JTRIGGER; }
15 
16 namespace JTRIGGER {
17 
18  using KM3NETDAQ::JDAQHit;
19  using JLANG::JClonable;
20 
21 
22  /**
23  * Auxiliary class to select DAQ hits.
24  */
25  struct JDAQHitSelector :
26  public JClonable<JDAQHitSelector>
27  {
28  /**
29  * Virtual destructor.
30  */
31  virtual ~JDAQHitSelector()
32  {}
33 
34 
35  /**
36  * DAQ hit selection.
37  *
38  * \param hit DAQ hit
39  * \return true to select; else false
40  */
41  virtual bool operator()(const JDAQHit& hit) const = 0;
42  };
43 
44 
45  /**
46  * Default class to select DAQ hits.
47  */
48  struct JDAQHitDefaultSelector final :
49  public JClonable<JDAQHitSelector, JDAQHitDefaultSelector>
50  {
51  /**
52  * DAQ hit selection.
53  *
54  * \param hit DAQ hit
55  * \return true to select; else false
56  */
57  virtual bool operator()(const JDAQHit& hit) const override
58  {
59  return true;
60  }
61  };
62 }
63 
64 #endif
virtual bool operator()(const JDAQHit &hit) const =0
DAQ hit selection.
Default class to select DAQ hits.
Hit data structure.
Definition: JDAQHit.hh:34
Template class for object cloning.
Definition: JClonable.hh:20
virtual ~JDAQHitSelector()
Virtual destructor.
virtual bool operator()(const JDAQHit &hit) const override
DAQ hit selection.
Auxiliary class to select DAQ hits.