![]() |
ATLAS Offline Software
|
container class for CaloCompactCell
objects
More...
#include <CaloCompactCellContainer.h>
Classes | |
class | compact_input_iterator |
Simple iterator-like object for reading from the container. More... | |
class | compact_output_iterator |
Simple iterator-like object for writing to the container. More... | |
Public Types | |
typedef int | value_type |
value type for the internal data More... | |
Public Member Functions | |
CaloCompactCellContainer () | |
default Constructor. More... | |
CaloCompactCellContainer (const std::vector< value_type > &theCompactData) | |
Constructor. More... | |
virtual | ~CaloCompactCellContainer () |
void | getCompactCellDataTime (const int &iCell, CaloCompactCell::value_type &dataTime) const |
to speed things up ivuko added this inline function to be used instead of the two bellow. tic@ cern. chMore... | |
CaloCompactCell | getCompactCell (const int &iCell, const int &nBytesPerCell) const |
returns the compactified CaloCell data More... | |
const std::vector< value_type > & | getData () const |
returns the entire compact cell container (includes header) More... | |
std::vector< value_type > & | getData () |
returns the entire compact cell container (includes header) More... | |
const std::vector< value_type > | getHeader () const |
returns header portion of the compact cell container More... | |
void | resize (const unsigned int &totalSize) |
resize the data vector to totalSize (includes Header) More... | |
void | setHeader (const std::vector< value_type > &theHeader) |
replaces the current header (if there was one) More... | |
void | setCompactCell (const CaloCompactCell &theCompactCell, const int &iCell, const int &headerLength) |
store the compact cell with index iCell More... | |
void | setCompactCellDataTime (CaloCompactCell::value_type &theCompactCell, const int &iCell, const int &headerLength) |
to speed things up ivuko added this inline function to be used instead of the one above. tic@ cern. chMore... | |
compact_input_iterator | compact_begin_input () const |
Return a new compact_input_iterator pointing at the start of the data. More... | |
compact_input_iterator | compact_begin_input_from (int) const |
Return a new compact_input_iterator pointing at position given as the parameter BUT from the end of the data. More... | |
compact_output_iterator | compact_begin_output (int headerLength) |
Return a new compact_output_iterator pointing at the start of the data. More... | |
Private Attributes | |
std::vector< value_type > | m_compactData |
vector containing header and compact cell data. More... | |
container class for CaloCompactCell
objects
CaloCell
objects from a complete CaloCellContainer
. The completeness is required in the sense that for every Calorimeter present in the CaloCellContainer
all possible cells have to be filled. This allows for not storing the Identifier
for the cells. The compact cells (and instances of this class) are produced by the CaloCompactCellTool
in CaloTools
. Definition at line 30 of file CaloCompactCellContainer.h.
typedef int CaloCompactCellContainer::value_type |
value type for the internal data
The internal data format has a length of 32bit. Therefore this type must have the length of 32 bits.
Definition at line 40 of file CaloCompactCellContainer.h.
|
inline |
default Constructor.
Definition at line 53 of file CaloCompactCellContainer.h.
|
inline |
Constructor.
theCompactData | The vector holding the header and CaloCompactCell data |
Definition at line 63 of file CaloCompactCellContainer.h.
|
inlinevirtual |
Definition at line 67 of file CaloCompactCellContainer.h.
|
inline |
Return a new compact_input_iterator
pointing at the start of the data.
Definition at line 337 of file CaloCompactCellContainer.h.
|
inline |
Return a new compact_input_iterator
pointing at position given as the parameter BUT from the end of the data.
Definition at line 344 of file CaloCompactCellContainer.h.
|
inline |
Return a new compact_output_iterator
pointing at the start of the data.
headerLength | The length of the header in front of the data. |
Definition at line 404 of file CaloCompactCellContainer.h.
CaloCompactCell CaloCompactCellContainer::getCompactCell | ( | const int & | iCell, |
const int & | nBytesPerCell | ||
) | const |
returns the compactified CaloCell
data
iCell | the index of the cell in the CaloCompactCellContainer |
nBytesPerCell | the size of each CaloCompactCell in bytes |
CaloCompactCell
returns the compactified CaloCell
information in form of a CaloCompactCell
which is needed to restore the original CaloCell
object.
Definition at line 21 of file CaloCompactCellContainer.cxx.
|
inline |
to speed things up ivuko added this inline function to be used instead of the two bellow. tic@ cern. ch
It uses no vectors since it takes time to make them. nwords and a loop over them is removed since nwords is always=1 as nBytesPerCell is = sizeof(CaloCompactCell::value_type) Its inlined and calculation is simplifed
Definition at line 265 of file CaloCompactCellContainer.h.
|
inline |
returns the entire compact cell container (includes header)
Definition at line 105 of file CaloCompactCellContainer.h.
|
inline |
returns the entire compact cell container (includes header)
Definition at line 97 of file CaloCompactCellContainer.h.
const std::vector< CaloCompactCellContainer::value_type > CaloCompactCellContainer::getHeader | ( | ) | const |
returns header portion of the compact cell container
Definition at line 53 of file CaloCompactCellContainer.cxx.
void CaloCompactCellContainer::resize | ( | const unsigned int & | totalSize | ) |
resize the data vector to totalSize (includes Header)
totalSize | the total size in unites of value_type |
Definition at line 61 of file CaloCompactCellContainer.cxx.
void CaloCompactCellContainer::setCompactCell | ( | const CaloCompactCell & | theCompactCell, |
const int & | iCell, | ||
const int & | headerLength | ||
) |
store the compact cell with index iCell
theCompactCell | the compact CaloCell data |
iCell | the index in the CaloCompactCellContainer |
headerLength | the space reserved for the header information |
Definition at line 73 of file CaloCompactCellContainer.cxx.
|
inline |
to speed things up ivuko added this inline function to be used instead of the one above. tic@ cern. ch
It uses no vectors since it takes time to make them. nwords and a loop over them is removed since nwords is always=1 as nBytesPerCell is = sizeof(CaloCompactCell::value_type) Its inlined and calculation is simplifed
Definition at line 272 of file CaloCompactCellContainer.h.
void CaloCompactCellContainer::setHeader | ( | const std::vector< value_type > & | theHeader | ) |
replaces the current header (if there was one)
theHeader | the new header |
used by the compactifier tool on creation of the container
Definition at line 66 of file CaloCompactCellContainer.cxx.
|
private |
vector containing header and compact cell data.
the first int in the vector must contain the header length (in number of 32bit ints) including the first int
Definition at line 50 of file CaloCompactCellContainer.h.