|
| AskForROBs (const EventContext &context, const ServiceHandle< IROBDataProviderSvc > &svc, uint32_t lvl1ID, const std::vector< eformat::read::ROBFragment > &robs, size_t frac=8) |
|
size_t | nrobs () const |
|
virtual void | firstCall () override |
| a method that will be called to obtain first results from the service It should set the reference quantities More...
|
|
virtual bool | callAndCompare () const override |
| a function that performs request, and compares the results obtained with the result of the first execution When result differ this function is supposed to return false, otherwise true More...
|
|
bool | run (size_t nrepeats) |
| runs the stress test by invoking it the firstCall and then repetitively the callAndCompare More...
|
|
|
static bool | launchTests (size_t nrepeats, const std::vector< ParallelCallTest * > &tests) |
| Method to run launch number of tests in parallel (increasing the stress of the calle) It has a potential that also the "first" calls can be launched in parallel and thus be the worse case compared to a situation when the first calls are invoked sequentially while further calls in parallel. More...
|
|
Definition at line 29 of file ROBDataProviderMTTest.cxx.
◆ AskForROBs()
◆ callAndCompare()
virtual bool AskForROBs::callAndCompare |
( |
| ) |
const |
|
inlineoverridevirtual |
a function that performs request, and compares the results obtained with the result of the first execution When result differ this function is supposed to return false, otherwise true
Implements ParallelCallTest.
Definition at line 42 of file ROBDataProviderMTTest.cxx.
45 for (
auto& rob:
robs ) {
46 if ( rob->rod_lvl1_id() !=
m_lvl1ID )
◆ firstCall()
virtual void AskForROBs::firstCall |
( |
| ) |
|
|
inlineoverridevirtual |
◆ launchTests()
Method to run launch number of tests in parallel (increasing the stress of the calle) It has a potential that also the "first" calls can be launched in parallel and thus be the worse case compared to a situation when the first calls are invoked sequentially while further calls in parallel.
Definition at line 83 of file ParallelCallTest.cxx.
92 return tbb::parallel_reduce( tbb::blocked_range< std::vector<ParallelCallTest*>::const_iterator >(
tests.begin(),
tests.end() ),
94 [&]( tbb::blocked_range< std::vector<ParallelCallTest*>::const_iterator > groupOfTests,
bool statusSoFar ) ->
bool {
96 for ( auto test : groupOfTests ) {
97 success = test->run( nrepeats ) and success;
99 return statusSoFar and success;
101 [](
bool allCallsStatus,
bool thisCallStatus ) ->
bool {
102 return allCallsStatus and thisCallStatus;
◆ nrobs()
size_t AskForROBs::nrobs |
( |
| ) |
const |
|
inline |
◆ run()
bool ParallelCallTest::run |
( |
size_t |
nrepeats | ) |
|
|
inherited |
runs the stress test by invoking it the firstCall and then repetitively the callAndCompare
- nrepeats times (>=1) A single failure of the callAndCompare would result in the whole execution failed
Definition at line 69 of file ParallelCallTest.cxx.
72 return tbb::parallel_reduce( tbb::blocked_range<int>( 0, nrepeats, 1 ),
74 [&]( tbb::blocked_range<int>,
bool statusSoFar ) ->
bool {
77 [](
bool allCallsStatus,
bool thisCallStatus ) ->
bool {
78 return allCallsStatus and thisCallStatus;
◆ m_context
EventContext AskForROBs::m_context |
|
private |
◆ m_lvl1ID
uint32_t AskForROBs::m_lvl1ID |
|
private |
◆ m_ROBIDs
std::vector<uint32_t> AskForROBs::m_ROBIDs |
|
private |
◆ m_svc
The documentation for this class was generated from the following file: