ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCellContainer.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5//--------------------------------------------------------------
6// ivukotic@cern.ch added 3 functions for performace reasons.
7// use them carefully
8// 2 for updating begin and end calo iteerators
9// and push back fast
10// -------------------------------------------------------------
11
13#include "CaloEvent/CaloCell.h"
14#include "CaloDetDescr/CaloDetDescrElement.h"
17#include "CLHEP/Geometry/Vector3D.h"
18#include <algorithm>
19#include <atomic>
20
21
22namespace {
23
24
30int ilog2 (size_t x)
31{
32 int l=0;
33 --x;
34 while (x >= 1) {
35 ++l;
36 x >>= 1;
37 }
38 return l;
39}
40
41
42std::atomic<int> nWarningsToBePrinted = 20;
43
44
45} // anomymous namespace
46
47
50 m_hasTotalSize(false),
51 m_isOrdered(false),
53{
54 //initialise with empty iterators
55 for (int iCalo=0; iCalo< static_cast<int>(CaloCell_ID::NSUBCALO); ++iCalo){
56 m_hasCalo.push_back(false);
57 m_indexFirstCellCalo.push_back(-1);
58 m_indexLastCellCalo.push_back(-2);
59 m_beginConstCalo.push_back(this->begin());
60 m_endConstCalo.push_back(this->begin());
61 m_beginCalo.push_back(this->begin());
62 m_endCalo.push_back(this->begin());
63 }
64}
65
66
72
73
75{
77
78 // only allow const push_back if view cells
79 // if (ownPolicy()==SG::VIEW_ELEMENTS){
80 // std::cout << "ERROR Should not push_back non const cell in VIEW CaloCellContainer" << std::endl;
81 // }
82
83
84 this->setHasCalo(theCell->caloDDE()->getSubCalo()) ;
85
87
88}
89
90void CaloCellContainer::push_back(std::unique_ptr<CaloCell> theCell)
91{
93 this->setHasCalo(theCell->caloDDE()->getSubCalo()) ;
94
95 DataVector<CaloCell>::push_back(std::move(theCell));
96
97}
98
99
100
101/* to speed up reading of compactifed data */
106
107void CaloCellContainer::push_back_fast(std::unique_ptr<CaloCell> theCell)
108{
109 DataVector<CaloCell>::push_back(std::move(theCell));
110}
111
113 REPORT_MESSAGE_WITH_CONTEXT (MSG::WARNING, "CaloCellContainer")
114 << "CaloCellContainer::print not implemented";
115}
116
117
118
122
124{
125 return m_beginCalo[static_cast<int>(caloNum)];
126}
127
129{
130 return m_endCalo[static_cast<int>(caloNum)];
131}
132
136
138 return m_indexFirstCellCalo[static_cast<int>(caloNum)];
139}
140
142 return m_indexLastCellCalo[static_cast<int>(caloNum)];
143}
144
146 return this->indexLastCellCalo(caloNum)-this->indexFirstCellCalo(caloNum)+1;
147}
148
149
151 //should have maximum hash size in any case
152 if (!this->hasTotalSize()) return false;
153
154 CaloCellContainer::const_iterator itr=this->begin(),itrEnd=this->end();
155 unsigned int index=0;
156 for (;itr!=itrEnd;++itr){
157 if ( ((*itr)->caloDDE())->calo_hash()!=index) {
158 return false;
159 }
160 ++index;
161 }
162 return true;
163}
164
165void CaloCellContainer::setIsOrderedAndComplete(const bool orderedAndComplete) {
166 m_isOrderedAndComplete = orderedAndComplete ;
167}
168
172
174 CaloCellContainer::const_iterator itr=this->begin(),itrEnd=this->end();
175 unsigned int hashPrev=0;
176
177 for (;itr!=itrEnd;++itr){
178
179 const CaloCell * theCell=*itr;
180
181 const CaloDetDescrElement * theDDE = nullptr;
182
183 if (theCell==nullptr){
184 REPORT_MESSAGE_WITH_CONTEXT (MSG::WARNING, "CaloCellContainer")
185 << MSG::WARNING << "CaloCellContainer NULL CELL ";
186 } else {
187 theDDE=theCell->caloDDE();
188 if (theDDE==nullptr){
189 REPORT_MESSAGE_WITH_CONTEXT (MSG::WARNING, "CaloCellContainer")
190 << MSG::WARNING << "CaloCellContainer WARNING NULL DDE ";
191 }
192 else{
193 unsigned int hash=theDDE->calo_hash();
194 if ( hash < hashPrev) return false ;
195 hashPrev=hash;
196 }
197
198 }
199 }
200
201 return true;
202}
203
204void CaloCellContainer::setIsOrdered(const bool ordered) {
205 m_isOrdered = ordered;
206}
207
208
210 return m_hasCalo[static_cast<int>(caloNum)];
211}
212
214
215 const int iCalo=static_cast<int>(caloNum);
216
217 m_hasCalo[iCalo] = true;
218}
219
220
221namespace {
222
223
224struct is_calo
225{
226 is_calo (int c) : m_c (c) {}
227 bool operator() (const CaloCell* cell) const
228 { return cell->caloDDE()->getSubCalo() == m_c; }
229 int m_c;
230};
231
232
233} // anonymous namespace
234
235
244void
247{
248 if (beg == end) return;
249 int beg_calo = (*beg)->caloDDE()->getSubCalo();
250 int end_calo = (*(end-1))->caloDDE()->getSubCalo();
251 if (beg_calo == end_calo) {
252 m_beginCalo[beg_calo] = beg;
253 m_endCalo[beg_calo] = end;
254 m_beginConstCalo[beg_calo] = beg;
255 m_endConstCalo[beg_calo] = end;
256 m_indexFirstCellCalo[beg_calo] = beg - this->begin();
257 m_indexLastCellCalo[beg_calo] = end - this->begin() - 1;
258 }
259 else {
261 std::partition_point (beg, end, is_calo (beg_calo));
262 updateCaloIteratorsOrdered (beg, beg2);
264 }
265}
266
267
269{
270
271 //initialise
272 for (int iCalo=0; iCalo< static_cast<int>(CaloCell_ID::NSUBCALO); ++iCalo){
273 m_indexFirstCellCalo[iCalo]=-1;
274 m_indexLastCellCalo[iCalo]=-2;
275 m_beginConstCalo[iCalo]=this->begin();
276 m_endConstCalo[iCalo]=this->begin();
277 m_beginCalo[iCalo]=this->begin();
278 m_endCalo[iCalo]=this->begin();
279 }
280
283 return;
284 }
285
286 CaloCellContainer::const_iterator itr=this->begin(),itrEnd=this->end();
287 CaloCellContainer::iterator itrNonConst=this->begin();
288 int previousCellCalo=-1;
289 int index=0;
290 for (;itr!=itrEnd;++itr){
291 const int iCalo= static_cast<int>( (*itr)->caloDDE()->getSubCalo());
292 if (iCalo!=previousCellCalo){
293
294 // new calo domain
295 if (m_indexFirstCellCalo[iCalo]>=0){
296 REPORT_MESSAGE_WITH_CONTEXT (MSG::ERROR, "CaloCellContainer")
297 << " Specific calo cells are split."
298 << " Specific calo iterators will be wrong ";
299 }
301 m_beginConstCalo[iCalo]=itr;
302 m_beginCalo[iCalo]=itrNonConst;
303
304 if (previousCellCalo>=0){
305 m_indexLastCellCalo[previousCellCalo]=index-1;
306 m_endConstCalo[previousCellCalo]=itr;
307 m_endCalo[previousCellCalo]=itrNonConst;
308
309 }
310 }
311 previousCellCalo=iCalo;
312 ++itrNonConst;
313 ++index;
314 }
315
316 //case the calo is the last filled
317 if (previousCellCalo>=0){
318 m_indexLastCellCalo[previousCellCalo]=index-1;
319 m_endConstCalo[previousCellCalo]=itr;
320 m_endCalo[previousCellCalo]=itrNonConst;
321 }
322
323}
324
325
327 if (ic==0) {
328 m_beginConstCalo[ic]=this->begin();
329 m_beginCalo[ic]=this->begin();
331 }else{
332 m_beginConstCalo[ic]=this->end();
333 m_beginCalo[ic]=this->end();
334 m_indexFirstCellCalo[ic]=ind;
335 }
336}
337
339 m_endConstCalo[ic]=this->end();
340 m_endCalo[ic]=this->end();
341 m_indexLastCellCalo[ic]=ind-1;
342}
343
344
346{
347 int ndx = findIndex (theHash);
348 if (ndx >= 0)
349 return (*this)[ndx];
350 return nullptr;
351}
352
353
355{
356 int ndx = findIndex (theHash);
357 if (ndx >= 0)
358 return (*this)[ndx];
359 return nullptr;
360}
361
362
364{
365 //cache Identifierhash->unsigned int conversion (maybe too much)
366 const unsigned int theIndex = theHash ;
367
368 // if container is complete and in order use directly the container
369 if (isOrderedAndComplete()) return theIndex;
370
371 if (this->empty()) return -1;
372
373 const CxxUtils::PackedArray& lookUpTable = getLookUpTable();
374 if (theIndex < lookUpTable.size() )
375 return (int)lookUpTable[theIndex] - 1;
376 return -1;
377}
378
379
388template <class CONT, class VECT>
389void CaloCellContainer::findCellVectorT (CONT& cont, const std::vector<IdentifierHash> & theVectorHash, VECT& theCellVector)
390{
391 theCellVector.reserve (theCellVector.size() + theVectorHash.size());
392 if (cont.isOrderedAndComplete()) {
393
394 for (IdentifierHash hash : theVectorHash) {
395 theCellVector.push_back( cont[hash] );
396 }
397 return;
398 }
399
400 if (cont.empty()) return ;
401
402 const CxxUtils::PackedArray& lookUpTable = cont.getLookUpTable();
403
404 //look in look up table (do not put empty cells)
405
406 size_t tbsize = lookUpTable.size();
407 for (IdentifierHash hash : theVectorHash) {
408 // careful that the look up table might be shorter than the maximum hash
409 if (hash>=tbsize) continue ;
410 int ndx = (int)lookUpTable[ hash ] - 1;
411 if (ndx >= 0) {
412 auto theCell = cont[ndx];
413 if (theCell!=nullptr) {
414 theCellVector.push_back( theCell);
415 }
416 }
417
418 }
419}
420
421
422void CaloCellContainer::findCellVector(const std::vector<IdentifierHash> & theVectorHash,CellVector & theCellVector) const
423{
424 findCellVectorT (*this, theVectorHash, theCellVector);
425#if 0
426 theCellVector.reserve (theCellVector.size() + theVectorHash.size());
427 if (isOrderedAndComplete()) {
428
429 for (IdentifierHash hash : theVectorHash) {
430 theCellVector.push_back( (*this)[hash] );
431 }
432 return;
433 }
434
435 if (this->empty()) return ;
436
437 const CxxUtils::PackedArray& lookUpTable = getLookUpTable();
438
439 //look in look up table (do not put empty cells)
440
441 size_t tbsize = lookUpTable.size();
442 for (IdentifierHash hash : theVectorHash) {
443 // careful that the look up table might be shorter than the maximum hash
444 if (hash>=tbsize) continue ;
445 int ndx = (int)lookUpTable[ hash ] - 1;
446 if (ndx >= 0) {
447 const CaloCell * theCell = (*this)[ndx];
448 if (theCell!=0) {
449 theCellVector.push_back( theCell);
450 }
451 }
452
453 }
454#endif
455}
456
457void CaloCellContainer::findCellVector(const std::vector<IdentifierHash> & theVectorHash, MutableCellVector & theCellVector)
458{
459 findCellVectorT (*this, theVectorHash, theCellVector);
460}
461
466
472
473
475{
476 if (this->hasTotalSize()){
477 this->orderWhenComplete();
478 }
479 else{
480 this->orderWhenIncomplete();
481 }
482
483}
484
486{
487 // If the number of cells is small compared to the maximum number
488 // of cells, best to just use the STL sort and then remove duplicates.
489 // Otherwise, sort by inserting into a table based on the hash code.
490 // Break point chosen pretty much arbitrarily. Could be further
491 // tuned, but it probably doesn't really make much difference.
492 if (size() < 500) {
493 // Small number of cells. Use STL sort.
495
496 // Nb. Need to convert to int --- otherwise, 0-1 will wrap around
497 // to maxuint.
498 for (int i = 0; i < static_cast<int>(size())-1; ) {
499 if ((*this)[i]->caloDDE()->calo_hash() ==
500 (*this)[i+1]->caloDDE()->calo_hash())
501 {
502 REPORT_MESSAGE_WITH_CONTEXT (MSG::ERROR, "CaloCellContainer")
503 << "Duplicated cell: hash= " << (*this)[i]->caloDDE()->calo_hash();
504 erase (begin() + i);
505 }
506 else
507 ++i;
508 }
509 }
510 else {
511 // Sort for large container.
512
513 // Find the maximum possible hash code.
514 const CaloDetDescriptor* desc = front()->caloDDE()->descriptor();
515 IdentifierHash max_hash = desc->get_calo_helper()->calo_cell_hash_max();
516
517 // Make a temporary container that can hold all possible cells.
518 DataVector<CaloCell> tmp (max_hash+1, ownPolicy());
519
520 // Move cells into the temporary container, according to hashes.
522 for (DataVector<CaloCell>::iterator it = begin(); it != itend; ++it) {
523 IdentifierHash hash = (*it)->caloDDE()->calo_hash();
524 assert (hash < tmp.size());
525
526 if (tmp[hash] != nullptr) {
527 REPORT_MESSAGE_WITH_CONTEXT (MSG::ERROR, "CaloCellContainer")
528 << "Duplicated cell: hash= " << hash;
529 }
530 else {
531 using std::iter_swap;
532 iter_swap (tmp.begin() + hash, it);
533 }
534 }
535
536 // Now, move the cells back, eliminating spaces.
537 itend = tmp.end();
539 for (DataVector<CaloCell>::iterator it = tmp.begin(); it != itend; ++it) {
540 if (*it != nullptr) {
541 using std::iter_swap;
542 iter_swap (itout, it);
543 ++itout;
544 }
545 }
546
547 // May be less, if there were duplicates.
548 // cppcheck-suppress assertWithSideEffect
549 assert (itout <= end());
550 resize (itout - begin());
551 }
553 setIsOrdered(true);
554}
555
557{
559 tmp.swap (*this);
560 reserve (tmp.size());
561
562 DataVector<CaloCell>::iterator tmpend = tmp.end();
563 for (DataVector<CaloCell>::iterator it = tmp.begin(); it != tmpend; ++it) {
564 IdentifierHash hash = (*it)->caloDDE()->calo_hash();
565
566 if (hash >= size())
567 resize (hash + 1);
568
569 if ((*this)[hash] != nullptr) {
570 REPORT_MESSAGE_WITH_CONTEXT (MSG::ERROR, "CaloCellContainer")
571 << "Duplicated cell: hash= " << hash;
572 }
573 else {
574 using std::iter_swap;
575 iter_swap (begin() + hash, it);
576 }
577 }
578
579 // set the Ordered And Complete flag
580 this->setIsOrderedAndComplete(true);
581
582 // look up table is not necessary anymore
583 this->resetLookUpTable();
584}
585
587{
588 // FIXME should have an argument about duplicates
589 // fill the look up table
590 // note that if CaloCellContainer is not completely filled, there
591 // is no guarantee it has the correct size, hence the size should
592 // be checked at every call
593 // (CaloCellContainer has no way to know the maximum size)
594 // Now (30.07.2008) have it always max number of cells (hardcoded) to speed up.
595
596 if (!m_lookUpTable.isValid()) {
597
598 unsigned int theSize=0;
599 size_t ncells = size();
600 CxxUtils::PackedArray lookUpTable (std::max (1, ilog2 (ncells + 1)));
601
602 if (ncells > 0) {
603
604 // Set the size of the lookup table.
605 // If the cells are sorted, we can look at the last cell to know
606 // the maximum hash we're dealing with. Otherwise, set it to the
607 // maximum cell hash value.
608 if (isOrdered()) {
609 // Set LUT size from the hash of the last cell.
610 theSize = back()->caloDDE()->calo_hash()+1;
611 }
612 else {
613 // Find the maximum hash.
614 const CaloDetDescriptor* desc = front()->caloDDE()->descriptor();
615 IdentifierHash max_hash = desc->get_calo_helper()->calo_cell_hash_max();
616 theSize = max_hash + 1;
617 }
618 lookUpTable.resize (theSize);
619
620 for (size_t icell = 0; icell < ncells; icell++) {
621
622 const CaloCell * theCell = (*this)[icell];
623 const IdentifierHash theHash=theCell->caloDDE()->calo_hash();
624
625 assert (theHash < theSize);
626
627 if (nWarningsToBePrinted > 0) {
628 // We may actually enter here nWarningsToBePrinted times
629 // if multiple threads race here, but it doesn't matter.
630 int nwarn = nWarningsToBePrinted--;
631 int iold = (int)(lookUpTable[theHash])-1;
632 if (iold >= 0) {
633 if ((size_t)iold == icell) {
634 REPORT_MESSAGE_WITH_CONTEXT (MSG::WARNING, "CaloCellContainer")
635 << "Repeated cell. hash= " << theHash;
636 }
637 else if ((*this)[iold]->ID()==theCell->ID()) {
638 REPORT_MESSAGE_WITH_CONTEXT (MSG::WARNING, "CaloCellContainer")
639 << "Duplicated cell. hash="
640 << theHash
641 << " E1=" << (*this)[iold]->e()
642 << " E2=" << theCell->e();
643 // should delete the cell?
644 } else {
645 REPORT_MESSAGE_WITH_CONTEXT (MSG::WARNING, "CaloCellContainer")
646 << "Should be impossible ! Repeated cell. hash= " << theHash;
647 }
648 if (nwarn==0) {
649 REPORT_MESSAGE_WITH_CONTEXT (MSG::INFO, "CaloCellContainer")
650 << "No more WARNING will be printed";
651 }
652 }
653 } // end of print out
654
655 lookUpTable[theHash]=icell+1;
656 }
657 }
658 m_lookUpTable.set (std::move (lookUpTable));
659 }
660
661 return *m_lookUpTable.ptr();
662}
663
664
666 return a->caloDDE()->calo_hash() < b->caloDDE()->calo_hash(); }
668 return a.caloDDE()->calo_hash() < b.caloDDE()->calo_hash(); }
669
670
671namespace SG {
672
673
674template <>
675bool
677 CaloCell const * const & element,
679{
680 int ndx = data.findIndex (element->caloDDE()->calo_hash());
681 if (ndx >= 0) {
682 index = ndx;
683 return true;
684 }
685 return false;
686}
687
688
689
690
691} // namespace SG
std::vector< Identifier > ID
Definition of CaloDetDescriptor.
Helpers for checking error return status codes and reporting errors.
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
static Double_t a
#define x
functor to order cells according to caloHash
bool operator()(const CaloCell *a, const CaloCell *b) const
Container class for CaloCell.
std::vector< CaloCellContainer::iterator > m_endCalo
CaloCellContainer::const_iterator beginConstCalo(CaloCell_ID::SUBCALO caloNum) const
get const iterators on cell of just one calo
std::vector< const CaloCell * > CellVector
type to be used for the internal lookup table, and to return list of cells
bool hasTotalSize() const
tell wether container has total hash id size
void orderWhenIncomplete()
order when container is incomplete
void updateCaloEndIterators(int ic, int ind)
fills calo iterators and the index of last cell for a given subcalo
void findCellVector(const std::vector< IdentifierHash > &theVectorHash, CellVector &theCellVector) const
fast find method given vector of identifier hash.
static void print()
dump (obsolete)
CaloCellContainer::const_iterator endConstCalo(CaloCell_ID::SUBCALO caloNum) const
int indexFirstCellCalo(const CaloCell_ID::SUBCALO caloNum) const
index of first cell of given calorimeter (-1 if none).
void push_back_fast(CaloCell *)
reimplementation of push_back to gain speed in readin
bool checkOrdered() const
verify one by one the container is ordered
std::vector< CaloCellContainer::const_iterator > m_endConstCalo
CaloCellContainer::iterator beginCalo(CaloCell_ID::SUBCALO caloNum)
get non const iterators on cell of just one calo
CxxUtils::CachedValue< CxxUtils::PackedArray > m_lookUpTable
look up table of size HashIdentifiermax.
bool m_isOrdered
true if ordered
std::vector< CaloCellContainer::iterator > m_beginCalo
non const iterators for the different calorimeters
const CaloCell * findCell(const IdentifierHash theHash) const
fast find method given identifier hash.
static void findCellVectorT(CONT &cont, const std::vector< IdentifierHash > &theVectorHash, VECT &theCellVector)
Look up a group of cells by IdentifierHash.
bool hasCalo(const CaloCell_ID::SUBCALO caloNum) const
tell wether it has been filled with cells (maybe none) of a given calo
void resetLookUpTable()
reset look up table
void push_back(CaloCell *)
reimplementation of const push_back
std::vector< int > m_indexLastCellCalo
index of first cell of given calo (-2 if none)
void order()
order container
void setHasCalo(const CaloCell_ID::SUBCALO caloNum)
set which calo has been filled.
void setHasTotalSize(const bool)
If @ flag is true, then the container size equals the maximum hash.
std::vector< bool > m_hasCalo
true if given cell from given calo has been filled (even if none)
CaloCellContainer::iterator endCalo(CaloCell_ID::SUBCALO caloNum)
std::vector< CaloCell * > MutableCellVector
Return from non-const findCellVector.
bool isOrdered() const
tell wether container is ordered
void orderWhenComplete()
order when container is complete
bool checkOrderedAndComplete() const
verify one by one the container is complete (i.e.
void updateCaloIteratorsOrdered(CaloCellContainer::iterator beg, CaloCellContainer::iterator end)
Recursively find division points between subcalos in the container.
int indexLastCellCalo(const CaloCell_ID::SUBCALO caloNum) const
index of last cell of given calorimeter (-2 if none) Note that it is normally more efficient to use i...
CaloCellContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Main constructor.
bool m_hasTotalSize
true if size correspond to maximum hash.
void initializeLookUpTable()
initialize look up table.
bool isOrderedAndComplete() const
tell wether container is complete and in order
void setIsOrderedAndComplete(const bool ordered)
indicate that the container is complete and in order
int findIndex(const IdentifierHash theHash) const
Return index of the cell with a given hash.
bool m_isOrderedAndComplete
true if complete and in right order
void setIsOrdered(const bool ordered)
indicates that the container is ordered
void updateCaloBeginIterators(int ic, int ind)
fills calo iterators and the index of first cell for a given subcalo
std::vector< CaloCellContainer::const_iterator > m_beginConstCalo
const iterators for the different calorimeters
int nCellsCalo(const CaloCell_ID::SUBCALO caloNum) const
get number of cels of given calorimeter
const CxxUtils::PackedArray & getLookUpTable() const
Retrieve an initialized lookup table.
void updateCaloIterators()
fill calo iterators and the index of first and last cell IT IS THE RESPONSABILITY OF THE PRODUCER TO ...
std::vector< int > m_indexFirstCellCalo
index of first cell of given calo (-1 if none)
CaloCell_Base_ID::SUBCALO SUBCALO
Definition CaloCell_ID.h:50
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
virtual double e() const override final
get energy (data member) (synonym to method energy()
Definition CaloCell.h:333
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition CaloCell.h:321
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition CaloCell.h:295
This class groups all DetDescr information related to a CaloCell.
const CaloDetDescriptor * descriptor() const
cell descriptor
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
An array of unsigned values of some bit size, packed tightly.
Definition PackedArray.h:42
size_type size() const
Returns the number of elements in the collection.
void resize(size_type sz, value_type c=0)
Resizes the collection to the specified number of elements.
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
void resize(size_type sz)
const CaloCell * back() const
typename DataVectorBase< CaloCell >::Base::size_type size_type
Definition DataVector.h:814
void reserve(size_type n)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataModel_detail::iterator< DataVector > iterator
Definition DataVector.h:842
DataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
const_iterator end() const noexcept
iterator erase(iterator position)
const_iterator begin() const noexcept
const CaloCell * front() const
SG::OwnershipPolicy ownPolicy() const
size_type size() const noexcept
static void iter_swap(iterator a, iterator b)
bool empty() const noexcept
This is a "hash" representation of an Identifier.
l
Printing final latex table to .tex output file.
Forward declaration.
OwnershipPolicy
bool findInContainer(const CaloCellContainer &data, CaloCell const *const &element, CaloCellContainer::size_type &index)
Definition index.py:1
void iter_swap(typename DataModel_detail::iterator< DV > a, typename DataModel_detail::iterator< DV > b)
Specialization of iter_swap for DataVector/DataList.