290 {
291
294 return 0x0;
295
297
298
300
301
302 std::vector<uint32_t> vrodid32lar;
303 std::vector<uint32_t> vrodid32em;
304 std::vector<uint32_t> vrodid32hec;
305 std::vector<uint32_t> vrodid32hec0;
306 std::vector<uint32_t> vrodid32hec1;
307 std::vector<uint32_t> vrodid32hec2;
308 std::vector<uint32_t> vrodid32hec3;
309 std::vector<uint32_t> vrodid32fcalem;
310 std::vector<uint32_t> vrodid32fcalhad;
311
313 std::vector<uint32_t> vrodid32tile;
314 std::vector<IdentifierHash> rIdstile;
315
317
322
327
330
331
332 auto iii = std::unique_copy(vrodid32tile.begin(),vrodid32tile.end(),
m_vrodid32tile.begin());
333 auto iij = std::unique_copy(rIdstile.begin(),rIdstile.end(),
m_rIdstile.begin());
340
341 vrodid32lar.insert(vrodid32lar.end(),vrodid32em.begin(),vrodid32em.end());
342 vrodid32hec.insert(vrodid32hec.end(),vrodid32hec0.begin(),vrodid32hec0.end());
343 vrodid32lar.insert(vrodid32lar.end(),vrodid32hec.begin(),vrodid32hec.end());
344 vrodid32lar.insert(vrodid32lar.end(),vrodid32fcalhad.begin(),vrodid32fcalhad.end());
345 vrodid32lar.insert(vrodid32lar.end(),vrodid32fcalem.begin(),vrodid32fcalem.end());
347
348
349 SG::ReadCondHandle<LArMCSym> mcsym (
m_mcsymKey, context);
351 SG::ReadCondHandle<LArBadChannelCont> larBadChan{
m_bcContKey, context };
355
356 unsigned int nFebs=70;
358 unsigned int jj=0;
362 if ( kk >= nFebs ) {
364 jj++;
365 }
369 }
370 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{
m_caloMgrKey, context};
371 const CaloDetDescrManager* theCaloDDM = *caloMgrHandle;
374
375
376 for (
size_t slot = 0; slot <
m_nSlots; ++ slot ) {
377 EventContext ec;
378 ec.setSlot( slot );
380 cache->larContainer = new LArCellCont();
381 cache->larRodBlockStructure_per_slot = nullptr;
382 if ( cache->larContainer->initialize( **roimap, **onoff, **mcsym, **febrod, **larBadChan, *theCaloDDM).isFailure() )
383 return 0x1;
384 std::vector<CaloCell*> local_cell_copy;
385 local_cell_copy.reserve(200000);
386 LArCellCont* larcell = cache->larContainer;
387 cache->lastFSEvent = 0xFFFFFFFF;
389 cachefullcont->
reserve(190000);
391 for(unsigned int lcidx=0; lcidx < larcell->size(); lcidx++){
392 LArCellCollection* lcc = larcell->at(lcidx);
393 unsigned int lccsize = lcc->
size();
394 for(unsigned int lccidx=0; lccidx<lccsize; lccidx++){
395 CaloCell*
cell = ((*lcc).at(lccidx));
396 if ( cell &&
cell->caloDDE() ) {
400
406 }
407 if ( good ) local_cell_copy.push_back( cell );
408 }
409 }
410 }
411
412
413 TileCellCont* tilecell = new TileCellCont();
414 cache->tileContainer = tilecell;
416 if( tilecell->
initialize().isFailure() )
return 0x1;
417 for (
unsigned int i=0;
i<4;
i++) {
420 }
427 TileROD_Decoder::D0CellsHLT* d0cellsp = new TileROD_Decoder::D0CellsHLT();
428 for(unsigned int lcidx=0; lcidx < tilecell->size(); lcidx++){
429 TileCellCollection* lcc = tilecell->at(lcidx);
430 unsigned int lccsize = lcc->
size();
431 for(unsigned int lccidx=0; lccidx<lccsize; lccidx++){
432 CaloCell*
cell = ((*lcc).at(lccidx));
433 if ( cell ) local_cell_copy.push_back( cell );
434 }
436 int ros = (frag_id >> 8);
437 if ( ros == 1 ) {
438 int drawer = (frag_id & 0xFF);
440 pCell+=2;
442 }
443 }
444
445
446 cache->d0cells = d0cellsp;
447
448
449 for(
unsigned int i=0;
i<hashMax;
i++){
451 }
452
453 unsigned int localcellMax = local_cell_copy.size();
454 for(
unsigned int i=0;
i<localcellMax;
i++){
455 unsigned int j = local_cell_copy.at(i)->caloDDE()->calo_hash();
456 if ( j < hashMax ) {
457 cachefullcont->
at(j) = local_cell_copy.at(i);
458 }
459 }
460 for(
unsigned int i=0;
i<hashMax;
i++)
461 if ( cachefullcont->
at(i) ==
nullptr ){
462 Identifier
id = theCaloCCIDM->
cell_id(i);
463 if ( id!=0 ){
465 if (
el->is_tile() ) {
467 } else {
469 }
470
472 }
473 }
474
479
480
481 cachefullcont->
order();
482
483 if ( hashMax != cachefullcont->
size() )
487 cache->fullcont = cachefullcont;
488
489 local_cell_copy.clear();
490 }
492 return 0x0;
493}
std::vector< size_t > vec
LArBadXCont< LArBadChannel > LArBadChannelCont
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Athena::TPCnvVers::Current TrigRoiDescriptor
void push_back_fast(CaloCell *)
reimplementation of push_back to gain speed in readin
void order()
order container
void setHasCalo(const CaloCell_ID::SUBCALO caloNum)
set which calo has been filled.
void setIsOrderedAndComplete(const bool ordered)
indicate that the container is complete and in order
void setIsOrdered(const bool ordered)
indicates that the container is ordered
size_type calo_cell_hash_max() const
cell 'global' hash table max size
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
const CaloCell_ID * getCaloCell_ID() const
get calo cell ID helper
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
const T * at(size_type n) const
Access an element, as an rvalue.
DataModel_detail::iterator< DataVector > iterator
Standard iterator.
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.
bool problematicForUnknownReason() const
bool good() const
Returns true if no problems at all (all bits at zero)
LArBC_t offlineStatus(const Identifier id) const
Query the status of a particular channel by offline ID This is the main client access method.
StatusCode initialize(void)
const std::vector< int > & Rw2PmtMap(int section)
const std::vector< int > & Rw2CellMap(int section)
void setHashIdToROD(const TileHid2RESrcID *p)
const std::vector< unsigned int > * MBTS_RODs()
std::map< unsigned int, unsigned int > & MBTS_map(void)
std::vector< unsigned int > m_mbts_add_rods
std::vector< uint32_t > m_vrodid32tile
const std::vector< unsigned int > * m_mbts_rods
std::vector< IdentifierHash > m_rIdstile
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
size_t getNSlots()
Return the number of event slots.
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.