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

pixel detector hot pixel detection More...

#include <pixel_detector_calibration.h>

+ Inheritance diagram for cass::pp332:
+ Collaboration diagram for cass::pp332:

Public Member Functions

 pp332 (const name_t &)
 constructor. More...
 
virtual void process (const CASSEvent &, result_t &)
 overwrite default behaviour don't do anything More...
 
virtual void loadSettings (size_t)
 load the settings of this pp More...
 
virtual void aboutToQuit ()
 write the calibrations before quitting More...
 
- Public Member Functions inherited from cass::AccumulatingProcessor
 AccumulatingProcessor (const name_t &name)
 constructor More...
 
virtual ~AccumulatingProcessor ()
 virtual destructor More...
 
virtual void processEvent (const CASSEvent &evt)
 process the event More...
 
virtual const result_tresult (const CASSEvent::id_t)
 retrieve a result. More...
 
virtual void releaseEvent (const CASSEvent &)
 overwrite default behaviour to do nothing More...
 
virtual void createHistList (result_t::shared_pointer result)
 create the list of results More...
 
- Public Member Functions inherited from cass::Processor
 Processor (const name_t &name)
 constructor More...
 
virtual ~Processor ()
 virtual destructor More...
 
result_t::shared_pointer resultCopy (const uint64_t eventid)
 retrieve histogram for id More...
 
virtual void load ()
 load the general settings More...
 
const names_tdependencies ()
 Define all processors keys a processor depends on. More...
 
void clearDependencies ()
 clear the dependenies More...
 
void clearHistograms ()
 clear the histograms More...
 
virtual void processCommand (std::string command)
 process command in pp More...
 
const name_t name () const
 retrieve the name of this processor More...
 
bool hide () const
 retrieve the hide flag of this processor More...
 
const std::string & comment () const
 retrieve the comment of this processor More...
 

Protected Member Functions

void loadHotPixelMap ()
 write the calibration data to file More...
 
void writeHotPixelMap ()
 write the calibration data to file More...
 
- Protected Member Functions inherited from cass::Processor
virtual void createHistList (result_t::shared_pointer result)
 create result list. More...
 
void setupGeneral ()
 general setup of the processor More...
 
bool setupCondition (bool defaultConditionType=true)
 setup the condition. More...
 
shared_pointer setupDependency (const std::string &depVarName, const name_t &name="")
 setup the dependecy. More...
 

Private Types

typedef char mask_t
 define the output mask type More...
 
typedef std::pair< float, float > range_t
 define the range type More...
 

Private Attributes

shared_pointer _image
 the image to create the hotpixel map from More...
 
size_t _maxConsecutiveCount
 the number of times a pixel is high before masking it as hot pixel More...
 
range_t _aduRange
 the range of adu that indicates whether a pixel is hot More...
 
float _maxADUVal
 the maximum allowed adu value More...
 
bool _write
 flag to tell whether the calibration should be written More...
 
std::string _filename
 the filename that is used to save the calibration More...
 
int _nFrames
 the number of frames after which the gain map is calculted More...
 
int _counter
 counter to count how many times this has been called More...
 

Additional Inherited Members

- Public Types inherited from cass::Processor
typedef std::tr1::shared_ptr< Processorshared_pointer
 a shared pointer of this More...
 
typedef std::string name_t
 define the name type More...
 
typedef std::list< name_tnames_t
 define the list of names More...
 
typedef CachedList::item_type result_t
 define the results More...
 
typedef CachedList::item_sp resultsp_t
 define the shared pointer to the result More...
 
- Protected Attributes inherited from cass::AccumulatingProcessor
result_t::shared_pointer _result
 the result that accumulates the events More...
 
size_t _nbrEventsAccumulated
 the number of events the processor has accumulated More...
 
- Protected Attributes inherited from cass::Processor
const name_t _name
 the processors name More...
 
bool _hide
 flag to tell whether this pp should be hidden in the dropdown list More...
 
std::string _comment
 optional comment that one can add to a processor. More...
 
CachedList _resultList
 the list of results More...
 
names_t _dependencies
 the list of dependencies More...
 
shared_pointer _condition
 pointer to the processor that will contain the condition More...
 

Detailed Description

pixel detector hot pixel detection

Available PostProcessors:
"332": pixel detector hot pixel detection
See also
Processor for a list of all commonly available cass.ini settings.
User definable Parameters:

Processor/%name%/{Image}
the image of the pixel detector

Processor/%name%/{Filename}
the name of the file where the calibration will be written to. Default is out.cal

Processor/%name%/{WriteCal}
Flag to tell whether the calibration should be written. Default is true.

Processor/%name%/{ADURangeLow|ADURangeUp}
The adu range that indicates that one photon has hit the pixel. Default is 0|0

Processor/%name%/{MaximumConsecutiveFrames}
The maximum number of frames that a pixel should have an adu value in the range before the pixel is mased as hot. Default is 5

Processor/%name%/{MaxADUValue}
If a pixel ever exceeds this value it will be masked as bad. Default is 1e6

Processor/%name%/{NbrOfFrames}
The number of frames after which the gain map will be calculated. Default is -1, which sais that it will never be calulated during running and only when the program ends.

Author
Lutz Foucar

Definition at line 482 of file pixel_detector_calibration.h.

Member Typedef Documentation

typedef char cass::pp332::mask_t
private

define the output mask type

Definition at line 506 of file pixel_detector_calibration.h.

typedef std::pair<float,float> cass::pp332::range_t
private

define the range type

Definition at line 515 of file pixel_detector_calibration.h.

Constructor & Destructor Documentation

pp332::pp332 ( const name_t name)

constructor.

Definition at line 680 of file pixel_detector_calibration.cpp.

References loadSettings().

Member Function Documentation

void pp332::aboutToQuit ( )
virtual

write the calibrations before quitting

Reimplemented from cass::Processor.

Definition at line 760 of file pixel_detector_calibration.cpp.

References _write, and writeHotPixelMap().

void pp332::loadHotPixelMap ( )
protected
void pp332::loadSettings ( size_t  )
virtual
void pp332::process ( const CASSEvent evt,
result_t result 
)
virtual

overwrite default behaviour don't do anything

go though all pixels of image

check if pix is not masked as hot

check if pixel is within the hot pixel adu range

check if pixel exceeds maximum allowed adu value

if we have reached the requested nbr of frames calculate the gain map

Reimplemented from cass::Processor.

Definition at line 766 of file pixel_detector_calibration.cpp.

References _aduRange, _image, _maxADUVal, _maxConsecutiveCount, cass::Result< T >::begin(), cass::Result< T >::end(), cass::fuzzycompare(), cass::CASSEvent::id(), cass::Result< T >::lock, and cass::Result< T >::shape().

void pp332::writeHotPixelMap ( )
protected

Member Data Documentation

range_t cass::pp332::_aduRange
private

the range of adu that indicates whether a pixel is hot

Definition at line 518 of file pixel_detector_calibration.h.

Referenced by loadSettings(), and process().

int cass::pp332::_counter
private

counter to count how many times this has been called

Definition at line 533 of file pixel_detector_calibration.h.

Referenced by loadSettings().

std::string cass::pp332::_filename
private

the filename that is used to save the calibration

Definition at line 527 of file pixel_detector_calibration.h.

Referenced by loadHotPixelMap(), loadSettings(), and writeHotPixelMap().

shared_pointer cass::pp332::_image
private

the image to create the hotpixel map from

Definition at line 509 of file pixel_detector_calibration.h.

Referenced by loadSettings(), and process().

float cass::pp332::_maxADUVal
private

the maximum allowed adu value

Definition at line 521 of file pixel_detector_calibration.h.

Referenced by loadSettings(), and process().

size_t cass::pp332::_maxConsecutiveCount
private

the number of times a pixel is high before masking it as hot pixel

Definition at line 512 of file pixel_detector_calibration.h.

Referenced by loadSettings(), and process().

int cass::pp332::_nFrames
private

the number of frames after which the gain map is calculted

Definition at line 530 of file pixel_detector_calibration.h.

Referenced by loadSettings().

bool cass::pp332::_write
private

flag to tell whether the calibration should be written

Definition at line 524 of file pixel_detector_calibration.h.

Referenced by aboutToQuit(), and loadSettings().


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