|
ATLAS Offline Software
|
Go to the documentation of this file.
44 #include "GaudiKernel/MsgStream.h"
45 #include "GaudiKernel/SmartDataPtr.h"
52 , ISvcLocator *pSvcLocator)
57 , m_calocellId(nullptr)
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;
115 << RDO_Collection->
size() <<
" "
117 << MSG::hex << (
unsigned int)RDO_Collection->
identifyHash() << MSG::dec );
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())) {
147 << MSG::hex << (*nextRDO)->getWord() <<
" "
148 << MSG::hex << (*nextRDO1)->getWord() <<
" "
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;
216 << RDO_Collection->
size() <<
" "
218 << MSG::hex << (
unsigned int)RDO_Collection->
identifyHash() << MSG::dec );
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())) {
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;
302 << RDO_Collection->
size() <<
" "
304 << MSG::hex << (
unsigned int)RDO_Collection->
identifyHash() << MSG::dec );
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 "
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" );
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;
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;
const SCT_ID * m_sctId
IDhelper for creating objects.
def retrieve(aClass, aKey=None)
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
Class which encapsulates the creation of an InDetRawDataCollection.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Need DD mgr to create cells.
Const iterator class for DataVector/DataList.
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
virtual StatusCode execute() override
Algorithm execute once per event.
virtual StatusCode finalize() override
Algorithm finalize at end of job.
virtual Identifier identify() const override final
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
size_t size() const
Duplicate of fullSize for backwards compatability.
const CaloCell_ID * m_calocellId
Need id helper to create cells.
RDOReaderDoubleSelector()
Avoid use of default constructor.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
CaloCellContainer * createCaloCellContainer(const CaloCell_ID *calocellId, const CaloDetDescrManager *caloMgr, MsgStream &log) const
Create a CaloCellContainer with LAr cells.
virtual IdentifierHash identifyHash() const override final
vector containing element links to pixel RDOs
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
msgSvc
Provide convenience handles for various services.
StatusCode checkTRT() const
Compare objects read with newly created ones.
IdContext straw_layer_context(void) const
straw_layer id
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode checkCells() const
Compare objects read with newly created ones.
const InDetRawDataCollection< SCT_RDORawData > * createSCT_RawDataColl(IdentifierHash hashId, const SCT_ID *sctId, MsgStream &log)
Create SCT_RawDataCollection.
void printCells(const CaloCellContainer *larCont) const
Print out cell info.
const InDetRawDataCollection< TRT_RDORawData > * createTRT_RawDataColl(IdentifierHash hashId, const TRT_ID *trtId, MsgStream &log)
Create TRT_RawDataCollection.
const_iterator end() const
return const_iterator for end of container
IdContext wafer_context(void) const
virtual int getToT() const =0
const_iterator begin() const
return const_iterator for first entry
Class definition for PixelRDOElemLinkVec.
Create a CaloCellContainer with LArCells for POOL I/O tests algs.
ElementLink implementation for ROOT usage.
Test Algorithm for POOL I/O, reads InDetRawData and CaloCells from transient store.
Create a CaloCellContainer with LArCells for POOL I/O tests algs.
StatusCode initialize(bool used=true)
Container class for CaloCell.
const PixelID * m_pixelId
IDhelper for creating objects.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
virtual StatusCode initialize() override
Algorithm initialize at begin of job.
const TRT_ID * m_trtId
IDhelper for creating objects.
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
IdContext wafer_context(void) const
StatusCode checkPixel() const
Compare objects read with newly created ones.
StatusCode checkSCT() const
Compare objects read with newly created ones.
Class which encapsulates the creation of an InDetRawDataCollection.
const std::vector< elem_type > & pixelRDOs() const
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
size_type size() const noexcept
Returns the number of elements in the collection.
const InDetRawDataCollection< PixelRDORawData > * createPixelRawDataColl(IdentifierHash hashId, const PixelID *pixelId, MsgStream &log)
Create PixelRawDataCollection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.