32 const string myname =
"test_FixedDetPedestalService: ";
34 cout << myname <<
"NDEBUG must be off." <<
endl;
37 string line =
"-----------------------------";
39 cout << myname << line <<
endl;
40 cout << myname <<
"Create top-level FCL." <<
endl;
41 std::ostringstream oss;
42 oss <<
"#include \"pedestals_dune.fcl\"" <<
endl;
43 oss <<
"#include \"geometry_dune.fcl\"" <<
endl;
44 oss <<
"services.DetPedestalService: @local::dune_fixedpeds" <<
endl;
45 oss <<
"services.Geometry: @local::dune35t_geo" <<
endl;
46 oss <<
"services.ExptGeoHelperInterface: @local::dune_geometry_helper" <<
endl;
49 cout << myname << line <<
endl;
50 cout << myname <<
"Fetch geometry service." <<
endl;
54 cout << myname << line <<
endl;
55 cout << myname <<
"Fetch pedestal service." <<
endl;
58 assert( pdpp !=
nullptr );
60 cout << myname << line <<
endl;
61 cout << myname <<
"Checking pedestals for selected channels." <<
endl;
62 vector<int> chans = {0, 1, 200, 300, 400, 500, 600, 700, 800, 900};
66 cout <<
setw(hchan) <<
"Channel" 67 <<
setw(hview) <<
"View" 68 <<
setw(hmean) <<
"Mean" 69 <<
setw(hmean) <<
"RMS" 71 for (
int chan : chans ) {
72 cout <<
setw(hchan) << chan
81 assert( pdpp->
PedMean(chan) == meanExp );
84 cout << myname << line <<
endl;
85 cout << myname <<
"Done." <<
endl;
virtual float PedRms(raw::ChannelID_t ch) const =0
Planes which measure Z direction.
static void load_services(std::string const &config)
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
DetPedestalProvider const * provider() const
Q_EXPORT QTSManip setw(int w)
void line(double t, double *p, double &x, double &y, double &z)
virtual float PedMean(raw::ChannelID_t ch) const =0
Retrieve pedestal information.
QTextStream & endl(QTextStream &s)