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

Creates the maps fast and simple. More...

#include <mapcreators_online.h>

+ Inheritance diagram for cass::pixeldetector::OnlineFixedCreator:
+ Collaboration diagram for cass::pixeldetector::OnlineFixedCreator:

Public Member Functions

void operator() (const Frame &frame)
 the operator More...
 
void controlCalibration (const std::string &unused)
 start accumulating the maps More...
 
void loadSettings (CASSSettings &s)
 load the settings of this creator More...
 
- Public Member Functions inherited from cass::pixeldetector::MapCreatorBase
virtual ~MapCreatorBase ()
 virtual destructor More...
 

Private Types

typedef std::vector< std::vector< Detector::pixel_t > > specialstorage_t
 the special storage type of this class More...
 

Private Member Functions

void doNothing (const Frame &)
 a function that just returns and does nothing More...
 
void buildAndCalc (const Frame &frame)
 build up storage and then calculate the maps More...
 

Private Attributes

std::tr1::shared_ptr< CommonData_commondata
 the container with all the maps More...
 
std::tr1::function< void(const Frame &)> _createMap
 the function object that will be called by the operator More...
 
specialstorage_t _specialstorage
 storage where the pixels are already ordered More...
 
size_t _nbrFrames
 how many frames should be collected before the maps are calculated More...
 
Detector::pixel_t _multiplier
 the multiplier to define the max noise before the pixel is considered to contain a photon More...
 
bool _writeMaps
 flag wether the create maps should be saved to file or just used More...
 
size_t _framecounter
 counter to keep track how many frames are collected More...
 

Additional Inherited Members

- Public Types inherited from cass::pixeldetector::MapCreatorBase
typedef std::tr1::shared_ptr< MapCreatorBaseshared_pointer
 typedef the shared pointer of this More...
 
typedef std::vector< Detector::frame_tstorage_t
 the type of storage used More...
 
- Static Public Member Functions inherited from cass::pixeldetector::MapCreatorBase
static shared_pointer instance (const std::string &type)
 create an instance of the requested functor More...
 

Detailed Description

Creates the maps fast and simple.

User definable Map Creator List:
"online": Uses a fast way to collect the frames and a fast and simple way to calculate the maps
User definable Parameters:

PixelDetectors/%name%/CorrectionMaps/FixedOnlineCreator/{Multiplier}
How much bigger does the pixel value have to be than the noise before The pixel is not taken into account when calculating the offset and noise of that pixel. Default is 4.

PixelDetectors/%name%/CorrectionMaps/FixedOnlineCreator/{NbrFrames}
The number of frames that should be collected for calculating the maps. Default is 200.

PixelDetectors/%name%/CorrectionMaps/FixedOnlineCreator/{StartInstantly}
Flag to tell whether the calculator should start instantly with collecting the frames and calculating the maps. If false it will wait until told by the program through the available GUI's. Default is false.

PixelDetectors/%name%/CorrectionMaps/FixedOnlineCreator/{WriteMaps}
Tell the creator to write the calulated maps once they have been calculated. For further infomration on how the files are written, see cass::pixeldetector::CommonData. Default is true.

Author
Lutz Foucar

Definition at line 54 of file mapcreators_online.h.

Member Typedef Documentation

the special storage type of this class

Definition at line 80 of file mapcreators_online.h.

Member Function Documentation

void OnlineFixedCreator::buildAndCalc ( const Frame frame)
private

build up storage and then calculate the maps

Parameters
framethe frame to build up the storage and to calc the maps from

as long as there are not enough frames collected build up the specail storage

calc noise and offset from all pixels

calc noise and offset from pixels that do not contain photon hits

write the maps to file if requested and recreate the correction map. then reset everything.

Definition at line 40 of file mapcreators_online.cpp.

References cass::Log::add(), cass::pixeldetector::Frame::columns, cass::pixeldetector::Frame::data, cass::Log::DEBUG0, doNothing(), QTime::elapsed(), cass::Log::INFO, noise, offset, cass::pixeldetector::Frame::rows, QTime::start(), cass::ACQIRIS::t, cass::toString(), and cass::Log::WARNING.

Referenced by controlCalibration(), and loadSettings().

void OnlineFixedCreator::controlCalibration ( const std::string &  unused)
virtual

start accumulating the maps

Parameters
unusednot used

Reimplemented from cass::pixeldetector::MapCreatorBase.

Definition at line 33 of file mapcreators_online.cpp.

References cass::Log::add(), buildAndCalc(), cass::Log::INFO, and cass::toString().

void cass::pixeldetector::OnlineFixedCreator::doNothing ( const Frame )
inlineprivate

a function that just returns and does nothing

Parameters
unusednot used

Definition at line 86 of file mapcreators_online.h.

Referenced by buildAndCalc(), and loadSettings().

void OnlineFixedCreator::loadSettings ( CASSSettings s)
virtual
void cass::pixeldetector::OnlineFixedCreator::operator() ( const Frame frame)
inlinevirtual

the operator

just calls the function that creates the map. This function is exchanged depending on whether the frames should be calculated or not.

Parameters
framethe frame to check for

Reimplemented from cass::pixeldetector::MapCreatorBase.

Definition at line 64 of file mapcreators_online.h.

References _createMap.

Member Data Documentation

std::tr1::shared_ptr<CommonData> cass::pixeldetector::OnlineFixedCreator::_commondata
private

the container with all the maps

Definition at line 95 of file mapcreators_online.h.

std::tr1::function<void(const Frame&)> cass::pixeldetector::OnlineFixedCreator::_createMap
private

the function object that will be called by the operator

Definition at line 98 of file mapcreators_online.h.

Referenced by operator()().

size_t cass::pixeldetector::OnlineFixedCreator::_framecounter
private

counter to keep track how many frames are collected

Definition at line 113 of file mapcreators_online.h.

Detector::pixel_t cass::pixeldetector::OnlineFixedCreator::_multiplier
private

the multiplier to define the max noise before the pixel is considered to contain a photon

Definition at line 107 of file mapcreators_online.h.

size_t cass::pixeldetector::OnlineFixedCreator::_nbrFrames
private

how many frames should be collected before the maps are calculated

Definition at line 104 of file mapcreators_online.h.

specialstorage_t cass::pixeldetector::OnlineFixedCreator::_specialstorage
private

storage where the pixels are already ordered

Definition at line 101 of file mapcreators_online.h.

bool cass::pixeldetector::OnlineFixedCreator::_writeMaps
private

flag wether the create maps should be saved to file or just used

Definition at line 110 of file mapcreators_online.h.


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