Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JTRIGGER::JBuildL0< JHitR1 > Class Reference

Template specialisation of L0 builder for JHitR1 data type. More...

#include <JBuildL0.hh>

Inheritance diagram for JTRIGGER::JBuildL0< JHitR1 >:
JTRIGGER::JBuildHelper< JBuildL0< JHitR1 > > JTRIGGER::JBuild< JHit >

Public Types

typedef JHitR1 value_type
 
typedef JMatch< value_typematch_type
 
typedef JDAQHitSelector selector_type
 

Public Member Functions

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

Public Attributes

JPreprocessor::JOption_t option
 pre-processor option
 
JLANG::JSharedPointer< match_typematch
 pre-processor match criterion
 
JLANG::JSharedPointer< selector_typeselector
 DAQ hit selector.
 

Detailed Description

Template specialisation of L0 builder for JHitR1 data type.

Definition at line 245 of file JBuildL0.hh.

Member Typedef Documentation

◆ value_type

Definition at line 253 of file JBuildL0.hh.

◆ match_type

JMatch<value_type> JTRIGGER::JBuild< JHit >::match_type
inherited

Definition at line 39 of file JBuild.hh.

◆ selector_type

JDAQHitSelector JTRIGGER::JBuild< JHit >::selector_type
inherited

Definition at line 40 of file JBuild.hh.

Constructor & Destructor Documentation

◆ JBuildL0()

Default constructor.

Definition at line 259 of file JBuildL0.hh.

260 {}

Member Function Documentation

◆ operator()() [1/5]

template<class JOutput_t >
void JTRIGGER::JBuildL0< JHitR1 >::operator() ( const JSuperFrame2D< JHit > & 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 272 of file JBuildL0.hh.

273 {
274 using namespace JPP;
275
276 for (typename JSuperFrame2D<JHit>::const_iterator frame = input.begin(); frame != input.end(); ++frame) {
277
278 const JDAQModuleIdentifier& id = frame->getModuleIdentifier();
279 const JPosition3D& pos = frame->getPosition();
280
281 int n = frame->size();
282
283 for (typename JSuperFrame2D<JHit>::value_type::const_iterator i = frame->begin(); n != 0; ++i, --n) {
284 *out = JHitR1(id, pos, *i);
285 ++out;
286 }
287 }
288 }
Data structure for position in three dimensions.
const JPosition3D & getPosition() const
Get position.
container_type::const_iterator const_iterator
Definition JFrame.hh:46
Reduced data structure for L1 hit.
Definition JHitR1.hh:35
std::vector< value_type >::const_iterator const_iterator
const JDAQModuleIdentifier & getModuleIdentifier() const
Get Module identifier.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
const int n
Definition JPolint.hh:791

◆ operator()() [2/5]

template<class JOutput_t >
void JTRIGGER::JBuildL0< JHitR1 >::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 302 of file JBuildL0.hh.

305 {
306 if (!input.empty()) {
307 (*this)(this->demultiplex(input, module), out);
308 }
309 }
bool empty() const
Definition JDAQFrame.hh:181
JSuperFrame2D< JHit > & demultiplex(const JDAQSuperFrame &input, const JModule &module) const
Definition JBuild.hh:103

◆ operator()() [3/5]

void JTRIGGER::JBuildHelper< JBuildL0< JHitR1 > >::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 }
bool hasModule(const JObjectID &id) const
Has module.
const JModule & getModule(const JObjectID &id) const
Get module parameters.

◆ operator()() [4/5]

void JTRIGGER::JBuildHelper< JBuildL0< JHitR1 > >::operator() ( const JDAQEvent & event,
const JModuleRouter & router,
const 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< JHitR1 > >::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()

void JTRIGGER::JBuild< JHit >::setPreprocessor ( const JPreprocessor::JOption_t option,
const match_type & match )
inlineinherited

Set pre-processor of consecutive hits.

Parameters
optionoption
matchmatch criterion

Definition at line 59 of file JBuild.hh.

60 {
61 this->option = option;
62 this->match.reset(match.clone());
63 }
virtual void reset() override
Reset pointer.
JPreprocessor::JOption_t option
Definition JBuild.hh:115
JLANG::JSharedPointer< match_type > match
Definition JBuild.hh:116

◆ resetPreprocessor()

void JTRIGGER::JBuild< JHit >::resetPreprocessor ( )
inlineinherited

Reset pre-processor of consecutive hits.

Definition at line 69 of file JBuild.hh.

70 {
72 this->match.reset();
73 }
@ none_t
no pre-processing

◆ setDAQHitSelector()

void JTRIGGER::JBuild< JHit >::setDAQHitSelector ( const JDAQHitSelector & selector)
inlineinherited

Set DAQ hit selector.

Parameters
selectorDAQ hit selector

Definition at line 81 of file JBuild.hh.

82 {
83 this->selector.reset(selector.clone());
84 }
JLANG::JSharedPointer< selector_type > selector
Definition JBuild.hh:117

◆ resetDAQHitSelector()

void JTRIGGER::JBuild< JHit >::resetDAQHitSelector ( )
inlineinherited

Reset DAQ hit selector.

Definition at line 90 of file JBuild.hh.

91 {
92 this->selector.reset(new JDAQHitDefaultSelector());
93 }
Default class to select DAQ hits.

◆ demultiplex()

JSuperFrame2D< JHit > & JTRIGGER::JBuild< JHit >::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 103 of file JBuild.hh.

105 {
107
108 if (match.is_valid()) {
109 buffer.preprocess(option, *match);
110 }
111
112 return buffer;
113 }
bool is_valid() const
Check validity of pointer.
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.

Member Data Documentation

◆ option

pre-processor option

Definition at line 115 of file JBuild.hh.

◆ match

pre-processor match criterion

Definition at line 116 of file JBuild.hh.

◆ selector

DAQ hit selector.

Definition at line 117 of file JBuild.hh.


The documentation for this class was generated from the following file: