LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | List of all members
UTIL::LCTrackerCellID Class Reference

Singleton helper class defining the cellID encoding used in the LC tracking packages. More...

#include <LCTrackerConf.h>

Public Member Functions

void set_encoding_string (const std::string &encodingString)
 set the encoding string. Throws exception if it was already accessed to prevent inconsistencies More...
 
void setAccessed ()
 set accessed to true More...
 

Static Public Member Functions

static LCTrackerCellIDinstance ()
 
static unsigned subdet ()
 index of subdet in cellID More...
 
static unsigned side ()
 index of side in cellID More...
 
static unsigned layer ()
 index of layer in cellID More...
 
static unsigned module ()
 index of module in cellID More...
 
static unsigned sensor ()
 index of sensor in cellID More...
 
static const std::stringencoding_string ()
 
static std::string valueString (unsigned val)
 return a string with the details of the given id: More...
 

Protected Member Functions

 LCTrackerCellID ()
 c'tor initialize the encoding string with the 'canonical' encoding More...
 

Protected Attributes

std::string _encoding
 
bool _accessed
 

Private Types

enum  {
  subdetID = 0, sideID = 1, layerID = 2, moduleID = 3,
  sensorID = 4
}
 

Detailed Description

Singleton helper class defining the cellID encoding used in the LC tracking packages.

It is assumed that the cellID contains the elements subdet, side, layer, module and sensor in that order. The actual encoding string can be set once, but only before it is accessed for the first time. The default encoding string is: "subdet:5,side:-2,layer:9,module:8,sensor:8"

[should replace UTIL::ILDCellID0 and DDKalTest::CellIDEncoding ]

Author
F.Gaede, DESY
Date
Mar, 2017

Definition at line 23 of file LCTrackerConf.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
subdetID 
sideID 
layerID 
moduleID 
sensorID 

Definition at line 26 of file LCTrackerConf.h.

Constructor & Destructor Documentation

UTIL::LCTrackerCellID::LCTrackerCellID ( )
inlineprotected

c'tor initialize the encoding string with the 'canonical' encoding

Definition at line 111 of file LCTrackerConf.h.

Member Function Documentation

static const std::string& UTIL::LCTrackerCellID::encoding_string ( )
inlinestatic

Definition at line 58 of file LCTrackerConf.h.

References _accessed, _encoding, and instance().

Referenced by valueString().

static LCTrackerCellID& UTIL::LCTrackerCellID::instance ( )
inlinestatic

Definition at line 37 of file LCTrackerConf.h.

Referenced by encoding_string(), and valueString().

static unsigned UTIL::LCTrackerCellID::layer ( )
inlinestatic

index of layer in cellID

Definition at line 49 of file LCTrackerConf.h.

References layerID.

static unsigned UTIL::LCTrackerCellID::module ( )
inlinestatic

index of module in cellID

Definition at line 52 of file LCTrackerConf.h.

References moduleID.

static unsigned UTIL::LCTrackerCellID::sensor ( )
inlinestatic

index of sensor in cellID

Definition at line 55 of file LCTrackerConf.h.

References sensorID.

void UTIL::LCTrackerCellID::set_encoding_string ( const std::string encodingString)
inline

set the encoding string. Throws exception if it was already accessed to prevent inconsistencies

Definition at line 72 of file LCTrackerConf.h.

References _accessed, _encoding, and std::string::find().

void UTIL::LCTrackerCellID::setAccessed ( )
inline

set accessed to true

Definition at line 104 of file LCTrackerConf.h.

References _accessed.

Referenced by valueString().

static unsigned UTIL::LCTrackerCellID::side ( )
inlinestatic

index of side in cellID

Definition at line 46 of file LCTrackerConf.h.

References sideID.

static unsigned UTIL::LCTrackerCellID::subdet ( )
inlinestatic

index of subdet in cellID

Definition at line 43 of file LCTrackerConf.h.

References subdetID.

static std::string UTIL::LCTrackerCellID::valueString ( unsigned  val)
inlinestatic

return a string with the details of the given id:

Definition at line 64 of file LCTrackerConf.h.

References encoding_string(), instance(), setAccessed(), UTIL::BitField64::setValue(), and UTIL::BitField64::valueString().

Member Data Documentation

bool UTIL::LCTrackerCellID::_accessed
protected

Definition at line 115 of file LCTrackerConf.h.

Referenced by encoding_string(), set_encoding_string(), and setAccessed().

std::string UTIL::LCTrackerCellID::_encoding
protected

Definition at line 114 of file LCTrackerConf.h.

Referenced by encoding_string(), and set_encoding_string().


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