5#include "Gaudi/Property.h"
13 ISvcLocator* pSvcLocator ) :
22 return StatusCode::SUCCESS;
26 return StatusCode::SUCCESS;
36 for (
size_t el = 0; el < robs.size()/frac; ++el ) {
37 m_ROBIDs.push_back( robs[el].rob_source_id() );
45 for (
auto& rob: robs ) {
46 if ( rob->rod_lvl1_id() !=
m_lvl1ID )
65 ATH_MSG_DEBUG(
"Obtained event, global id: " <<
ev->global_id() <<
" lvl1 id: " <<
ev->lvl1_id() );
66 uint32_t lvl1ID =
ev->lvl1_id();
70 std::vector<ParallelCallTest*> requests;
71 std::vector<eformat::read::ROBFragment> robs;
75 rng.seed = context.evt();
76 for (
size_t i = 0; i < 8; ++i ) {
79 ATH_MSG_DEBUG(
"Prepared parallel request with " <<
r->nrobs() <<
" robs" );
80 requests.push_back(
r );
85 if ( status ==
false )
86 ATH_MSG_ERROR(
"Concurrent ROB requests resulted in inconsistent information" );
95 if ( 1120005 == rob->rob_source_id() )
96 ATH_MSG_DEBUG(
"rob in the cache " << rob->rob_source_id() ); }
101 return StatusCode::SUCCESS;
#define CHECK(...)
Evaluate an expression and check for errors.
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
const ServiceHandle< IROBDataProviderSvc > & m_svc
virtual bool callAndCompare() const override
a function that performs request, and compares the results obtained with the result of the first exec...
std::vector< uint32_t > m_ROBIDs
virtual void firstCall() override
a method that will be called to obtain first results from the service It should set the reference qua...
AskForROBs(const EventContext &context, const ServiceHandle< IROBDataProviderSvc > &svc, uint32_t lvl1ID, const std::vector< eformat::read::ROBFragment > &robs, size_t frac=8)
An algorithm that can be simultaneously executed in multiple threads.
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment ROBF
std::vector< const ROBF * > VROBFRAG
Provides interface and helper functions to perform stress testing of the thread-safe code.
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 potent...
StatusCode initialize() override
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
StatusCode execute(const EventContext &context) const override
virtual ~ROBDataProviderMTTest()
StatusCode finalize() override
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
void shuffle(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, UniformRandom &g)
Specialization of shuffle for DataVector/List.
Very simple random numbers for regression testing.
Generator compatible with the C++11 STL UniformRandomNumberGenerator.