CFEL - ASG Software Suite
2.5.0
CASS
|
#include <acqiris_converter.h>
Public Member Functions | |
void | operator() (const Pds::Xtc *, CASSEvent *) |
takes the xtc and copies the data to cassevent More... | |
![]() | |
virtual | ~ConversionBackend () |
virtual destructor to make clear this is a base class More... | |
virtual void | prepare (cass::CASSEvent *) |
prepare the cassevent More... | |
virtual void | finalize (cass::CASSEvent *) |
finalize the event More... | |
const pdstypelist_t & | pdsTypeList () const |
return the list of pds type ids the converter is responsible for More... | |
Static Public Member Functions | |
static ConversionBackend::shared_pointer | instance () |
create singleton if doesnt exist already More... | |
![]() | |
static shared_pointer | instance (const std::string &type) |
return the requested converter type More... | |
Private Types | |
typedef std::map< lclsid::Key, Device::instruments_t::key_type > | idmap_t |
define the map for lcls key to cass id More... | |
typedef std::map< Device::instruments_t::key_type, size_t > | configStore_t |
define the store of the config information More... | |
Private Member Functions | |
Converter () | |
constructor More... | |
Converter (const Converter &) | |
prevent copy construction More... | |
Converter & | operator= (const Converter &) |
prevent assignment More... | |
Private Attributes | |
idmap_t | _LCLSToCASSId |
map lcls id to cass id More... | |
configStore_t | _configStore |
Number of Channels for a device. More... | |
Static Private Attributes | |
static ConversionBackend::shared_pointer | _instance |
the singleton container More... | |
static QMutex | _mutex |
singleton locker for mutithreaded requests More... | |
Additional Inherited Members | |
![]() | |
typedef std::tr1::shared_ptr< ConversionBackend > | shared_pointer |
typedef More... | |
typedef std::list< Pds::TypeId::Type > | pdstypelist_t |
typedef More... | |
![]() | |
pdstypelist_t | _pdsTypeList |
the list of pds types that the converter is responsible for More... | |
Acqiris Converter.
this class takes a xtc of type Id_AcqWaveform or Id_AcqConfig and extracts the acqiris channels for all instruments
Converter/LCLSAcqirisDevices/Detector/{size}
Number of user defined detectors to be pulled out of the xtc
Converter/LCLSPixelDetectors/Detector/%id%/{TypeName}
The type of the detector. Only the following types are supported:
Converter/LCLSAcqirisDevices/%id%/{DetectorName}
Name of the detector. Default is invalid
Converter/LCLSAcqirisDevices/%id%/{DetectorID}
the id of the detector. Default is 0.
Converter/LCLSAcqirisDevices/%id%/{DeviceName}
Name of the detector device
Converter/LCLSAcqirisDevices/%id%/{DeviceID}
Id of the detector device
Converter/LCLSAcqirisDevices/%id%/{CASSID}
the Id the Acqiris should get in the CASSEvent. One needs this number for further processing. Note that the config and the data part must have the same CASSID.
Definition at line 56 of file acqiris_converter.h.
|
private |
define the store of the config information
Definition at line 70 of file acqiris_converter.h.
|
private |
define the map for lcls key to cass id
Definition at line 67 of file acqiris_converter.h.
|
private |
constructor
sets up the pds type ids it is responsible for
skip if the either name has not been set or not correctly set
Definition at line 46 of file acqiris_converter.cpp.
References QSettings::beginGroup(), QSettings::beginReadArray(), Detector, QSettings::endArray(), QSettings::setArrayIndex(), size, and QSettings::value().
|
private |
prevent copy construction
|
static |
create singleton if doesnt exist already
Definition at line 35 of file acqiris_converter.cpp.
|
virtual |
takes the xtc and copies the data to cassevent
skip if there is no corresponding cass key for that xtc
check whether xtc is a configuration or a event
use the right version to extract the info
get the config
if it is a event then extract all information from the event
extract the datadescriptor (waveform etc) from the xtc
retrieve reference to the right acqiris instrument
write the event id of the data to the instrument
retrieve a reference to the channel container of the instrument
resize the channel vector to how many channels are in the device
copy the channel values from the datadescriptor
get a reference instead of a pointer for easier writing
retrieve a reference to the channel we are working on
extract the infos from the datadesc
get pointer to waveform in the datadescriptor
need to shift the pointer so that it looks at the first real point of the waveform
retrieve a reference to waveform within the cassevent channel
resize cassevent waveform container to the correct size
copy the datapoints of the waveform the byte order has to be swapped for some reason that still has to be determined
iterate to next channel
Reimplemented from cass::ConversionBackend.
Definition at line 99 of file acqiris_converter.cpp.
References cass::CASSEvent::Acqiris, cass::Log::add(), cass::ACQIRIS::Channel::channelNbr(), cass::Log::DEBUG0, cass::CASSEvent::devices(), cass::ACQIRIS::Channel::gain(), cass::ACQIRIS::Channel::horpos(), cass::CASSEvent::id(), cass::ACQIRIS::Instrument::id(), cass::Log::INFO, cass::ACQIRIS::Channel::offset(), cass::ACQIRIS::Channel::sampleInterval(), cass::toString(), and cass::ACQIRIS::Channel::waveform().
|
private |
Number of Channels for a device.
the number of channels for the device is only send with a configure transition we store them in a map for each instrument
Definition at line 98 of file acqiris_converter.h.
|
staticprivate |
the singleton container
Definition at line 85 of file acqiris_converter.h.
|
private |
map lcls id to cass id
Definition at line 91 of file acqiris_converter.h.
|
staticprivate |
singleton locker for mutithreaded requests
Definition at line 88 of file acqiris_converter.h.