#include <DetPedestalDUNE.h>
Definition at line 23 of file DetPedestalDUNE.h.
dune::DetPedestalDUNE::DetPedestalDUNE |
( |
std::string |
detName = "" | ) |
|
Definition at line 15 of file DetPedestalDUNE.cxx.
std::unordered_map< raw::ChannelID_t, float > fRmsMap
std::unordered_map< raw::ChannelID_t, float > fRmsErrMap
std::unordered_map< raw::ChannelID_t, float > fMeanMap
std::unordered_map< raw::ChannelID_t, float > fMeanErrMap
Definition at line 28 of file DetPedestalDUNE.cxx.
std::unordered_map< raw::ChannelID_t, float > fRmsMap
std::unordered_map< raw::ChannelID_t, float > fRmsErrMap
std::unordered_map< raw::ChannelID_t, float > fMeanMap
bool Configure(fhicl::ParameterSet const &pset)
std::unordered_map< raw::ChannelID_t, float > fMeanErrMap
Definition at line 42 of file DetPedestalDUNE.cxx.
43 const string myname =
"DetPedestalDUNE::Configure: ";
44 fUseDB =
p.get<
bool>(
"UseDB",
false);
std::map< geo::View_t, float > fDefaultRmsErr
Planes which measure Z direction.
std::map< geo::View_t, float > fDefaultMeanErr
std::map< geo::View_t, float > fDefaultRms
std::map< geo::View_t, float > fDefaultMean
QTextStream & endl(QTextStream &s)
std::string dune::DetPedestalDUNE::CSVFileName |
( |
| ) |
const |
|
inline |
float dune::DetPedestalDUNE::DefaultMean |
( |
geo::View_t |
v | ) |
const |
float dune::DetPedestalDUNE::DefaultMeanErr |
( |
geo::View_t |
v | ) |
const |
float dune::DetPedestalDUNE::DefaultRms |
( |
geo::View_t |
v | ) |
const |
float dune::DetPedestalDUNE::DefaultRmsErr |
( |
geo::View_t |
v | ) |
const |
void dune::DetPedestalDUNE::LoadFromCSV |
( |
| ) |
|
|
private |
Retrieve pedestal information.
Implements lariov::DetPedestalProvider.
Definition at line 236 of file DetPedestalDUNE.cxx.
246 std::cerr <<
"DetPedestalDUNE: Validity time is not set! Aborting." <<
std::endl;
std::unordered_map< raw::ChannelID_t, float > fMeanMap
std::map< geo::View_t, float > fDefaultMean
QTextStream & endl(QTextStream &s)
Implements lariov::DetPedestalProvider.
Definition at line 258 of file DetPedestalDUNE.cxx.
269 std::cerr <<
"DetPedestalDUNE: Validity time is not set! Aborting." <<
std::endl;
std::map< geo::View_t, float > fDefaultMeanErr
std::unordered_map< raw::ChannelID_t, float > fMeanErrMap
QTextStream & endl(QTextStream &s)
Implements lariov::DetPedestalProvider.
Definition at line 281 of file DetPedestalDUNE.cxx.
291 std::cerr <<
"DetPedestalDUNE: Validity time is not set! Aborting." <<
std::endl;
std::unordered_map< raw::ChannelID_t, float > fRmsMap
std::map< geo::View_t, float > fDefaultRms
QTextStream & endl(QTextStream &s)
Implements lariov::DetPedestalProvider.
Definition at line 303 of file DetPedestalDUNE.cxx.
313 std::cerr <<
"DetPedestalDUNE: Validity time is not set! Aborting." <<
std::endl;
std::map< geo::View_t, float > fDefaultRmsErr
std::unordered_map< raw::ChannelID_t, float > fRmsErrMap
QTextStream & endl(QTextStream &s)
void dune::DetPedestalDUNE::PrintAllValues |
( |
| ) |
|
Definition at line 325 of file DetPedestalDUNE.cxx.
327 for (; itMean !=
fMeanMap.end(); ++itMean) {
328 std::cout <<
"Channel: " << itMean->first <<
", Mean = " << itMean->second
std::unordered_map< raw::ChannelID_t, float > fRmsMap
std::unordered_map< raw::ChannelID_t, float > fMeanMap
QTextStream & endl(QTextStream &s)
void dune::DetPedestalDUNE::SetCSVFileName |
( |
std::string |
fname | ) |
|
|
inline |
void dune::DetPedestalDUNE::SetDefaults |
( |
geo::View_t |
v, |
|
|
float |
mean, |
|
|
float |
meanerr, |
|
|
float |
rms, |
|
|
float |
rmserr |
|
) |
| |
|
inline |
Definition at line 45 of file DetPedestalDUNE.h.
std::map< geo::View_t, float > fDefaultRmsErr
double rms(sqlite3 *db, std::string const &table_name, std::string const &column_name)
std::map< geo::View_t, float > fDefaultMeanErr
std::map< geo::View_t, float > fDefaultRms
std::map< geo::View_t, float > fDefaultMean
double mean(sqlite3 *db, std::string const &table_name, std::string const &column_name)
void dune::DetPedestalDUNE::SetDetName |
( |
std::string |
detName | ) |
|
|
inline |
void dune::DetPedestalDUNE::SetUseDB |
( |
bool |
f | ) |
|
|
inline |
void dune::DetPedestalDUNE::SetUseDefaults |
( |
bool |
f | ) |
|
|
inline |
Definition at line 94 of file DetPedestalDUNE.cxx.
99 std::cout << __PRETTY_FUNCTION__ <<
" Called with run " << ts <<
std::endl;
102 std::cout << __PRETTY_FUNCTION__ <<
" Method of determining pedestals is undefined! Either set UseDB or CSVFileName in fhicl. ";
104 std::cout <<
"Aborting per request." <<
std::endl;
124 std::cerr <<
"Detector name is undefined. Aborting." <<
std::endl;
133 int meanIdx = t.
AddCol(
"mean",
"float");
134 int rmsIdx = t.
AddCol(
"rms",
"float");
135 int meanErrIdx = t.
AddCol(
"meanerr",
"float");
136 int rmsErrIdx = t.
AddCol(
"rmserr",
"float");
148 std::cout <<
"Number of pedestals from database/CSV file is 0. This should never be the case! ";
150 std::cout <<
"Aborting, per request." <<
std::endl;
157 float mean,
rms, meanerr, rmserr;
159 for (
int i=0; i<t.
NRow(); ++i) {
160 mean = rms = meanerr = rmserr = 0.;
165 row->
Col(meanIdx).
Get(mean);
166 row->
Col(meanErrIdx).
Get(meanerr);
167 row->
Col(rmsIdx).
Get(rms);
168 row->
Col(rmsErrIdx).
Get(rmserr);
176 std::cout << __PRETTY_FUNCTION__ <<
": using run " << row->
VldTime()
double rms(sqlite3 *db, std::string const &table_name, std::string const &column_name)
std::unordered_map< raw::ChannelID_t, float > fRmsMap
std::unordered_map< raw::ChannelID_t, float > fRmsErrMap
std::unordered_map< raw::ChannelID_t, float > fMeanMap
unsigned __int64 uint64_t
std::unordered_map< raw::ChannelID_t, float > fMeanErrMap
art::ServiceHandle< lbne::ChannelMapService > fChannelMap
double mean(sqlite3 *db, std::string const &table_name, std::string const &column_name)
QTextStream & endl(QTextStream &s)
uint64_t dune::DetPedestalDUNE::VldTimeUsed |
( |
| ) |
const |
|
inline |
bool dune::DetPedestalDUNE::fAbortIfNoPeds |
|
private |
std::map<geo::View_t,float> dune::DetPedestalDUNE::fDefaultMean |
|
private |
std::map<geo::View_t,float> dune::DetPedestalDUNE::fDefaultMeanErr |
|
private |
std::map<geo::View_t,float> dune::DetPedestalDUNE::fDefaultRms |
|
private |
std::map<geo::View_t,float> dune::DetPedestalDUNE::fDefaultRmsErr |
|
private |
int dune::DetPedestalDUNE::fLogLevel |
|
private |
bool dune::DetPedestalDUNE::fUseDB |
|
private |
bool dune::DetPedestalDUNE::fUseDefaults |
|
private |
uint64_t dune::DetPedestalDUNE::fVldTime |
|
private |
uint64_t dune::DetPedestalDUNE::fVldTimeUsed |
|
private |
The documentation for this class was generated from the following files: