LCIO
02.17
|
Specialization for SimTrackerHits that have only one cellID. More...
#include <CellIDEncoder.h>
Public Member Functions | |
CellIDEncoder (const CellIDEncoder &)=delete | |
CellIDEncoder & | operator= (const CellIDEncoder &)=delete |
CellIDEncoder (const std::string &cellIDEncoding, EVENT::LCCollection *col) | |
Constructor, sets collection parameter LCIO::CellIDEncoding to the given encoding string. More... | |
void | setCellID (T *hit) |
void | setCellIDFlag () |
Helper method that sets/unsets the proper bit for storing a second cellid word. More... | |
![]() | |
~BitField64 () | |
BitField64 (const std::string &initString) | |
The c'tor takes an initialization string of the form: <fieldDesc>[,<fieldDesc>...] fieldDesc = name:[start]:[-]length where: name: The name of the field start: The start bit of the field. More... | |
lcio::long64 | getValue () const |
Returns the current 64bit value. More... | |
void | setValue (lcio::long64 value) |
Set a new 64bit value. More... | |
void | reset () |
Reset - same as setValue(0) - useful if the same encoder is used for many objects. More... | |
BitFieldValue & | operator[] (size_t theIndex) |
Acces to field through index. More... | |
const BitFieldValue & | operator[] (size_t theIndex) const |
Const acces to field through index. More... | |
unsigned | highestBit () const |
Highest bit used in fields [0-63]. More... | |
size_t | size () const |
Number of values. More... | |
size_t | index (const std::string &name) const |
Index for field named 'name'. More... | |
BitFieldValue & | operator[] (const std::string &name) |
Access to field through name . More... | |
const BitFieldValue & | operator[] (const std::string &name) const |
Const Access to field through name . More... | |
unsigned | lowWord () const |
The low word, bits 0-31. More... | |
unsigned | highWord () const |
The high word, bits 32-63. More... | |
std::string | fieldDescription () const |
Return a valid description string of all fields. More... | |
std::string | valueString () const |
Return a string with a comma separated list of the current sub field values. More... | |
Protected Attributes | |
EVENT::LCCollection * | _col |
![]() | |
std::vector< BitFieldValue * > | _fields {} |
lcio::long64 | _value |
IndexMap | _map {} |
lcio::long64 | _joined |
Additional Inherited Members | |
![]() | |
typedef std::map< std::string, unsigned int > | IndexMap |
![]() | |
void | addField (const std::string &name, unsigned offset, int width) |
Add an additional field to the list. More... | |
void | init (const std::string &initString) |
Decode the initialization string as described in the constructor. More... | |
BitField64 () | |
No default c'tor. More... | |
Specialization for SimTrackerHits that have only one cellID.
Convenient class for encoding cellIDs for various hit objects. It sets the proper collection parameter LCIO::CellIDEncoding and sets the proper flag bit for storing a second cellid if necessary. See UTIL::BitField64 for a description of the encoding string. Example:
CellIDEncoder<SimCalorimeterHitImpl> cd( "i:20,j:20,k:20" ,calVec ) ;
for(int j=0;j<NHITS;j++){
SimCalorimeterHitImpl* hit = new SimCalorimeterHitImpl ;
cd["i"] = j ;
cd["j"] = j + 100 ;
cd["k"] = j + 200 ;
cd.setCellID( hit ) ;
}
Definition at line 100 of file CellIDEncoder.h.
|
delete |
|
inline |
Constructor, sets collection parameter LCIO::CellIDEncoding to the given encoding string.
Definition at line 109 of file CellIDEncoder.h.
References UTIL::CellIDEncoder< T >::_col, EVENT::LCCollection::parameters(), UTIL::CellIDEncoder< T >::setCellIDFlag(), and EVENT::LCParameters::setValue().
|
delete |
|
inline |
Definition at line 120 of file CellIDEncoder.h.
References UTIL::CellIDEncoder_setCellID(), UTIL::BitField64::highWord(), and UTIL::BitField64::lowWord().
|
inline |
Helper method that sets/unsets the proper bit for storing a second cellid word.
Definition at line 127 of file CellIDEncoder.h.
References UTIL::CellIDEncoder< T >::_col, EVENT::LCCollection::getFlag(), UTIL::BitField64::highestBit(), IMPL::LCFlagImpl::setBit(), and EVENT::LCCollection::setFlag().
Referenced by UTIL::CellIDEncoder< T >::CellIDEncoder().
|
protected |
Definition at line 154 of file CellIDEncoder.h.
Referenced by UTIL::CellIDEncoder< T >::CellIDEncoder(), and UTIL::CellIDEncoder< T >::setCellIDFlag().