7 #include "messagefacility/MessageLogger/MessageLogger.h"
16 : evdb::Reconfigurable{pset}
17 , fColorOrGray(pset.get<
int >(
"ColorOrGrayScale"))
18 , fRawDiv (pset.get< std::vector<int> >(
"RawDiv") )
19 , fRecoDiv (pset.get< std::vector<int> >(
"RecoDiv") )
20 , fRawQLow (pset.get< std::vector<double> >(
"RawQLow") )
21 , fRawQHigh (pset.get< std::vector<double> >(
"RawQHigh") )
22 , fRecoQLow (pset.get< std::vector<double> >(
"RecoQLow") )
23 , fRecoQHigh (pset.get< std::vector<double> >(
"RecoQHigh") )
25 this->CheckInputVectorSizes();
27 for(
size_t i = 0; i < fRawDiv.size(); ++i){
28 fColorScaleRaw.push_back(evdb::ColorScale(fRawQLow[i], fRawQHigh[i],
29 evdb::kBlueToRedII, evdb::kLinear,
35 fGrayScaleRaw.push_back(evdb::ColorScale(fRawQLow[i], fRawQHigh[i],
36 evdb::kLinGray, evdb::kLinear,
43 for(
size_t i = 0; i < fRecoDiv.size(); ++i){
44 fColorScaleReco.push_back(evdb::ColorScale(fRecoQLow[i], fRecoQHigh[i],
45 evdb::kBlueToRedII, evdb::kLinear,
49 fGrayScaleReco.push_back(evdb::ColorScale(fRecoQLow[i], fRecoQHigh[i],
50 evdb::kLinGray, evdb::kLinear,
69 mf::LogWarning(
"ColorDrawingOptions") <<
"only 1 value given for raw color scale: "
70 <<
"number of divisions, low and high values.\n"
71 <<
"Pad out those values for the number of signal types.";
74 throw cet::exception(
"ColorDrawingOptionsUnclear") <<
"You have specified an incorrect number of "
75 <<
"values for the raw color/gray scale "
76 <<
"than there are types of signal planes in "
77 <<
"the detector. It is unclear what your "
78 <<
"intention is, so bail.\n";
87 mf::LogWarning(
"ColorDrawingOptions") <<
"only 1 value given for reco color scale: "
88 <<
"number of divisions, low and high values.\n"
89 <<
"Pad out those values for the number of signal types.";
92 throw cet::exception(
"ColorDrawingOptionsUnclear") <<
"You have specified an incorrect number of "
93 <<
"values for the reco color/gray scale "
94 <<
"than there are types of signal planes in "
95 <<
"the detector. It is unclear what your "
96 <<
"intention is, so bail.\n";
106 fRawDiv = pset.get< std::vector<int> >(
"RawDiv");
107 fRecoDiv = pset.get< std::vector<int> >(
"RecoDiv");
108 fRawQLow = pset.get< std::vector<double> >(
"RawQLow");
109 fRawQHigh = pset.get< std::vector<double> >(
"RawQHigh");
110 fRecoQLow = pset.get< std::vector<double> >(
"RecoQLow");
111 fRecoQHigh = pset.get< std::vector<double> >(
"RecoQHigh");
115 for(
size_t i = 0; i < fRawDiv.size(); ++i){
120 for(
size_t i = 0; i < fRecoDiv.size(); ++i){
131 size_t pos = (size_t)st;
134 throw cet::exception(
"ColorDrawingOptions") <<
"asked for RawQ with geo::kMysteryType, "
135 <<
"bad things will happen, so bail\n";
145 size_t pos = (size_t)st;
148 throw cet::exception(
"ColorDrawingOptions") <<
"asked for CalQ with geo::kMysteryType, "
149 <<
"bad things will happen, so bail\n";
159 size_t pos = (size_t)st;
162 throw cet::exception(
"ColorDrawingOptions") <<
"asked for RawT with geo::kMysteryType, "
163 <<
"bad things will happen, so bail\n";
174 size_t pos = (size_t)st;
177 throw cet::exception(
"ColorDrawingOptions") <<
"asked for CalT with geo::kMysteryType, "
178 <<
"bad things will happen, so bail\n";
std::vector< double > fRawQLow
low edge of ADC values for drawing raw digits
const evdb::ColorScale & CalT(geo::SigType_t st) const
std::vector< int > fRawDiv
number of divisions in raw
std::vector< evdb::ColorScale > fGrayScaleRaw
std::vector< evdb::ColorScale > fColorScaleReco
std::vector< evdb::ColorScale > fColorScaleRaw
void reconfigure(fhicl::ParameterSet const &pset)
ColorDrawingOptions(fhicl::ParameterSet const &pset)
std::vector< double > fRecoQHigh
high edge of ADC values for drawing raw digits
std::vector< double > fRecoQLow
low edge of ADC values for drawing raw digits
The color scales used by the event display.
void CheckInputVectorSizes()
const evdb::ColorScale & RawQ(geo::SigType_t st) const
enum geo::_plane_sigtype SigType_t
const evdb::ColorScale & CalQ(geo::SigType_t st) const
std::vector< double > fRawQHigh
high edge of ADC values for drawing raw digits
int fColorOrGray
0 = color, 1 = gray
std::vector< int > fRecoDiv
number of divisions in raw
std::vector< evdb::ColorScale > fGrayScaleReco
const evdb::ColorScale & RawT(geo::SigType_t st) const