DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dpdklibs
src
CreateSource.hpp
Go to the documentation of this file.
1
8
#ifndef DPDKLIBS_SRC_CREATESOURCE_HPP_
9
#define DPDKLIBS_SRC_CREATESOURCE_HPP_
10
11
#include "
SourceConcept.hpp
"
12
#include "
SourceModel.hpp
"
13
#include "
datahandlinglibs/DataHandlingIssues.hpp
"
14
15
#include "
fdreadoutlibs/DUNEWIBEthTypeAdapter.hpp
"
16
#include "
fdreadoutlibs/TDEEthTypeAdapter.hpp
"
17
#include "
fdreadoutlibs/DAPHNEEthTypeAdapter.hpp
"
18
#include "
fdreadoutlibs/DAPHNEEthStreamTypeAdapter.hpp
"
19
20
#include <memory>
21
#include <string>
22
23
namespace
dunedaq
{
24
25
DUNE_DAQ_TYPESTRING
(dunedaq::fdreadoutlibs::types::DUNEWIBEthTypeAdapter,
"WIBEthFrame"
)
26
DUNE_DAQ_TYPESTRING
(dunedaq::
fdreadoutlibs
::types::TDEEthTypeAdapter,
"TDEEthFrame"
)
27
DUNE_DAQ_TYPESTRING
(dunedaq::
fdreadoutlibs
::types::DAPHNEEthTypeAdapter,
"DAPHNEEthFrame"
)
28
29
namespace
dpdklibs
{
30
31
std::shared_ptr<SourceConcept>
32
createSourceModel
(
const
appmodel::DataMoveCallbackConf
* conf)
33
{
34
35
auto
datatype = conf->
get_data_type
();
36
TLOG
() <<
"Choosing specializations for SourceModel for output connection "
37
<<
" [uid:"
<< conf->
UID
() <<
" , data_type:"
<< datatype <<
']'
;
38
39
if
(datatype.find(
"WIBEthFrame"
) != std::string::npos) {
40
// Create Model
41
auto
source_model = std::make_shared<SourceModel<fdreadoutlibs::types::DUNEWIBEthTypeAdapter>>();
42
43
// For callback acquisition later (lazy)
44
source_model->set_sink_config(conf);
45
46
// Return with setup model
47
return
source_model;
48
49
}
else
if
(datatype.find(
"TDEEthFrame"
) != std::string::npos) {
50
51
// Create Model
52
auto
source_model = std::make_shared<SourceModel<fdreadoutlibs::types::TDEEthTypeAdapter>>();
53
54
// Disable DAQ protocol checks
55
source_model->disable_daq_protocol_checks();
56
57
// For callback acquisition later (lazy)
58
source_model->set_sink_config(conf);
59
60
return
source_model;
61
62
}
else
if
(datatype.find(
"DAPHNEEthFrame"
) != std::string::npos) {
63
// WIB2 specific char arrays
64
auto
source_model = std::make_shared<SourceModel<fdreadoutlibs::types::DAPHNEEthTypeAdapter>>();
65
66
// For callback acquisition later (lazy)
67
source_model->set_sink_config(conf);
68
69
return
source_model;
70
}
else
if
(datatype.find(
"DAPHNEEthStreamFrame"
) != std::string::npos) {
71
// WIB2 specific char arrays
72
auto
source_model = std::make_shared<SourceModel<fdreadoutlibs::types::DAPHNEEthStreamTypeAdapter>>();
73
74
// For callback acquisition later (lazy)
75
source_model->set_sink_config(conf);
76
77
return
source_model;
78
}
79
80
return
nullptr
;
81
}
82
83
}
// namespace dpdklibs
84
}
// namespace dunedaq
85
86
#endif
// DPDKLIBS_SRC_CREATESOURCE_HPP_
DAPHNEEthStreamTypeAdapter.hpp
DAPHNEEthTypeAdapter.hpp
DUNEWIBEthTypeAdapter.hpp
DataHandlingIssues.hpp
DUNE_DAQ_TYPESTRING
#define DUNE_DAQ_TYPESTRING(Type, typestring)
Declare the datatype_to_string method for the given type.
Definition
Serialization.hpp:36
TDEEthTypeAdapter.hpp
dunedaq::appmodel::DataMoveCallbackConf
Definition
DataMoveCallbackConf.hpp:20
dunedaq::appmodel::DataMoveCallbackConf::get_data_type
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...
Definition
DataMoveCallbackConf.hpp:125
dunedaq::conffwk::DalObject::UID
const std::string & UID() const noexcept
Definition
DalObject.hpp:135
SourceConcept.hpp
SourceModel.hpp
TLOG
#define TLOG(...)
Definition
macro.hpp:22
dunedaq::dpdklibs
Definition
ARP.hpp:16
dunedaq::dpdklibs::createSourceModel
std::shared_ptr< SourceConcept > createSourceModel(const appmodel::DataMoveCallbackConf *conf)
Definition
CreateSource.hpp:32
dunedaq::fdreadoutlibs
Definition
CRTBernFrameProcessor.hpp:16
dunedaq
Including Qt Headers.
Definition
module.cpp:16
Generated on
for DUNE-DAQ by
1.17.0