Jpp
JBuild.hh
Go to the documentation of this file.
1 #ifndef __JTRIGGER__JBUILD__
2 #define __JTRIGGER__JBUILD__
3 
5 #include "JDAQ/JDAQSuperFrame.hh"
6 #include "JDetector/JModule.hh"
9 #include "JTrigger/JMatch.hh"
10 
11 
12 /**
13  * \author mdejong
14  */
15 
16 namespace JTRIGGER {}
17 namespace JPP { using namespace JTRIGGER; }
18 
19 namespace JTRIGGER {
20 
22  using JDETECTOR::JModule;
23 
24 
25  /**
26  * Auxiliary base class for hit building.\n
27  * This class provides for a configurable method to pre-process hits.
28  * The action is subsequently transferred to JSuperFrame2D.
29  */
30  template<class JHit_t>
31  struct JBuild {
32 
33  typedef JHit_t value_type;
35 
36  /**
37  * Default constructor.
38  *
39  * The default corresponds to no pre-processing of hits.
40  */
41  JBuild() :
42  option(JPreprocessor::none_t)
43  {}
44 
45 
46  /**
47  * Set pre-processor.
48  *
49  * \param option option
50  * \param match match criterion
51  */
53  {
54  this->option = option;
55  this->match.reset(match.clone());
56  }
57 
58 
59  /**
60  * Demultiplex and pre-process DAQ super frame.
61  *
62  * \param input DAQ super frame
63  * \param module module data
64  * \return 2D super frame
65  */
67  const JModule& module) const
68  {
70 
71  if (match.is_valid()) {
72  buffer.preprocess(option, *match);
73  }
74 
75  return buffer;
76  }
77 
78  JPreprocessor::JOption_t option; //!< pre-processor option
80  };
81 }
82 
83 #endif
JModule.hh
JPreprocessor.hh
JTRIGGER::JSuperFrame2D::preprocess
void preprocess(JPreprocessor::JOption_t option, const match_type &match)
Pre-process data.
Definition: JSuperFrame2D.hh:136
JTRIGGER::JMatch
Function object interface for hit matching.
Definition: JMatch.hh:25
JSuperFrame2D.hh
JTRIGGER::JBuild::match_type
JMatch< value_type > match_type
Definition: JBuild.hh:34
JTRIGGER::JBuild::setPreprocessor
void setPreprocessor(const JPreprocessor::JOption_t option, const match_type &match)
Set pre-processor.
Definition: JBuild.hh:52
JSharedPointer.hh
JTRIGGER::JSuperFrame2D::demultiplex
static JSuperFrame2D< JElement_t, JAllocator_t > demultiplex
Demultiplexer.
Definition: JSuperFrame2D.hh:161
JTRIGGER::JBuild::demultiplex
JSuperFrame2D< JHit_t > & demultiplex(const JDAQSuperFrame &input, const JModule &module) const
Demultiplex and pre-process DAQ super frame.
Definition: JBuild.hh:66
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JDETECTOR::JModule
Data structure for a composite optical module.
Definition: JModule.hh:49
JTRIGGER::JBuild::JBuild
JBuild()
Default constructor.
Definition: JBuild.hh:41
JTRIGGER::JBuild
Auxiliary base class for hit building.
Definition: JBuild.hh:31
JTRIGGER::JPreprocessor::JOption_t
JOption_t
Preprocessing options.
Definition: JPreprocessor.hh:37
JMatch.hh
JDAQSuperFrame.hh
KM3NETDAQ::JDAQSuperFrame
Data frame of one optical module.
Definition: JDAQSuperFrame.hh:27
JTRIGGER::JBuild::match
JLANG::JSharedPointer< match_type > match
match criterion
Definition: JBuild.hh:79
JTRIGGER::JBuild::value_type
JHit_t value_type
Definition: JBuild.hh:33
JTRIGGER
Checksum.
Definition: JSupport/JSupport.hh:35
JTRIGGER::JPreprocessor
Auxiliary class for specifying the way of pre-processing of hits.
Definition: JPreprocessor.hh:31
JTRIGGER::JSuperFrame2D
2-dimensional frame with time calibrated data from one optical module.
Definition: JSuperFrame2D.hh:41
JLANG::JSharedPointer< match_type >
JLANG::JAbstractPointer::is_valid
bool is_valid() const
Check validity of pointer.
Definition: JAbstractPointer.hh:83
JTRIGGER::JBuild::option
JPreprocessor::JOption_t option
pre-processor option
Definition: JBuild.hh:78