44#include "GaudiKernel/MsgStream.h"
45#include "GaudiKernel/SmartDataPtr.h"
52 , ISvcLocator *pSvcLocator)
72 return StatusCode::SUCCESS;
84 return StatusCode::SUCCESS;
101 << pixCont->
size() <<
" " );
104 if (pixCont->
begin() == pixCont->
end()) {
105 ATH_MSG_ERROR(
"Container '" <<
"PixelRDOs" <<
"' is EMPTY !" );
106 return StatusCode::FAILURE;
110 it != pixCont->
end() ; ++it) {
115 << RDO_Collection->
size() <<
" "
117 << MSG::hex << (
unsigned int)RDO_Collection->
identifyHash() << MSG::dec );
120 MsgStream log(msgSvc(), name());
125 << rdocoll->
size() <<
" "
127 << MSG::hex << (
unsigned int)rdocoll->
identifyHash() << MSG::dec );
135 RDO_Collection_type::const_iterator nextRDO = RDO_Collection->
begin();
136 RDO_Collection_type::const_iterator lastRDO = RDO_Collection->
end();
137 RDO_Collection_type::const_iterator nextRDO1 = rdocoll->
begin();
138 RDO_Collection_type::const_iterator lastRDO1 = rdocoll->
end();
139 for (; nextRDO != lastRDO && nextRDO1 != lastRDO1 ; ++nextRDO, ++nextRDO1) {
141 if (((*nextRDO)->identify() != (*nextRDO1)->identify()) ||
142 ((*nextRDO)->getWord() != (*nextRDO1)->getWord())) {
145 <<
m_pixelId->show_to_string((*nextRDO)->identify()) <<
" "
146 <<
m_pixelId->show_to_string((*nextRDO1)->identify()) <<
" "
147 << MSG::hex << (*nextRDO)->getWord() <<
" "
148 << MSG::hex << (*nextRDO1)->getWord() <<
" "
169 for (
unsigned int i = 0; i < linkVec->
pixelRDOs().size(); ++i) {
174 <<
"RDO ToT=" << ncrdo->
getToT() );
179 ATH_MSG_INFO(
"ERROR reading and checking Pixel RDO collections " );
182 ATH_MSG_INFO(
"Successfully read and checked Pixel RDO collections " );
185 return StatusCode::SUCCESS;
202 << sctCont->
size() <<
" " );
205 if (sctCont->
begin() == sctCont->
end()) {
206 ATH_MSG_ERROR(
"Container '" <<
"SCT_RDOs" <<
"' is EMPTY !" );
207 return StatusCode::FAILURE;
211 it != sctCont->
end() ; ++it) {
216 << RDO_Collection->
size() <<
" "
218 << MSG::hex << (
unsigned int)RDO_Collection->
identifyHash() << MSG::dec );
221 MsgStream log(msgSvc(), name());
226 << rdocoll->
size() <<
" "
228 << MSG::hex << (
unsigned int)rdocoll->
identifyHash() << MSG::dec );
235 RDO_Collection_type::const_iterator nextRDO = RDO_Collection->
begin();
236 RDO_Collection_type::const_iterator lastRDO = RDO_Collection->
end();
237 RDO_Collection_type::const_iterator nextRDO1 = rdocoll->
begin();
238 RDO_Collection_type::const_iterator lastRDO1 = rdocoll->
end();
239 for (; nextRDO != lastRDO && nextRDO1 != lastRDO1 ; ++nextRDO, ++nextRDO1) {
241 if (((*nextRDO)->identify() != (*nextRDO1)->identify()) ||
242 ((*nextRDO)->getGroupSize() != (*nextRDO1)->getGroupSize())) {
245 <<
m_sctId->show_to_string((*nextRDO)->identify()) <<
" "
246 <<
m_sctId->show_to_string((*nextRDO1)->identify()) <<
" "
248 << (*nextRDO)->getGroupSize() <<
" "
249 << (*nextRDO1)->getGroupSize() <<
" "
264 ATH_MSG_INFO(
"ERROR reading and checking SCT RDO collections " );
267 ATH_MSG_INFO(
"Successfully read and checked SCT RDO collections " );
270 return StatusCode::SUCCESS;
287 << trtCont->
size() <<
" " );
290 if (trtCont->
begin() == trtCont->
end()) {
293 return StatusCode::FAILURE;
297 it != trtCont->
end() ; ++it) {
302 << RDO_Collection->
size() <<
" "
304 << MSG::hex << (
unsigned int)RDO_Collection->
identifyHash() << MSG::dec );
307 MsgStream log(msgSvc(), name());
312 << rdocoll->
size() <<
" "
314 << MSG::hex << (
unsigned int)rdocoll->
identifyHash() << MSG::dec );
321 RDO_Collection_type::const_iterator nextRDO = RDO_Collection->
begin();
322 RDO_Collection_type::const_iterator lastRDO = RDO_Collection->
end();
323 RDO_Collection_type::const_iterator nextRDO1 = rdocoll->
begin();
324 RDO_Collection_type::const_iterator lastRDO1 = rdocoll->
end();
325 for (; nextRDO != lastRDO && nextRDO1 != lastRDO1 ; ++nextRDO, ++nextRDO1) {
327 if (((*nextRDO)->identify() != (*nextRDO1)->identify()) ||
328 ((*nextRDO)->highLevel() != (*nextRDO1)->highLevel()) ||
329 ((*nextRDO)->timeOverThreshold() != (*nextRDO1)->timeOverThreshold()) ||
330 ((*nextRDO)->driftTimeBin() != (*nextRDO1)->driftTimeBin())) {
332 ATH_MSG_ERROR(
"RDO's do NOT match: ids, highlvl, TOT, drift "
333 <<
m_trtId->show_to_string((*nextRDO)->identify()) <<
" "
334 <<
m_trtId->show_to_string((*nextRDO1)->identify()) <<
" "
336 << (*nextRDO)->highLevel() <<
" "
337 << (*nextRDO1)->highLevel() <<
" "
338 << (*nextRDO)->timeOverThreshold() <<
" "
339 << (*nextRDO1)->timeOverThreshold() <<
" "
340 << (*nextRDO)->driftTimeBin() <<
" "
341 << (*nextRDO1)->driftTimeBin() <<
" "
356 ATH_MSG_INFO(
"ERROR reading and checking TRT RDO collections " );
359 ATH_MSG_INFO(
"Successfully read and checked TRT RDO collections " );
362 return StatusCode::SUCCESS;
373 <<
"' retrieved from StoreGate" );
381 MsgStream log(msgSvc(), name());
395 for (; first != last && first1 != last1; ++first, ++first1) {
396 if (((*first)->ID() != (*first1)->ID()) ||
397 (fabs((*first)->energy() - (*first1)->energy() ) > 0.01 * fabs((*first)->energy())) ||
398 (fabs((*first)->time() - (*first1)->time() ) > 0.0002 * fabs((*first)->time())) ||
399 (std::abs((*first)->quality() - (*first1)->quality() ) > 0) ||
400 (std::abs((*first)->provenance() - (*first1)->provenance() ) > 0) ||
401 (fabs((*first)->eta() - (*first1)->eta() ) > 0.0000001) ||
402 (fabs((*first)->phi() - (*first1)->phi() ) > 0.0000001)) {
406 <<
" energy " << (*first)->energy() <<
" "
407 << (*first1)->energy()
408 <<
" time " << (*first)->time() <<
" "
410 <<
" quality " << (*first)->quality() <<
" "
411 << (*first1)->quality()
412 <<
" provenance " << (*first)->provenance() <<
" "
413 << (*first1)->provenance()
414 <<
" eta " << (*first)->eta() <<
" "
416 <<
" phi " << (*first)->phi() <<
" "
417 << (*first1)->phi());
428 return StatusCode::FAILURE;
431 ATH_MSG_INFO(
"Successful check of CaloCellContainer I/O. Cells read: " << ncells );
433 return StatusCode::SUCCESS;
447 for (; first != last; ++first) {
451 << std::setprecision(5)
452 <<
" energy " << (*first)->energy()
453 <<
" time " << (*first)->time()
454 <<
" quality " << (*first)->quality()
455 <<
" provenance " << (*first)->provenance()
456 <<
" eta " << (*first)->eta()
457 <<
" phi " << (*first)->phi()
470 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Class which encapsulates the creation of an InDetRawDataCollection.
Create a CaloCellContainer with LArCells for POOL I/O tests algs.
This is an Identifier helper class for the Pixel subdetector.
Class definition for PixelRDOElemLinkVec.
InDetRawDataContainer< InDetRawDataCollection< PixelRDORawData > > PixelRDO_Container
Test Algorithm for POOL I/O, reads InDetRawData and CaloCells from transient store.
This is an Identifier helper class for the SCT subdetector.
InDetRawDataContainer< InDetRawDataCollection< SCT_RDORawData > > SCT_RDO_Container
This is an Identifier helper class for the TRT subdetector.
InDetRawDataContainer< InDetRawDataCollection< TRT_RDORawData > > TRT_RDO_Container
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
ServiceHandle< StoreGateSvc > & evtStore()
const ServiceHandle< StoreGateSvc > & detStore() const
Container class for CaloCell.
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
const_iterator end() const
return const_iterator for end of container
size_t size() const
Duplicate of fullSize for backwards compatability.
const_iterator begin() const
return const_iterator for first entry
virtual Identifier identify() const override final
virtual IdentifierHash identifyHash() const override final
Class which encapsulates the creation of an InDetRawDataCollection.
const InDetRawDataCollection< PixelRDORawData > * createPixelRawDataColl(IdentifierHash hashId, const PixelID *pixelId, MsgStream &log)
Create PixelRawDataCollection.
const InDetRawDataCollection< SCT_RDORawData > * createSCT_RawDataColl(IdentifierHash hashId, const SCT_ID *sctId, MsgStream &log)
Create SCT_RawDataCollection.
const InDetRawDataCollection< TRT_RDORawData > * createTRT_RawDataColl(IdentifierHash hashId, const TRT_ID *trtId, MsgStream &log)
Create TRT_RawDataCollection.
Create a CaloCellContainer with LArCells for POOL I/O tests algs.
CaloCellContainer * createCaloCellContainer(const CaloCell_ID *calocellId, const CaloDetDescrManager *caloMgr, MsgStream &log) const
Create a CaloCellContainer with LAr cells.
vector containing element links to pixel RDOs
const std::vector< elem_type > & pixelRDOs() const
ElementLink< cont_type > elem_type
virtual int getToT() const =0
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Need DD mgr to create cells.
const TRT_ID * m_trtId
IDhelper for creating objects.
StatusCode checkPixel() const
Compare objects read with newly created ones.
StatusCode checkCells() const
Compare objects read with newly created ones.
virtual StatusCode finalize() override
Algorithm finalize at end of job.
const PixelID * m_pixelId
IDhelper for creating objects.
virtual StatusCode initialize() override
Algorithm initialize at begin of job.
StatusCode checkSCT() const
Compare objects read with newly created ones.
StatusCode checkTRT() const
Compare objects read with newly created ones.
const CaloCell_ID * m_calocellId
Need id helper to create cells.
const SCT_ID * m_sctId
IDhelper for creating objects.
void printCells(const CaloCellContainer *larCont) const
Print out cell info.
RDOReaderDoubleSelector()
Avoid use of default constructor.
virtual StatusCode execute() override
Algorithm execute once per event.