![]() |
Project
|
Classes | |
struct | is_map |
struct | is_map< std::map< Key, Value > > |
struct | LinkInfo |
Typedefs | |
using | ValueArrayU32 = std::array< uint32_t, 80 > |
using | DataMapU32 = std::map< LinkInfo, ValueArrayU32 > |
using | ValueArrayF = std::array< float, 80 > |
using | DataMapF = std::map< LinkInfo, ValueArrayF > |
Functions | |
void | debugDiff (std::string_view file1, std::string_view file2, std::string_view objName) |
debug differences between two cal pad objects | |
void | testChannelMapping (int cruID=0) |
int | getHWChannel (int sampa, int channel, int regionIter) |
return the hardware channel number as mapped in the CRU | |
std::tuple< int, int > | getSampaInfo (int hwChannel, int cruID) |
convert HW mapping to sampa and channel number | |
template<uint32_t DataBitSizeT = 12, uint32_t SignificantBitsT = 2> | |
constexpr uint32_t | floatToFixedSize (float value) |
convert float to integer with fixed precision and max number of digits | |
template<uint32_t SignificantBitsT = 2> | |
constexpr float | fixedSizeToFloat (uint32_t value) |
template<typename DataMap > | |
void | writeValues (const std::string_view fileName, const DataMap &map, bool onlyFilled=false) |
template<typename DataMap , uint32_t SignificantBitsT = 0> | |
std::enable_if_t< is_map< DataMap >::value, void > | fillCalPad (CalDet< float > &calPad, const DataMap &map) |
template<uint32_t SignificantBitsT = 2> | |
int | fillCalPad (CalDet< float > &calPad, std::istream &infile) |
fill cal pad object from HW value stream | |
template<uint32_t SignificantBitsT = 2> | |
int | fillCalPad (CalDet< float > &calPad, gsl::span< const char > data) |
fill cal pad object from HW value buffer | |
template<uint32_t SignificantBitsT = 2> | |
o2::tpc::CalDet< float > | getCalPad (const std::string_view fileName, const std::string_view outputFile="", std::string_view calPadName="") |
std::unordered_map< std::string, CalPad > | preparePedestalFiles (const CalPad &pedestals, const CalPad &noise, std::vector< float > sigmaNoiseROCType={3, 3, 3, 3}, std::vector< float > minADCROCType={2, 2, 2, 2}, float pedestalOffset=0, bool onlyFilled=false, bool maskBad=true, float noisyChannelThreshold=1.5, float sigmaNoiseNoisyChannels=4, float badChannelThreshold=6, bool fixedSize=false) |
using o2::tpc::cru_calib_helpers::DataMapF = typedef std::map<LinkInfo, ValueArrayF> |
Definition at line 58 of file CRUCalibHelpers.h.
using o2::tpc::cru_calib_helpers::DataMapU32 = typedef std::map<LinkInfo, ValueArrayU32> |
Definition at line 55 of file CRUCalibHelpers.h.
using o2::tpc::cru_calib_helpers::ValueArrayF = typedef std::array<float, 80> |
Definition at line 57 of file CRUCalibHelpers.h.
using o2::tpc::cru_calib_helpers::ValueArrayU32 = typedef std::array<uint32_t, 80> |
Definition at line 54 of file CRUCalibHelpers.h.
void o2::tpc::cru_calib_helpers::debugDiff | ( | std::string_view | file1, |
std::string_view | file2, | ||
std::string_view | objName | ||
) |
debug differences between two cal pad objects
Definition at line 74 of file CRUCalibHelpers.cxx.
std::enable_if_t< is_map< DataMap >::value, void > o2::tpc::cru_calib_helpers::fillCalPad | ( | CalDet< float > & | calPad, |
const DataMap & | map | ||
) |
fill cal pad object from HV data map TODO: Function to be tested
Definition at line 133 of file CRUCalibHelpers.h.
int o2::tpc::cru_calib_helpers::fillCalPad | ( | CalDet< float > & | calPad, |
gsl::span< const char > | data | ||
) |
fill cal pad object from HW value buffer
Definition at line 207 of file CRUCalibHelpers.h.
int o2::tpc::cru_calib_helpers::fillCalPad | ( | CalDet< float > & | calPad, |
std::istream & | infile | ||
) |
fill cal pad object from HW value stream
Definition at line 163 of file CRUCalibHelpers.h.
|
constexpr |
< number of bits used for floating point precision
< conversion factor from integer representation to float
Definition at line 85 of file CRUCalibHelpers.h.
|
constexpr |
convert float to integer with fixed precision and max number of digits
< number of bits of the data representation
< number of bits used for floating point precision
< mask for bits
< conversion factor from integer representation to float
Definition at line 71 of file CRUCalibHelpers.h.
o2::tpc::CalDet< float > o2::tpc::cru_calib_helpers::getCalPad | ( | const std::string_view | fileName, |
const std::string_view | outputFile = "" , |
||
std::string_view | calPadName = "" |
||
) |
create cal pad object from HW value file
if outputFile is set, write the object to file if calPadName is set use it for the object name in the file. Otherwise the basename of the fileName is used
Definition at line 226 of file CRUCalibHelpers.h.
return the hardware channel number as mapped in the CRU
Definition at line 26 of file CRUCalibHelpers.cxx.
convert HW mapping to sampa and channel number
Definition at line 37 of file CRUCalibHelpers.cxx.
std::unordered_map< std::string, CalPad > o2::tpc::cru_calib_helpers::preparePedestalFiles | ( | const CalPad & | pedestals, |
const CalPad & | noise, | ||
std::vector< float > | sigmaNoiseROCType = {3, 3, 3, 3} , |
||
std::vector< float > | minADCROCType = {2, 2, 2, 2} , |
||
float | pedestalOffset = 0 , |
||
bool | onlyFilled = false , |
||
bool | maskBad = true , |
||
float | noisyChannelThreshold = 1.5 , |
||
float | sigmaNoiseNoisyChannels = 4 , |
||
float | badChannelThreshold = 6 , |
||
bool | fixedSize = false |
||
) |
sigmaNoiseROCType | can be either one value for all ROC types, or {IROC, OROC}, or {IROC, OROC1, OROC2, OROC3} |
minADCROCType | can be either one value for all ROC types, or {IROC, OROC}, or {IROC, OROC1, OROC2, OROC3} |
Definition at line 107 of file CRUCalibHelpers.cxx.
Test input channel mapping vs output channel mapping
Consistency check of mapping
Definition at line 55 of file CRUCalibHelpers.cxx.
void o2::tpc::cru_calib_helpers::writeValues | ( | const std::string_view | fileName, |
const DataMap & | map, | ||
bool | onlyFilled = false |
||
) |
write values of map to fileName
Definition at line 96 of file CRUCalibHelpers.h.