Jpp
Public Types | Public Member Functions | Public Attributes | List of all members
JTRIGGER::JBuildL0< JHit_t > Class Template Reference

Template L0 hit builder. More...

#include <JBuildL0.hh>

Inheritance diagram for JTRIGGER::JBuildL0< JHit_t >:
JTRIGGER::JBuildHelper< JBuildL0< JHit_t > > JTRIGGER::JBuild< JHit_t >

Public Types

typedef JHit_t value_type
 
typedef JMatch< value_typematch_type
 

Public Member Functions

 JBuildL0 ()
 Default constructor. More...
 
template<class JOutput_t >
void operator() (const JSuperFrame2D< JHit_t > &input, JOutput_t out) const
 Build hits from calibrated data. More...
 
template<class JOutput_t >
void operator() (const JDAQSuperFrame &input, const JModule &module, JOutput_t out) const
 Build hits from uncalibrated DAQ data. More...
 
void operator() (const JDAQTimeslice &timeslice, const JModuleRouter &router, JOutput_t out) const
 Build hits from uncalibrated DAQ data. More...
 
void operator() (const JDAQEvent &event, const JModuleRouter &router, bool snapshot, JOutput_t out) const
 Build hits from uncalibrated DAQ data. More...
 
void operator() (const JDAQEvent &event, const JModuleRouter &router, JOutput_t out) const
 Build hits from uncalibrated DAQ data. More...
 
void setPreprocessor (const JPreprocessor::JOption_t option, const match_type &match)
 Set pre-processor. More...
 
JSuperFrame2D< JHit_t > & demultiplex (const JDAQSuperFrame &input, const JModule &module) const
 Demultiplex and pre-process DAQ super frame. More...
 

Public Attributes

JPreprocessor::JOption_t option
 pre-processor option More...
 
JLANG::JSharedPointer< match_typematch
 match criterion More...
 

Detailed Description

template<class JHit_t>
class JTRIGGER::JBuildL0< JHit_t >

Template L0 hit builder.

An L0 hit is a hit from a PMT.

Definition at line 34 of file JBuildL0.hh.

Member Typedef Documentation

◆ value_type

template<class JHit_t>
typedef JHit_t JTRIGGER::JBuildL0< JHit_t >::value_type

Definition at line 42 of file JBuildL0.hh.

◆ match_type

template<class JHit_t>
typedef JMatch<value_type> JTRIGGER::JBuild< JHit_t >::match_type
inherited

Definition at line 34 of file JBuild.hh.

Constructor & Destructor Documentation

◆ JBuildL0()

template<class JHit_t>
JTRIGGER::JBuildL0< JHit_t >::JBuildL0 ( )
inline

Default constructor.

Definition at line 48 of file JBuildL0.hh.

49  {}

Member Function Documentation

◆ operator()() [1/5]

template<class JHit_t>
template<class JOutput_t >
void JTRIGGER::JBuildL0< JHit_t >::operator() ( const JSuperFrame2D< JHit_t > &  input,
JOutput_t  out 
) const
inline

Build hits from calibrated data.

Note that the output data are not time sorted.

Parameters
inputinput L0 data
outoutput L0 data

Definition at line 61 of file JBuildL0.hh.

62  {
63  for (typename JSuperFrame2D<JHit_t>::const_iterator frame = input.begin(); frame != input.end(); ++frame) {
64 
65  int n = frame->u_size();
66 
67  for (typename JSuperFrame2D<JHit_t>::value_type::const_iterator i = frame->begin(); n != 0; ++i, --n) {
68  *out = *i;
69  ++out;
70  }
71  }
72  }

◆ operator()() [2/5]

template<class JHit_t>
template<class JOutput_t >
void JTRIGGER::JBuildL0< JHit_t >::operator() ( const JDAQSuperFrame input,
const JModule module,
JOutput_t  out 
) const
inline

Build hits from uncalibrated DAQ data.

The time calibration is applied. Note that the output data are not time sorted.

Parameters
inputDAQ super frame
modulemodule
outoutput L0 data

Definition at line 86 of file JBuildL0.hh.

89  {
90  if (!input.empty()) {
91  (*this)(this->demultiplex(input, module), out);
92  }
93  }

◆ operator()() [3/5]

void JTRIGGER::JBuildHelper< JBuildL0< JHit_t > >::operator() ( const JDAQTimeslice timeslice,
const JModuleRouter router,
JOutput_t  out 
) const
inlineinherited

Build hits from uncalibrated DAQ data.

The time calibration is applied. Note that the output data are not time sorted.

Parameters
timesliceDAQ time slice
routermodule router
outoutput data

Definition at line 57 of file JBuildHelper.hh.

60  {
61  for (JDAQTimeslice::const_iterator i = timeslice.begin(); i != timeslice.end(); ++i) {
62  if (router.hasModule(i->getModuleID())) {
63  static_cast<const JBuild_t&>(*this)(*i, router.getModule(i->getModuleID()), out);
64  }
65  }
66  }

◆ operator()() [4/5]

void JTRIGGER::JBuildHelper< JBuildL0< JHit_t > >::operator() ( const JDAQEvent event,
const JModuleRouter router,
bool  snapshot,
JOutput_t  out 
) const
inlineinherited

Build hits from uncalibrated DAQ data.

The time calibration is applied. Note that the output data are not time sorted.

Parameters
eventDAQ event
routermodule router
snapshotuse shapshot hits (else use triggered hits)
outoutput data

Definition at line 81 of file JBuildHelper.hh.

85  {
86  static_cast<const JBuild_t&>(*this)(JDAQTimeslice(event, snapshot), router, out);
87  }

◆ operator()() [5/5]

void JTRIGGER::JBuildHelper< JBuildL0< JHit_t > >::operator() ( const JDAQEvent event,
const JModuleRouter router,
JOutput_t  out 
) const
inlineinherited

Build hits from uncalibrated DAQ data.

The snapshot data of the DAQ event are used. The time calibration is applied. Note that the output data are not time sorted.

Parameters
eventDAQ event
routermodule router
outoutput data

Definition at line 102 of file JBuildHelper.hh.

105  {
106  static_cast<const JBuild_t&>(*this)(JDAQTimeslice(event, true), router, out);
107  }

◆ setPreprocessor()

template<class JHit_t>
void JTRIGGER::JBuild< JHit_t >::setPreprocessor ( const JPreprocessor::JOption_t  option,
const match_type match 
)
inlineinherited

Set pre-processor.

Parameters
optionoption
matchmatch criterion

Definition at line 52 of file JBuild.hh.

53  {
54  this->option = option;
55  this->match.reset(match.clone());
56  }

◆ demultiplex()

template<class JHit_t>
JSuperFrame2D<JHit_t>& JTRIGGER::JBuild< JHit_t >::demultiplex ( const JDAQSuperFrame input,
const JModule module 
) const
inlineinherited

Demultiplex and pre-process DAQ super frame.

Parameters
inputDAQ super frame
modulemodule data
Returns
2D super frame

Definition at line 66 of file JBuild.hh.

68  {
70 
71  if (match.is_valid()) {
72  buffer.preprocess(option, *match);
73  }
74 
75  return buffer;
76  }

Member Data Documentation

◆ option

template<class JHit_t>
JPreprocessor::JOption_t JTRIGGER::JBuild< JHit_t >::option
inherited

pre-processor option

Definition at line 78 of file JBuild.hh.

◆ match

template<class JHit_t>
JLANG::JSharedPointer<match_type> JTRIGGER::JBuild< JHit_t >::match
inherited

match criterion

Definition at line 79 of file JBuild.hh.


The documentation for this class was generated from the following file:
JTRIGGER::JSuperFrame2D::preprocess
void preprocess(JPreprocessor::JOption_t option, const match_type &match)
Pre-process data.
Definition: JSuperFrame2D.hh:136
JDETECTOR::JModuleRouter::getModule
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Definition: JModuleRouter.hh:89
JTOOLS::n
const int n
Definition: JPolint.hh:628
JTRIGGER::JFrame::const_iterator
container_type::const_iterator const_iterator
Definition: JFrame.hh:45
JTRIGGER::JSuperFrame2D::demultiplex
static JSuperFrame2D< JElement_t, JAllocator_t > demultiplex
Demultiplexer.
Definition: JSuperFrame2D.hh:161
KM3NETDAQ::JDAQFrame::empty
bool empty() const
Definition: JDAQFrame.hh:152
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
KM3NETDAQ::JDAQTimeslice
Data time slice.
Definition: JDAQTimeslice.hh:30
JTRIGGER::JSuperFrame2D::const_iterator
std::vector< value_type >::const_iterator const_iterator
Definition: JSuperFrame2D.hh:51
JDETECTOR::JModuleRouter::hasModule
bool hasModule(const JObjectID &id) const
Has module.
Definition: JModuleRouter.hh:101
JLANG::JSharedPointer::reset
virtual void reset()
Reset pointer.
Definition: JSharedPointer.hh:171
JTRIGGER::JBuild::match
JLANG::JSharedPointer< match_type > match
match criterion
Definition: JBuild.hh:79
JTRIGGER::JSuperFrame2D
2-dimensional frame with time calibrated data from one optical module.
Definition: JSuperFrame2D.hh:41
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