Jpp  16.0.0-rc.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
JTRIGGER::JBuildHelper< JBuild_t > Struct Template Reference

Auxiliary class to extend hit building functionality to all DAQ data types. More...

#include <JBuildHelper.hh>

Public Member Functions

template<class JOutput_t >
void operator() (const JDAQTimeslice &timeslice, const JModuleRouter &router, JOutput_t out) const
 Build hits from uncalibrated DAQ data. More...
 
template<class JOutput_t >
void operator() (const JDAQEvent &event, const JModuleRouter &router, const bool snapshot, JOutput_t out) const
 Build hits from uncalibrated DAQ data. More...
 
template<class JOutput_t >
void operator() (const JDAQEvent &event, const JModuleRouter &router, JOutput_t out) const
 Build hits from uncalibrated DAQ data. More...
 

Detailed Description

template<class JBuild_t>
struct JTRIGGER::JBuildHelper< JBuild_t >

Auxiliary class to extend hit building functionality to all DAQ data types.


The implementation of this functionality is based on a static cast of the given template parameter (known as "curiously recurring template pattern").
The template parameter should refer to a class which provides for an implementation of the following operator:

     template<class JOutput_t>
     void operator()(const JDAQSuperFrame& super_frame,
                     const JModule&        module,
                     JOutput_t             out) const

where out refers to an STL compatible output iterator.
The data type of the JBuild_t class corresponds to the pointed-to element of the output iterator.

Definition at line 44 of file JBuildHelper.hh.

Member Function Documentation

template<class JBuild_t>
template<class JOutput_t >
void JTRIGGER::JBuildHelper< JBuild_t >::operator() ( const JDAQTimeslice timeslice,
const JModuleRouter router,
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
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  }
const JModule & getModule(const JObjectID &id) const
Get module parameters.
bool hasModule(const JObjectID &id) const
Has module.
template<class JBuild_t>
template<class JOutput_t >
void JTRIGGER::JBuildHelper< JBuild_t >::operator() ( const JDAQEvent event,
const JModuleRouter router,
const bool  snapshot,
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
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  }
Data time slice.
template<class JBuild_t>
template<class JOutput_t >
void JTRIGGER::JBuildHelper< JBuild_t >::operator() ( const JDAQEvent event,
const JModuleRouter router,
JOutput_t  out 
) const
inline

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  }
Data time slice.

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