Jpp 21.0.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JBuild.hh
Go to the documentation of this file.
1#ifndef __JTRIGGER__JBUILD__
2#define __JTRIGGER__JBUILD__
3
4#include <memory>
5
11#include "JTrigger/JMatch.hh"
12
13
14/**
15 * \author mdejong
16 */
17
18namespace JTRIGGER {}
19namespace JPP { using namespace JTRIGGER; }
20
21namespace JTRIGGER {
22
25
26
27 /**
28 * Auxiliary base class for hit building.
29 *
30 * This class provides for
31 * - a configurable selection of DAQ hits; and
32 * - a configurable method to pre-process consecutive hits.
33 *
34 * The underlying action is subsequently transferred to JSuperFrame2D.
35 */
36 template<class JHit_t>
37 struct JBuild {
38
42
43 /**
44 * Default constructor.
45 *
46 * The default corresponds to no pre-processing of hits.
47 */
49 option(JPreprocessor::none_t),
51 {}
52
53
54 /**
55 * Set pre-processor of consecutive hits.
56 *
57 * \param option option
58 * \param match match criterion
59 */
61 {
62 this->option = option;
63 this->match.reset(match.clone());
64 }
65
66
67 /**
68 * Reset pre-processor of consecutive hits.
69 */
71 {
73 this->match.reset();
74 }
75
76
77 /**
78 * Set DAQ hit selector.
79 *
80 * \param selector DAQ hit selector
81 */
83 {
84 this->selector.reset(selector.clone());
85 }
86
87
88 /**
89 * Reset DAQ hit selector.
90 */
92 {
93 this->selector.reset(new JDAQHitDefaultSelector());
94 }
95
96
97 /**
98 * Demultiplex and pre-process DAQ super frame.
99 *
100 * \param input DAQ super frame
101 * \param module module data
102 * \return 2D super frame
103 */
105 const JModule& module) const
106 {
108
109 if (match) {
110 buffer.preprocess(option, *match);
111 }
112
113 return buffer;
114 }
115
116 JPreprocessor::JOption_t option; //!< pre-processor option
117 std::shared_ptr<match_type> match; //!< pre-processor match criterion
118 std::shared_ptr<selector_type> selector; //!< DAQ hit selector
119 };
120}
121
122#endif
Base class for match operations for cluster and hit-preprocessing methods.
Data structure for optical module.
Auxiliaries for pre-processing of hits.
Data structure for a composite optical module.
Definition JModule.hh:76
Function object interface for hit matching.
Definition JMatch.hh:27
2-dimensional frame with time calibrated data from one optical module.
static JSuperFrame2D< JElement_t, JAllocator_t > demultiplex
Demultiplexer.
void preprocess(JPreprocessor::JOption_t option, const match_type &match)
Pre-process data.
Data frame of one optical module.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for triggering.
Auxiliary class to set-up Hit.
Definition JSirene.hh:60
Auxiliary base class for hit building.
Definition JBuild.hh:37
void setDAQHitSelector(const JDAQHitSelector &selector)
Set DAQ hit selector.
Definition JBuild.hh:82
JSuperFrame2D< JHit_t > & demultiplex(const JDAQSuperFrame &input, const JModule &module) const
Demultiplex and pre-process DAQ super frame.
Definition JBuild.hh:104
std::shared_ptr< selector_type > selector
DAQ hit selector.
Definition JBuild.hh:118
JDAQHitSelector selector_type
Definition JBuild.hh:41
void resetDAQHitSelector()
Reset DAQ hit selector.
Definition JBuild.hh:91
JPreprocessor::JOption_t option
pre-processor option
Definition JBuild.hh:116
void setPreprocessor(const JPreprocessor::JOption_t option, const match_type &match)
Set pre-processor of consecutive hits.
Definition JBuild.hh:60
std::shared_ptr< match_type > match
pre-processor match criterion
Definition JBuild.hh:117
JBuild()
Default constructor.
Definition JBuild.hh:48
void resetPreprocessor()
Reset pre-processor of consecutive hits.
Definition JBuild.hh:70
JMatch< value_type > match_type
Definition JBuild.hh:40
JHit_t value_type
Definition JBuild.hh:39
Default class to select DAQ hits.
Auxiliary class to select DAQ hits.
Auxiliary class for specifying the way of pre-processing of hits.
JOption_t
Preprocessing options.
@ none_t
no pre-processing