|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef CALOEVENT_CALOCELLCONTAINER_H
8 #define CALOEVENT_CALOCELLCONTAINER_H
72 typedef std::vector<const CaloCell*>
CellVector;
93 void push_back(std::unique_ptr<CaloCell>);
104 static void print() ;
222 IMessageSvc*
msgSvc()
const;
252 template <
class CONT,
class VECT>
254 const std::vector<IdentifierHash> & theVectorHash,
255 VECT& theCellVector);
char data[hepevt_bytes_allocation_ATLAS]
CxxUtils::CachedValue< CxxUtils::PackedArray > m_lookUpTable
look up table of size HashIdentifiermax.
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...
void initializeLookUpTable()
initialize look up table.
Const iterator class for DataVector/DataList.
bool checkOrderedAndComplete() const
verify one by one the container is complete (i.e.
bool hasTotalSize() const
tell wether container has total hash id size
void setHasTotalSize(const bool)
If @ flag is true, then the container size equals the maximum hash.
void findCellVector(const std::vector< IdentifierHash > &theVectorHash, CellVector &theCellVector) const
fast find method given vector of identifier hash.
std::vector< int > m_indexFirstCellCalo
index of first cell of given calo (-1 if none)
bool m_isOrderedAndComplete
true if complete and in right order
bool m_hasTotalSize
true if size correspond to maximum hash.
void setIsOrdered(const bool ordered)
indicates that the container is ordered
void setHasCalo(const CaloCell_ID::SUBCALO caloNum)
set which calo has been filled.
void updateCaloBeginIterators(int ic, int ind)
fills calo iterators and the index of first cell for a given subcalo
bool m_isOrdered
true if ordered
CaloCellContainer::const_iterator beginConstCalo(CaloCell_ID::SUBCALO caloNum) const
get const iterators on cell of just one calo
bool isOrdered() const
tell wether container is ordered
virtual ~CaloCellContainer()
destructor
functor to order cells according to caloHash
bool operator()(const CaloCell *a, const CaloCell *b) const
static void print()
dump (obsolete)
CaloCellContainer::iterator endCalo(CaloCell_ID::SUBCALO caloNum)
OwnershipPolicy
describes the possible element ownership policies (see e.g. DataVector)
An array of unsigned values of some bit size, packed tightly.
int indexFirstCellCalo(const CaloCell_ID::SUBCALO caloNum) const
index of first cell of given calorimeter (-1 if none).
void orderWhenComplete()
order when container is complete
CaloCellContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Main constructor.
(Non-const) Iterator class for DataVector/DataList.
@ OWN_ELEMENTS
this data object owns its elements
SG_BASE(CaloCellContainer, DataVector< CaloCell >)
IMessageSvc * msgSvc() const
get message service
SUBCALO
enumeration of sub calorimeters
friend class FullCaloCellContMaker
int nCellsCalo(const CaloCell_ID::SUBCALO caloNum) const
get number of cels of given calorimeter
const CaloCell * findCell(const IdentifierHash theHash) const
fast find method given identifier hash.
void push_back_fast(CaloCell *)
reimplementation of push_back to gain speed in readin
Cached value with atomic update.
std::vector< CaloCell * > MutableCellVector
Return from non-const findCellVector.
void updateCaloIterators()
fill calo iterators and the index of first and last cell IT IS THE RESPONSABILITY OF THE PRODUCER TO ...
bool checkOrdered() const
verify one by one the container is ordered
bool findInContainer(const CaloCellContainer &data, CaloCell const *const &element, CaloCellContainer::size_type &index)
void order()
order container
std::vector< CaloCellContainer::iterator > m_beginCalo
non const iterators for the different calorimeters
Container class for CaloCell.
const CxxUtils::PackedArray & getLookUpTable() const
Retrieve an initialized lookup table.
CaloCellContainer::iterator beginCalo(CaloCell_ID::SUBCALO caloNum)
get non const iterators on cell of just one calo
std::vector< CaloCellContainer::const_iterator > m_beginConstCalo
const iterators for the different calorimeters
void resetLookUpTable()
reset look up table
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Define a specializable method for finding the index of an object within a container.
An STL vector of pointers that by default owns its pointed-to elements.
std::vector< bool > m_hasCalo
true if given cell from given calo has been filled (even if none)
bool isOrderedAndComplete() const
tell wether container is complete and in order
Data object for each calorimeter readout cell.
CaloCellContainer that can accept const cell pointers.
void orderWhenIncomplete()
order when container is incomplete
void push_back(CaloCell *)
reimplementation of const push_back
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
CaloCellContainer::const_iterator endConstCalo(CaloCell_ID::SUBCALO caloNum) const
int findIndex(const IdentifierHash theHash) const
Return index of the cell with a given hash.
SG::OwnershipPolicy ownPolicy() const
Return the ownership policy setting for this container.
An array of unsigned values of some bit size, packed tightly.
bool hasCalo(const CaloCell_ID::SUBCALO caloNum) const
tell wether it has been filled with cells (maybe none) of a given calo
std::vector< CaloCellContainer::const_iterator > m_endConstCalo
std::vector< CaloCellContainer::iterator > m_endCalo
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
BASE::size_type size_type
static void findCellVectorT(CONT &cont, const std::vector< IdentifierHash > &theVectorHash, VECT &theCellVector)
Look up a group of cells by IdentifierHash.
void setIsOrderedAndComplete(const bool ordered)
indicate that the container is complete and in order
macros to associate a CLID to a type
std::vector< const CaloCell * > CellVector
type to be used for the internal lookup table, and to return list of cells
void updateCaloEndIterators(int ic, int ind)
fills calo iterators and the index of last cell for a given subcalo
std::vector< int > m_indexLastCellCalo
index of first cell of given calo (-2 if none)