DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
datahandlinglibs
include
datahandlinglibs
testutils
UnitTestUtilities.hpp
Go to the documentation of this file.
1
8
9
#ifndef DATAHANDLINGLIBS_INCLUDE_DATAHANDLINGLIBS_TESTUTILS_UNITTESTUTILITIES_HPP
10
#define DATAHANDLINGLIBS_INCLUDE_DATAHANDLINGLIBS_TESTUTILS_UNITTESTUTILITIES_HPP
11
12
#include "
datahandlinglibs/models/DataHandlingModel.hpp
"
13
#include "
datahandlinglibs/models/DefaultRequestHandlerModel.hpp
"
14
#include "
datahandlinglibs/models/TaskRawDataProcessorModel.hpp
"
15
16
namespace
dunedaq
{
17
namespace
datahandlinglibs
{
18
namespace
unittest
{
19
20
template
<
typename
ReadoutType,
21
typename
RequestHandlerType,
22
typename
LatencyBufferType,
23
typename
RawDataProcessorType,
24
typename
InputDataType = ReadoutType>
25
class
MockDataHandlingModel
26
:
public
DataHandlingModel
<ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType>
27
{
28
public
:
29
using
Base
=
30
DataHandlingModel<ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType>
;
31
using
Base::Base;
32
using
Base::PostprocessScheduleAlgorithm;
33
using
typename
Base::num_post_processing_delay_max_waits_t
;
34
35
void
test_run_postprocess_scheduler
(
36
std::shared_ptr<LatencyBufferType> latency_buffer_impl, std::shared_ptr<RawDataProcessorType> raw_processor_impl,
37
std::unique_ptr<folly::Timekeeper> timekeeper, uint64_t post_processing_delay_max_wait)
38
{
39
this->
m_latency_buffer_impl
= latency_buffer_impl;
40
this->
m_raw_processor_impl
= raw_processor_impl;
41
this->
m_timekeeper
= std::move(timekeeper);
42
this->
m_post_processing_delay_max_wait
= post_processing_delay_max_wait;
43
this->
run_postprocess_scheduler
();
44
}
45
46
num_post_processing_delay_max_waits_t
get_num_post_processing_delay_max_waits
()
47
{
48
return
this->
m_num_post_processing_delay_max_waits
.load();
49
}
50
51
void
set_run_marker
(
bool
run_marker
)
52
{
53
return
this->
m_run_marker
.store(
run_marker
);
54
}
55
};
56
57
}
// namespace unittest
58
}
// namespace datahandlinglibs
59
}
// namespace dunedaq
60
61
#endif
// DATAHANDLINGLIBS_INCLUDE_DATAHANDLINGLIBS_TESTUTILS_UNITTESTUTILITIES_HPP
DataHandlingModel.hpp
DefaultRequestHandlerModel.hpp
TaskRawDataProcessorModel.hpp
dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, ReadoutType >::DataHandlingModel
DataHandlingModel(std::atomic< bool > &run_marker)
Definition
DataHandlingModel.hpp:87
dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::num_post_processing_delay_max_waits_t
std::remove_const< std::invoke_result< decltype(&metric_t::num_post_processing_delay_max_waits), metric_t >::type >::type num_post_processing_delay_max_waits_t
Definition
DataHandlingModel.hpp:342
dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, ReadoutType >::run_postprocess_scheduler
void run_postprocess_scheduler()
Definition
DataHandlingModel.hxx:299
dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, ReadoutType >::m_post_processing_delay_max_wait
uint64_t m_post_processing_delay_max_wait
Definition
DataHandlingModel.hpp:332
dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, ReadoutType >::m_run_marker
std::atomic< bool > & m_run_marker
Definition
DataHandlingModel.hpp:321
dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, ReadoutType >::m_timekeeper
std::unique_ptr< folly::Timekeeper > m_timekeeper
Definition
DataHandlingModel.hpp:382
dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, ReadoutType >::m_num_post_processing_delay_max_waits
std::atomic< num_post_processing_delay_max_waits_t > m_num_post_processing_delay_max_waits
Definition
DataHandlingModel.hpp:350
dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, ReadoutType >::m_latency_buffer_impl
std::shared_ptr< LatencyBufferType > m_latency_buffer_impl
Definition
DataHandlingModel.hpp:385
dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, ReadoutType >::m_raw_processor_impl
std::shared_ptr< RawDataProcessorType > m_raw_processor_impl
Definition
DataHandlingModel.hpp:388
dunedaq::datahandlinglibs::unittest::MockDataHandlingModel
Definition
UnitTestUtilities.hpp:27
dunedaq::datahandlinglibs::unittest::MockDataHandlingModel::get_num_post_processing_delay_max_waits
num_post_processing_delay_max_waits_t get_num_post_processing_delay_max_waits()
Definition
UnitTestUtilities.hpp:46
dunedaq::datahandlinglibs::unittest::MockDataHandlingModel::Base
DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType > Base
Definition
UnitTestUtilities.hpp:29
dunedaq::datahandlinglibs::unittest::MockDataHandlingModel::test_run_postprocess_scheduler
void test_run_postprocess_scheduler(std::shared_ptr< LatencyBufferType > latency_buffer_impl, std::shared_ptr< RawDataProcessorType > raw_processor_impl, std::unique_ptr< folly::Timekeeper > timekeeper, uint64_t post_processing_delay_max_wait)
Definition
UnitTestUtilities.hpp:35
dunedaq::datahandlinglibs::unittest::MockDataHandlingModel::set_run_marker
void set_run_marker(bool run_marker)
Definition
UnitTestUtilities.hpp:51
run_marker
std::atomic< bool > run_marker
Global atomic for process lifetime.
Definition
daq_application.cxx:26
dunedaq::datahandlinglibs::unittest
Definition
UnitTestUtilities.hpp:18
dunedaq::datahandlinglibs
Definition
DataHandlingConcept.hpp:16
dunedaq
Including Qt Headers.
Definition
module.cpp:16
Generated on
for DUNE-DAQ by
1.17.0