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

A Tile of a Detector. More...

+ Collaboration diagram for cass::DetectorTile:

Public Member Functions

 DetectorTile (const string &name)
 constructor More...
 
void retrieveData (int tag=OL_NEWESTTAGDATA)
 read the data More...
 
void copyData (int tag)
 copy the tile data to the frame More...
 
int tag ()
 the current Tag read from the current databuffer More...
 
int runNumber ()
 the current Run Number read from the current databuffer More...
 

Public Attributes

std::string name
 the name of the detector tile More...
 
float gain
 the gain of the tile More...
 
int xsize
 the width of the tile More...
 
int ysize
 the height of the tile More...
 
uint64_t datasize
 the size of the retrieved data More...
 
pixeldetector::Detector::frame_t::iterator start
 start position of the tile within the frame More...
 
int normalizeID
 id of tile to normalize to More...
 
float relativeGain
 the relative gain to normalize for More...
 

Private Attributes

int _sockID
 the socket ID to connect to the online API More...
 
vector< char > _databuffer
 the buffer with the detector data More...
 
vector< char > _workbuffer
 buffer needed for the retrieval function to work More...
 

Detailed Description

A Tile of a Detector.

Author
Lutz Foucar

Definition at line 39 of file sacla_online_input.cpp.

Constructor & Destructor Documentation

cass::DetectorTile::DetectorTile ( const string &  name)
inline

constructor

connects to the right socket and retrieves all non changing parameters

Parameters
nameThe name of the detector tile

get the socketID of the requested detector

get the size of the data and the needed worksize

retrieve detector data once to retrieve all non changing parameters

read the width and height of the detector

read the gain of the detector tile

Definition at line 47 of file sacla_online_input.cpp.

References cass::toString().

Member Function Documentation

void cass::DetectorTile::copyData ( int  tag)
inline

copy the tile data to the frame

Collect the data from the server to the buffer and copy the tile's data to the frame.

Parameters
tagthe tag for which to copy the tile data.

reset the datasize

if the data for the tag has not been retrieved, retrieve it at this point

retrieve pointer to the tile data from the databuffer

if tile should be normalized, use transform to copy the data, otherwise just copy the tile data to the frame

set the datasize to the right size

Definition at line 136 of file sacla_online_input.cpp.

References cass::Log::add(), cass::Log::ERROR, and cass::toString().

void cass::DetectorTile::retrieveData ( int  tag = OL_NEWESTTAGDATA)
inline

read the data

defaulty read the latest tag (tag == -1). If tag is given, it will read data associated with the requested tag.

Exceptions
TagOutdatedwhen the funcstatus is indicating an outdated tag
runtime_errorwhen the funcstatus is an error other than outdated tag
Returns
the funcstatus when it says outdated tag or no error
Parameters
tagthe tag that the data should be read for

Definition at line 108 of file sacla_online_input.cpp.

References cass::toString().

int cass::DetectorTile::runNumber ( )
inline

the current Run Number read from the current databuffer

Returns
latest run number

Definition at line 186 of file sacla_online_input.cpp.

References cass::Log::add(), cass::Log::ERROR, and cass::toString().

int cass::DetectorTile::tag ( )
inline

the current Tag read from the current databuffer

Returns
the current Tag

Definition at line 172 of file sacla_online_input.cpp.

References cass::Log::add(), cass::Log::ERROR, and cass::toString().

Member Data Documentation

vector<char> cass::DetectorTile::_databuffer
private

the buffer with the detector data

Definition at line 225 of file sacla_online_input.cpp.

int cass::DetectorTile::_sockID
private

the socket ID to connect to the online API

Definition at line 222 of file sacla_online_input.cpp.

vector<char> cass::DetectorTile::_workbuffer
private

buffer needed for the retrieval function to work

Definition at line 228 of file sacla_online_input.cpp.

uint64_t cass::DetectorTile::datasize

the size of the retrieved data

Definition at line 209 of file sacla_online_input.cpp.

float cass::DetectorTile::gain

the gain of the tile

Definition at line 200 of file sacla_online_input.cpp.

Referenced by cass::SACLAOnlineInput::runthis().

std::string cass::DetectorTile::name

the name of the detector tile

Definition at line 197 of file sacla_online_input.cpp.

Referenced by cass::SACLAOnlineInput::runthis().

int cass::DetectorTile::normalizeID

id of tile to normalize to

Definition at line 215 of file sacla_online_input.cpp.

Referenced by cass::SACLAOnlineInput::runthis().

float cass::DetectorTile::relativeGain

the relative gain to normalize for

Definition at line 218 of file sacla_online_input.cpp.

Referenced by cass::SACLAOnlineInput::runthis().

pixeldetector::Detector::frame_t::iterator cass::DetectorTile::start

start position of the tile within the frame

Definition at line 212 of file sacla_online_input.cpp.

int cass::DetectorTile::xsize

the width of the tile

Definition at line 203 of file sacla_online_input.cpp.

Referenced by cass::SACLAOnlineInput::runthis().

int cass::DetectorTile::ysize

the height of the tile

Definition at line 206 of file sacla_online_input.cpp.

Referenced by cass::SACLAOnlineInput::runthis().


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