9 #ifndef _COMMON_DATA_H_
10 #define _COMMON_DATA_H_
19 #include <tr1/functional>
21 #include <QtCore/QMutex>
22 #include <QtCore/QReadWriteLock>
23 #include <QtCore/QStringList>
49 return s.
group().split(
"/").at(1).toStdString();
321 CommonData(
const instancesmap_t::key_type& detname);
359 std::tr1::function<void(const std::string&,CommonData&)>
_saveGainTo;
bool _settingsLoaded
switch to tell that load settins for this common data was already running
void createCorMap()
create the correction map
std::string _inputGainFilename
the gain correction input filename
retrieve the DetectorName
void saveOffsetNoiseMaps()
save offset and noise maps
static void controlCalibration(const std::string &command)
issue a command to the map creators of all instances
void saveGainMap()
save gain map
std::string detectorname
the name of the detector whos maps are contained in this class instance
std::string _inputOffsetFilename
input filename of the offset and noise map
std::tr1::function< void(const std::string &, CommonData &)> _saveHotPixTo
function to write the hot pixel mask
std::vector< char > mask_t
a mask is a vector of bools
bool _autoNoiseThreshold
flag whether the noise threshold should be automatically determined
CommonData & operator=(const CommonData &)
prevent assingment
float pixel_t
define a pixel of the pixel detector
std::pair< Detector::pixel_t, Detector::pixel_t > _noiseRange
the range in adu for masking noisy pixels
mask_t hotpixels
the hotpixel mask
Detector::pixel_t _autoMultiplier
the multiplier about which the automatically determined threshold will be defined ...
size_t columns
the width of the maps
void saveHotPixMask()
save hot pixel mask
size_t rows
the height of the maps
static instancesmap_t _instances
the helperclass instances.
void loadSettings(CASSSettings &s)
load the settings of this common object
std::vector< pixel_t > frame_t
a frame is a vector of pixels
std::tr1::shared_ptr< MapCreatorBase > _gainCreator
functor to create the Maps
static QMutex _mutex
mutex to lock the creation of an instance
static std::string fromSettings(const CASSSettings &s)
retrieve it from the casssettings
std::string _outputHotPixFilename
the hot pixel mask output filename
Data used commonly for one AdvancedDetector.
Detector::frame_t offsetMap
the offset map
std::tr1::shared_ptr< CommonData > shared_pointer
typedef a shared pointer of this
QReadWriteLock lock
lock to synchronize read and write acces to the common data
A Frame of an advance Pixel Detector.
int32_t detectorId
the id of the detector that contains the frames whos maps we have here
contains container for simple pixel detector data
CommonData()
prevent people from constructing other than using instance().
file contains specialized class that do the settings for cass
Detector::frame_t correctionMap
the correction map
std::tr1::function< void(const std::string &, CommonData &)> _saveGainTo
function to write the gain map
static shared_pointer instance(const instancesmap_t::key_type &detector)
static function creating instance of this.
std::tr1::shared_ptr< MapCreatorBase > _offsetnoiseMapcreator
functor to create the Maps
std::string _inputHotPixFilename
the hot pixel mask input filename
std::tr1::function< void(const std::string &, CommonData &)> _saveNoiseOffsetTo
function to write the offset maps
std::string _outputGainFilename
the gain correction output filename
std::string _outputOffsetFilename
output filename for the offset and noise maps
void generateMaps(const Frame &frame)
generate the maps from the frame data with help of the functors
std::map< std::string, shared_pointer > instancesmap_t
typedef describing the instances of the helper
Detector::frame_t gain_cteMap
the gain + cte map
mask_t mask
the detector mask
Detector::frame_t noiseMap
the noise map
CommonData(const CommonData &)
prevent copy-construction