|
ATLAS Offline Software
|
The test calls for RoI data access for each RoI returned bunch of quantiries are checked, RoI et, actual RoI span, and cells count.
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...
|
|
The test calls for RoI data access for each RoI returned bunch of quantiries are checked, RoI et, actual RoI span, and cells count.
Definition at line 30 of file TestCaloDataAccess.cxx.
◆ AskForRoI()
◆ ~AskForRoI()
AskForRoI::~AskForRoI |
( |
| ) |
|
|
inline |
◆ callAndCompare()
bool AskForRoI::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 108 of file TestCaloDataAccess.cxx.
110 Gaudi::Hive::setCurrentContext (
m_context);
118 double maxPhi = -100;
124 for (
const auto cell :
col ) {
125 if ( !
cell )
continue;
138 for (
const auto cell :
sel ) {
165 if ( checkStatus ==
false ) {
169 refIter !=
m_selRef.
end() and thisIter !=
sel.end(); ++refIter, ++thisIter ) {
170 const LArCell* refCell = *refIter;
171 const LArCell* thisCell = *thisIter;
172 if ( thisCell->
et() != refCell->
et() ) {
173 ATH_MSG_WARNING(
"eta/phi/et Reference cell " << refCell->
eta() <<
"/" << refCell->
phi() <<
"/" << refCell->
et()
174 <<
" differ from the one in this request " << thisCell->
eta() <<
"/" << thisCell->
phi() <<
"/" << thisCell->
et() );
◆ firstCall()
void AskForRoI::firstCall |
( |
| ) |
|
|
inlineoverridevirtual |
a method that will be called to obtain first results from the service It should set the reference quantities
Implements ParallelCallTest.
Definition at line 68 of file TestCaloDataAccess.cxx.
69 Gaudi::Hive::setCurrentContext (
m_context);
71 struct timeval
t1{},
t2{};
72 gettimeofday(&
t1,NULL);
75 gettimeofday(&
t2,NULL);
78 if ( !
cell )
continue;
86 std::cout <<
"t lFC : " <<
m_context <<
" " <<
m_etSumRef <<
" " <<
t1.tv_sec <<
" " <<
t1.tv_usec <<
" " <<
t2.tv_sec <<
" " <<
t2.tv_usec <<
" " << ((
t2.tv_sec-
t1.tv_sec)*1e6+(
t2.tv_usec-
t1.tv_usec) )*1
e-6 << std::endl;
90 struct timeval
t1{},
t2{};
91 gettimeofday(&
t1,NULL);
94 gettimeofday(&
t2,NULL);
104 std::cout <<
"t RoI : " <<
m_context <<
" " <<
m_etSumRef <<
" " <<
t1.tv_sec <<
" " <<
t1.tv_usec <<
" " <<
t2.tv_sec <<
" " <<
t2.tv_usec <<
" " << ((
t2.tv_sec-
t1.tv_sec)*1e6+(
t2.tv_usec-
t1.tv_usec) )*1
e-6 << std::endl;
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ 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;
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ request() [1/2]
Definition at line 57 of file TestCaloDataAccess.cxx.
62 std::cout <<
"wrong RoI descriptor used for FS" << std::endl;
63 return StatusCode::FAILURE;
◆ request() [2/2]
Definition at line 45 of file TestCaloDataAccess.cxx.
47 std::cout <<
"wrong RoI descriptor used for RoI" << std::endl;
48 return StatusCode::FAILURE;
◆ 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;
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_colRef
◆ m_context
const EventContext& AskForRoI::m_context |
|
private |
◆ m_countRef
size_t AskForRoI::m_countRef = 0 |
|
private |
◆ m_etSumRef
double AskForRoI::m_etSumRef = 0 |
|
private |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_maxEtaRef
double AskForRoI::m_maxEtaRef = -100 |
|
private |
◆ m_maxPhiRef
double AskForRoI::m_maxPhiRef = -100 |
|
private |
◆ m_minEtaRef
double AskForRoI::m_minEtaRef = 100 |
|
private |
◆ m_minPhiRef
double AskForRoI::m_minPhiRef = 100 |
|
private |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_roi
◆ m_selRef
◆ m_statusRef
StatusCode AskForRoI::m_statusRef |
|
private |
◆ m_svc
The documentation for this class was generated from the following file:
std::atomic< MSG::Level > m_lvl
Current logging level.
const EventContext & m_context
LArTT_Selector< LArCellCont > m_selRef
virtual double phi() const override final
get phi (through CaloDetDescrElement)
const ServiceHandle< ITrigCaloDataAccessSvc > & m_svc
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
const_iterator end() const
CaloConstCellContainer * m_colRef
const TrigRoiDescriptor m_roi
std::vector< ALFA_RawDataCollection_p1 > t1
virtual void firstCall()=0
a method that will be called to obtain first results from the service It should set the reference qua...
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
IMessageSvc * getMessageSvc(bool quiet=false)
AthMessaging()
Default constructor:
void clear()
Erase all the elements in the collection.
#define DIFF(_name, _a, _b)
virtual bool callAndCompare() const =0
a function that performs request, and compares the results obtained with the result of the first exec...
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual double et() const override final
get et
const_iterator begin() const
AthROOTErrorHandlerSvc * svc
MsgStream & msg() const
The standard message stream.
Data object for LAr calorimeter readout cell.
std::vector< ALFA_RawDataContainer_p1 > t2
StatusCode request(LArTT_Selector< LArCellCont > &sel) const
CaloCellContainer that can accept const cell pointers.
#define ATH_MSG_WARNING(x)
std::string m_nm
Message source name.
virtual bool isFullscan() const override final
is this a full scan RoI?
void initMessaging() const
Initialize our message level and MessageSvc.
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
virtual double eta() const override final
get eta (through CaloDetDescrElement)