Project
Loading...
Searching...
No Matches
CRUCalibHelpers.h File Reference
#include <unordered_map>
#include <string>
#include <array>
#include <map>
#include <cassert>
#include <gsl/span>
#include <filesystem>
#include <type_traits>
#include <vector>
#include "Rtypes.h"
#include "TFile.h"
#include "TPCBase/CalDet.h"
#include "TPCBase/Utils.h"

Go to the source code of this file.

Classes

struct  o2::tpc::cru_calib_helpers::LinkInfo
 
struct  o2::tpc::cru_calib_helpers::is_map< T >
 
struct  o2::tpc::cru_calib_helpers::is_map< std::map< Key, Value > >
 

Namespaces

namespace  o2
 a couple of static helper functions to create timestamp values for CCDB queries or override obsolete objects
 
namespace  o2::tpc
 Global TPC definitions and constants.
 
namespace  o2::tpc::cru_calib_helpers
 

Typedefs

using o2::tpc::cru_calib_helpers::ValueArrayU32 = std::array< uint32_t, 80 >
 
using o2::tpc::cru_calib_helpers::DataMapU32 = std::map< LinkInfo, ValueArrayU32 >
 
using o2::tpc::cru_calib_helpers::ValueArrayF = std::array< float, 80 >
 
using o2::tpc::cru_calib_helpers::DataMapF = std::map< LinkInfo, ValueArrayF >
 

Functions

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
 
void o2::tpc::cru_calib_helpers::testChannelMapping (int cruID=0)
 
int o2::tpc::cru_calib_helpers::getHWChannel (int sampa, int channel, int regionIter)
 return the hardware channel number as mapped in the CRU
 
std::tuple< int, into2::tpc::cru_calib_helpers::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 o2::tpc::cru_calib_helpers::floatToFixedSize (float value)
 convert float to integer with fixed precision and max number of digits
 
template<uint32_t SignificantBitsT = 2>
constexpr float o2::tpc::cru_calib_helpers::fixedSizeToFloat (uint32_t value)
 
template<typename DataMap >
void o2::tpc::cru_calib_helpers::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, voido2::tpc::cru_calib_helpers::fillCalPad (CalDet< float > &calPad, const DataMap &map)
 
template<uint32_t SignificantBitsT = 2>
int o2::tpc::cru_calib_helpers::fillCalPad (CalDet< float > &calPad, std::istream &infile)
 fill cal pad object from HW value stream
 
template<uint32_t SignificantBitsT = 2>
int o2::tpc::cru_calib_helpers::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 > o2::tpc::cru_calib_helpers::getCalPad (const std::string_view fileName, const std::string_view outputFile="", std::string_view calPadName="")
 
std::unordered_map< std::string, CalPado2::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)