CFEL - ASG Software Suite  2.5.0
CASS
Public Member Functions | Private Attributes | List of all members
cass::lclsid::Key Class Reference

Key for IdConversion Map. More...

#include <lcls_key.hpp>

Public Member Functions

 Key (const Pds::TypeId::Type &detectorType, const Pds::DetInfo::Detector &det, uint32_t detId, const Pds::DetInfo::Device &dev, uint32_t devId)
 constructor More...
 
 Key (const Pds::TypeId::Type &detectorType, uint32_t physicalId)
 constructor More...
 
bool operator< (const Key &other) const
 check whether this is less than other More...
 

Private Attributes

uint32_t _detectorType
 type of the detector contained in the xtc More...
 
uint32_t _detector
 the physical value of the detectors data. More...
 

Detailed Description

Key for IdConversion Map.

This will take the different information from the xtc and transform it to a unique key by having a comparison smaller than applied.

Unfortunately the xtc differentiats between the detector and the detectorId the detector is an enum described in Pds::DetInfo::Detector and the detector id is different. The same is true for the device. Both, the detector ids and the device ids are encoded in a single unsigned 32 bit integer. To identify a single detector it is therefore necessary to give all the information.

Author
Lutz Foucar

Definition at line 29 of file lcls_key.hpp.

Constructor & Destructor Documentation

cass::lclsid::Key::Key ( const Pds::TypeId::Type &  detectorType,
const Pds::DetInfo::Detector det,
uint32_t  detId,
const Pds::DetInfo::Device &  dev,
uint32_t  devId 
)
inline

constructor

will create the physical from the detector and device inputs. The detectorType can just be copied.

Parameters
detectorTypethe type of data contained in the xtc
detenum of the detector itself
detIdthe id of the detector
devenum of the device of the data
devIdthe id of the device

Definition at line 43 of file lcls_key.hpp.

cass::lclsid::Key::Key ( const Pds::TypeId::Type &  detectorType,
uint32_t  physicalId 
)
inline

constructor

one can retrieve the physical id and the type id directly from the xtc. Therefore a direct assigmnet is possible.

Parameters
detectorTypethe type of data contained in the xtc
physicalIdthe id that has the info about device and detector encoded

Definition at line 58 of file lcls_key.hpp.

Member Function Documentation

bool cass::lclsid::Key::operator< ( const Key other) const
inline

check whether this is less than other

will compare for less first the _detectorType. If this is the same it will compare for less the _detector value. This makes sure that the lcls Id is unique.

Parameters
otherthe other key that one compares this key to

Definition at line 70 of file lcls_key.hpp.

References _detector, and _detectorType.

Member Data Documentation

uint32_t cass::lclsid::Key::_detector
private

the physical value of the detectors data.

Definition at line 82 of file lcls_key.hpp.

Referenced by operator<().

uint32_t cass::lclsid::Key::_detectorType
private

type of the detector contained in the xtc

Definition at line 79 of file lcls_key.hpp.

Referenced by operator<().


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