Definition at line 27 of file NormalizeWire_tool.cc.
icarus::calo::NormalizeWire::NormalizeWire |
( |
fhicl::ParameterSet const & |
pset | ) |
|
void icarus::calo::NormalizeWire::configure |
( |
const fhicl::ParameterSet & |
pset | ) |
|
|
overridevirtual |
Definition at line 75 of file NormalizeWire_tool.cc.
83 std::string url =
URL(timestamp);
85 if (
fVerbose)
std::cout <<
"NormalizeWire Tool -- New Scale info, requesting data from url:\n" << url << std::endl;
89 throw cet::exception(
"NormalizeWire") <<
"Calibration Database access failed. URL: (" << url <<
") Error Code: " <<
error;
92 if (
fVerbose)
std::cout <<
"NormalizeWire Tool -- Received HTTP response:\n" << getHTTPmessage(d) << std::endl;
94 if (getHTTPstatus(d) != 200) {
95 throw cet::exception(
"NormalizeWire")
96 <<
"Calibration Database access failed. URL: (" << url
97 <<
"). HTTP error status: " << getHTTPstatus(d) <<
". HTTP error message: " << getHTTPmessage(d);
104 int n_tuple = getNtuples(d);
106 throw cet::exception(
"NormalizeWire") <<
"Calibration Database access failed. URL: (" << url <<
") Bad Tuple Number: " << n_tuple;
111 for (
unsigned row = 4;
row < (unsigned)n_tuple;
row++) {
116 int ch = getLongValue(tup, 0, &err);
118 throw cet::exception(
"NormalizeWire") <<
"Calibration Database access failed. URL: (" << url <<
") Failed on tuple access, row: " <<
row <<
", col 0. Error Code: " <<
error;
122 double scale = getDoubleValue(tup, 1, &err);
124 throw cet::exception(
"NormalizeWire") <<
"Calibration Database access failed. URL: (" << url <<
") Failed on tuple access, row: " <<
row <<
", col 1. Error Code: " <<
error;
127 thisscale.scale[ch] = scale;
std::map< uint64_t, ScaleInfo > fScaleInfos
EResult err(const char *call)
std::string URL(uint64_t timestamp)
BEGIN_PROLOG could also be cout
double icarus::calo::NormalizeWire::Normalize |
( |
double |
dQdx, |
|
|
const art::Event & |
e, |
|
|
const recob::Hit & |
h, |
|
|
const geo::Point_t & |
location, |
|
|
const geo::Vector_t & |
direction, |
|
|
double |
t0 |
|
) |
| |
|
overridevirtual |
Implements INormalizeCharge.
Definition at line 136 of file NormalizeWire_tool.cc.
142 unsigned channel =
hit.Channel();
147 if (i.scale.count(channel)) scale = i.scale.at(channel);
149 if (
fVerbose)
std::cout <<
"NormalizeWire Tool -- Data at channel: " << channel <<
" scale: " << scale << std::endl;
ScaleInfo GetScaleInfo(uint64_t timestamp)
BEGIN_PROLOG could also be cout
std::string icarus::calo::NormalizeWire::URL |
( |
uint64_t |
timestamp | ) |
|
|
private |
std::map<uint64_t, ScaleInfo> icarus::calo::NormalizeWire::fScaleInfos |
|
private |
int icarus::calo::NormalizeWire::fTimeout |
|
private |
std::string icarus::calo::NormalizeWire::fURL |
|
private |
bool icarus::calo::NormalizeWire::fVerbose |
|
private |
The documentation for this class was generated from the following file: