3 #include <boost/lexical_cast.hpp>
5 #include <fdet/Camera.h>
7 #include <utl/ErrorLogger.h>
8 #include <utl/Md5Sum.h>
10 #include <det/VManager.h>
11 #include <det/Detector.h>
12 #include <fdet/FDetector.h>
14 #include <fdet/Telescope.h>
15 #include <fdet/Pixel.h>
16 #include <fdet/Channel.h>
18 #include <fevt/Pixel.h>
19 #include <fevt/Channel.h>
27 Camera::Camera(
const unsigned int eyeId,
const unsigned int telId,
28 const std::string& physEyeIdString,
29 const std::string& physTelIdString) :
32 fPhysicalEyeIdString(physEyeIdString),
33 fPhysicalTelescopeIdString(physTelIdString),
38 fMercedesEfficiency(0),
39 fMercedesReflections(0),
49 fFLTBoxCarmSumLength(0),
57 fVirtualChannelGainRatio(0),
255 return GetCameraData(
fGainVar,
"gainVar",
"electronics",
"additional Gaussian fluctuantion to Poisson fluctuations");
278 "virtual channel gain ratio");
290 GetCameraPixelData(channelId,
"pixel_mapping",
"electronics",
"pixel mapping", pixelId);
356 "pixelRows",
"camera",
"number of pixel rows");
357 return (
unsigned int)row;
366 "pixelColumns",
"camera",
"number of pixel columns");
367 return (
unsigned int)col;
375 ostringstream configString;
376 configString <<
"Threshold:"
385 configString <<
" Telescopetype = standard";
389 configString <<
" Telescopetype = HEAT";
392 return Md5Sum(configString.str()).GetHexDigest();
401 const std::string& property,
402 const std::string& component,
403 const std::string& errorMsg)
406 if (!requestedData) {
407 requestedData =
new T;
408 GetCameraData(*requestedData, property, component, errorMsg);
410 return *requestedData;
418 const std::string& property,
419 const std::string& component,
420 const std::string& errorMsg)
423 const VManager& manager = Detector::GetInstance().GetFManagerRegister();
430 manager.
GetData(requestedData, property, component, indexMap);
432 if (foundFlag == VManager::eNotFound) {
434 err <<
"Did not find requested component for " << errorMsg<<
"; "
435 << VManager::QueryInfoMessage(property, component, indexMap);
445 const std::string& property,
446 const std::string& component,
447 const std::string& errorMsg)
450 if (!requestedData) {
451 requestedData =
new T;
454 return *requestedData;
462 const std::string& property,
463 const std::string& component,
464 const std::string& errorMsg)
467 const VManager& manager = Detector::GetInstance().GetFManagerRegister();
473 const bool hasCorrectorRing =
475 indexMap[
"correctorId"] = (hasCorrectorRing ?
"large" :
"small");
478 manager.
GetData(requestedData, property, component, indexMap);
480 if (foundFlag == VManager::eNotFound) {
482 err <<
"Did not find requested component for " << errorMsg<<
"; "
483 << VManager::QueryInfoMessage(property, component, indexMap);
494 const std::string& property,
495 const std::string& component,
496 const std::string& errorMsg,
497 const unsigned int channelId)
500 const VManager& manager = Detector::GetInstance().GetFManagerRegister();
505 indexMap[
"channelId"] = boost::lexical_cast<
string>(channelId);
508 manager.
GetData(requestedData, property, component, indexMap);
510 if (foundFlag == VManager::eNotFound) {
512 err <<
"Did not find requested component for " << errorMsg <<
"; "
513 << VManager::QueryInfoMessage(property, component, indexMap);
524 const std::string& property,
525 const std::string& component,
526 const std::string& errorMsg,
527 const unsigned int pixelId)
531 Detector::GetInstance().GetFManagerRegister();
536 indexMap[
"pixelId"] = boost::lexical_cast<
string>(pixelId);
539 manager.
GetData(requestedData, property, component, indexMap);
541 if (foundFlag == VManager::eNotFound) {
543 err <<
"Did not find requested component for " << errorMsg <<
"; "
544 << VManager::QueryInfoMessage(property, component, indexMap);
unsigned int GetId() const
By default from 1..440.
std::string fPhysicalEyeIdString
Class to compute MD5 checksum Based on the RSA C code, wrapped in an OO fashion.
double GetFADCBinSize() const
double GetSigmaNormal() const
Variable to model the Mercedes surface imperfection.
Description of the electronic channel for the 480 channels of the crate.
double GetFieldOfView() const
unsigned int GetLastColumn() const
double GetElectronicsGain() const
unsigned int fTelescopeId
double * fMercedesEfficiency
double GetEta() const
Camera angular pixel spacing.
int GetADCDynamicRange() const
unsigned int GetId() const
double GetCutoffFrequency() const
double GetGainVariance() const
double GetCenterRow() const
central pixel row
double GetMercedesHeight() const
Height of the Mercedes.
Base class for exceptions trying to access non-existing components.
const Eye & GetEye(const unsigned int eyeId) const
Find eye by numerical Id.
Interface for detector managers.
double GetFLTTriggerRate() const
int GetFLTBoxcarSumLength() const
Detector description interface for FDetector-related data.
double GetCenterColumn() const
central pixel column
bool HasCorrectorRing() const
flag for corrector ring presence
double GetMercedesEfficiency() const
Average efficiency of the Mercedes.
void GetCameraPixelData(T &requestedData, const std::string &property, const std::string &component, const std::string &errorMsg, const unsigned int pixelId) const
double GetMercedesReflections() const
Average number of reflections from Mercedes.
virtual Status GetData(double &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
unsigned int GetId() const
Fluorescence Detector Pixel event.
const T & GetCameraData(T *&requestedData, const std::string &property, const std::string &component, const std::string &errorMsg) const
const Telescope & GetTelescope(const unsigned int telescopeId) const
Find Telescope by numerical Id.
double GetVirtualChannelGainRatio() const
unsigned int GetId() const
Fluorescence Detector Channel Event.
unsigned int GetLastRow() const
double GetElectronicNoiseVariance() const
fTelescopeId(t.GetTelescopeId())
unsigned int GetChannelId(const unsigned int pixelId) const
double GetMercedesBase() const
Base of the Mercedes.
int GetSLTTraceLength() const
const T & GetCameraDataDiaphragm(T *&requestedData, const std::string &property, const std::string &component, const std::string &errorMsg) const
std::map< std::string, std::string > IndexMap
int * fFLTBoxCarmSumLength
int GetFLTProlongation() const
std::string GetThresholdConfigSignature() const
double GetRadiusFocal() const
Radius of focal surface of the camera.
#define ERROR(message)
Macro for logging error messages.
double * fCutoffFrequency
double * fVirtualChannelGainRatio
double * fMercedesReflections
std::string fPhysicalTelescopeIdString
int GetFADCTraceLength() const
unsigned int GetPixelId(const unsigned int channelId) const
void GetCameraChannelData(T &requestedData, const std::string &property, const std::string &component, const std::string &errorMsg, const unsigned int channelId) const
Status
Specifies success or (eventually) various possible failure modes.
double GetSLTBinSize() const
int GetSLTTriggerBin() const