7#ifndef CALOEVENT_CALOCELLCONTAINER_H
8#define CALOEVENT_CALOCELLCONTAINER_H
93 void push_back(std::unique_ptr<CaloCell>);
104 static void print() ;
252 template <
class CONT,
class VECT>
254 const std::vector<IdentifierHash> & theVectorHash,
255 VECT& theCellVector);
Cached value with atomic update.
#define SG_BASE(D, B)
Declare that class D derives from class B.
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
An STL vector of pointers that by default owns its pointed-to elements.
char data[hepevt_bytes_allocation_ATLAS]
An array of unsigned values of some bit size, packed tightly.
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
friend class CaloCompactCellTool
friend class FullCaloCellContMaker
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
friend class CaloConstCellContainer
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
IMessageSvc * msgSvc() const
get message service
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
friend class CaloCellContainerFinalizerTool
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
virtual ~CaloCellContainer()
destructor
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 ...
friend class EmptyCellBuilderTool
friend class CaloCellContCopyTool
std::vector< int > m_indexFirstCellCalo
index of first cell of given calo (-1 if none)
CaloCell_Base_ID::SUBCALO SUBCALO
Data object for each calorimeter readout cell.
Cached value with atomic update.
An array of unsigned values of some bit size, packed tightly.
DataModel_detail::const_iterator< DataVector > const_iterator
typename DataVectorBase< CaloCell >::Base::size_type size_type
DataModel_detail::iterator< DataVector > iterator
DataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
const_iterator end() const noexcept
SG::OwnershipPolicy ownPolicy() const
This is a "hash" representation of an Identifier.
Define a specializable method for finding the index of an object within a container.
@ OWN_ELEMENTS
this data object owns its elements