LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
UTIL::CellIDDecoder< T > Class Template Reference

Convenient class for decoding cellIDs from collection parameter LCIO::CellIDEncoding. More...

#include <CellIDDecoder.h>

Public Member Functions

 CellIDDecoder ()=default
 
 CellIDDecoder (const CellIDDecoder &)=delete
 
CellIDDecoderoperator= (const CellIDDecoder &)=delete
 
 CellIDDecoder (const std::string &encoder_str)
 Constructor takes encoding string as argument. More...
 
 CellIDDecoder (const EVENT::LCCollection *col)
 Constructor reads encoding string from collection parameter LCIO::CellIDEncoding. More...
 
 ~CellIDDecoder ()
 
const BitField64operator() (const T *hit)
 Provides access to the bit fields, e.g. More...
 
 LCIO_DEPRECATED ("No longer supported for thread safety issues", static void setDefaultEncoding(const std::string &defaultEncoding))
 This can be used to set the default encoding that is used if no CellIDEncoding parameter is set in the collection, e.g. More...
 

Protected Attributes

BitField64_b {}
 
const T * _oldHit {NULL}
 

Static Protected Attributes

static const std::string _defaultEncoding = std::string("M:3,S-1:3,I:9,J:9,K-1:6")
 

Detailed Description

template<class T>
class UTIL::CellIDDecoder< T >

Convenient class for decoding cellIDs from collection parameter LCIO::CellIDEncoding.

See UTIL::BitField64 for a description of the encoding string.

See Also
BitField64
Version
Id:
CellIDDecoder.h,v 1.9.16.1 2011-03-04 14:09:07 engels Exp

Definition at line 29 of file CellIDDecoder.h.

Constructor & Destructor Documentation

template<class T>
UTIL::CellIDDecoder< T >::CellIDDecoder ( )
default
template<class T>
UTIL::CellIDDecoder< T >::CellIDDecoder ( const CellIDDecoder< T > &  )
delete
template<class T>
UTIL::CellIDDecoder< T >::CellIDDecoder ( const std::string encoder_str)
inline

Constructor takes encoding string as argument.

Definition at line 40 of file CellIDDecoder.h.

References UTIL::CellIDDecoder< T >::_b, and std::string::length().

template<class T>
UTIL::CellIDDecoder< T >::CellIDDecoder ( const EVENT::LCCollection col)
inline

Constructor reads encoding string from collection parameter LCIO::CellIDEncoding.

Definition at line 51 of file CellIDDecoder.h.

References UTIL::CellIDDecoder< T >::_b, UTIL::CellIDDecoder< T >::_defaultEncoding, std::endl(), EVENT::LCCollection::getParameters(), EVENT::LCParameters::getStringVal(), and std::string::size().

template<class T>
UTIL::CellIDDecoder< T >::~CellIDDecoder ( )
inline

Definition at line 74 of file CellIDDecoder.h.

References UTIL::CellIDDecoder< T >::_b.

Member Function Documentation

template<class T>
UTIL::CellIDDecoder< T >::LCIO_DEPRECATED ( "No longer supported for thread safety issues"  ,
static void   setDefaultEncodingconst std::string &defaultEncoding 
)

This can be used to set the default encoding that is used if no CellIDEncoding parameter is set in the collection, e.g.

in older lcio files.

template<class T>
const BitField64& UTIL::CellIDDecoder< T >::operator() ( const T *  hit)
inline

Provides access to the bit fields, e.g.


int layer = myCellIDEncoding( hit )[ "layer" ] ;

Definition at line 84 of file CellIDDecoder.h.

References UTIL::CellIDDecoder< T >::_b, UTIL::CellIDDecoder< T >::_oldHit, and UTIL::BitField64::setValue().

template<class T>
CellIDDecoder& UTIL::CellIDDecoder< T >::operator= ( const CellIDDecoder< T > &  )
delete

Member Data Documentation

template<class T>
BitField64* UTIL::CellIDDecoder< T >::_b {}
protected
template<class T>
const std::string UTIL::CellIDDecoder< T >::_defaultEncoding = std::string("M:3,S-1:3,I:9,J:9,K-1:6")
staticprotected

Definition at line 111 of file CellIDDecoder.h.

Referenced by UTIL::CellIDDecoder< T >::CellIDDecoder().

template<class T>
const T* UTIL::CellIDDecoder< T >::_oldHit {NULL}
protected

Definition at line 109 of file CellIDDecoder.h.

Referenced by UTIL::CellIDDecoder< T >::operator()().


The documentation for this class was generated from the following file: