DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::crtmodules Namespace Reference

Namespaces

namespace  opmon
 
namespace  python
 

Classes

class  SourceConcept
 
class  SourceModel
 

Functions

std::shared_ptr< SourceConceptcreateSourceModel (const appmodel::DataMoveCallbackConf *conf)
 

Function Documentation

◆ createSourceModel()

std::shared_ptr< SourceConcept > dunedaq::crtmodules::createSourceModel ( const appmodel::DataMoveCallbackConf * conf)

Definition at line 29 of file CreateSource.hpp.

30{
31 auto datatype = conf->get_data_type();
32 TLOG() << "Choosing specializations for SourceModel for output connection "
33 << " [uid:" << conf->UID() << " , data_type:" << datatype << ']';
34
35 if (datatype.find("CRTBernFrame") != std::string::npos) {
36 auto source_model = std::make_shared<SourceModel<fdreadoutlibs::types::CRTBernTypeAdapter>>();
37 source_model->set_sink_config(conf);
38 return source_model;
39 } else if (datatype.find("CRTGrenobleFrame") != std::string::npos) {
40 auto source_model = std::make_shared<SourceModel<fdreadoutlibs::types::CRTGrenobleTypeAdapter>>();
41 source_model->set_sink_config(conf);
42 return source_model;
43 }
44
45 return nullptr;
46}
const std::string & get_data_type() const
Get "data_type" attribute value. Name of the output data type. Should be defined via a call to DUNE_D...
const std::string & UID() const noexcept
#define TLOG(...)
Definition macro.hpp:22