#include <LinCalibProtoDUNE.h>
Definition at line 42 of file LinCalibProtoDUNE.h.
calib::LinCalibProtoDUNE::LinCalibProtoDUNE |
( |
| ) |
|
virtual calib::LinCalibProtoDUNE::~LinCalibProtoDUNE |
( |
| ) |
|
|
virtualdefault |
Definition at line 78 of file LinCalibProtoDUNE.cxx.
83 mf::LogError(
"LinCalibProtoDUNE") <<
"Channel " << chanId
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
std::map< int, LinConsts_t > fLinConsts
bool calib::LinCalibProtoDUNE::LoadConsts |
( |
| ) |
|
|
protected |
Definition at line 92 of file LinCalibProtoDUNE.cxx.
98 nutools::dbi::Table
t;
100 t.SetDetector(
"pdunesp");
101 t.SetTableName(
"linconsts");
102 t.SetTableType(nutools::dbi::kConditionsTable);
103 t.SetDataTypeMask(nutools::dbi::kDataOnly);
105 t.SetDataTypeMask(nutools::dbi::kMCOnly);
107 int statusIdx = t.AddCol(
"status",
"int");
108 int gainIdx = t.AddCol(
"gain",
"float");
109 int offsetIdx = t.AddCol(
"offset",
"float");
110 int shapeIdx = t.AddCol(
"shape",
"float");
111 int chi2Idx = t.AddCol(
"chi2",
"float");
112 int adcLowIdx = t.AddCol(
"adc_low",
"int");
113 int adcHiIdx = t.AddCol(
"adc_high",
"int");
116 for (
int i=0; i<20; ++i) {
117 sprintf(buff,
"nl%d",i);
118 nlIdx[i] = t.AddCol(buff,
"float");
134 mf::LogError(
"LinCalibProtoDUNE") <<
"Load from norm linconsts database table failed.";
141 mf::LogError(
"LinCalibProtoDUNE") <<
"Number of rows in linconsts calib table is 0. This should never be the case!";
145 nutools::dbi::Row*
row;
147 for (
int i=0; i<t.NRow(); ++i) {
150 chan = row->Channel();
151 row->Col(statusIdx).Get(c.status);
152 row->Col(gainIdx).Get(c.gain);
153 row->Col(offsetIdx).Get(c.offset);
154 row->Col(shapeIdx).Get(c.shape);
155 row->Col(chi2Idx).Get(c.chi2);
156 row->Col(adcLowIdx).Get(c.adc_low);
157 row->Col(adcHiIdx).Get(c.adc_high);
158 for (
int j=0; j<20; ++j) {
159 row->Col(nlIdx[j]).Get(c.nl[j]);
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
std::map< int, LinConsts_t > fLinConsts
void calib::LinCalibProtoDUNE::SetCSVFileName |
( |
std::string |
f | ) |
|
|
inline |
void calib::LinCalibProtoDUNE::SetIsMC |
( |
bool |
v | ) |
|
|
inline |
void calib::LinCalibProtoDUNE::SetUseCondb |
( |
bool |
v | ) |
|
|
inline |
bool calib::LinCalibProtoDUNE::Update |
( |
uint64_t |
ts = 0 | ) |
|
bool calib::LinCalibProtoDUNE::fConstsLoaded |
|
protected |
uint64_t calib::LinCalibProtoDUNE::fCurrentTS |
|
protected |
bool calib::LinCalibProtoDUNE::fIsMC |
|
protected |
std::map<int,LinConsts_t> calib::LinCalibProtoDUNE::fLinConsts |
|
protected |
bool calib::LinCalibProtoDUNE::fUseCondb |
|
protected |
The documentation for this class was generated from the following files: