ColorDrawingOptions_service.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file ColorDrawingOptions_service.cc
3 ///
4 /// \version $Id: ColorDrawingOptions_service.cc,v 1.1 2010/11/11 18:11:22 p-novaart Exp $
5 /// \author brebel@fnal.gov
6 
7 // Framework includes
8 
9 /// GArSoft includes
12 
16 
17 namespace gar {
18 namespace evd{
19 
20  //......................................................................
22  art::ActivityRegistry & /* reg */)
23 
24  : evdb::Reconfigurable{pset}
25  , fColorOrGray (pset.get< int >("ColorOrGrayScale"))
26  , fRawDiv (pset.get< int >("RawDiv") )
27  , fRecoDiv (pset.get< int >("RecoDiv") )
28  , fRawQLow (pset.get< double >("RawQLow") )
29  , fRawQHigh (pset.get< double >("RawQHigh") )
30  , fRecoQLow (pset.get< double >("RecoQLow") )
31  , fRecoQHigh (pset.get< double >("RecoQHigh") )
32  , fColorScaleRaw(evdb::ColorScale(fRawQLow, fRawQHigh,
33  evdb::kBlueToRedII, evdb::kLinear,
34  fRawDiv,
35  285.0, 135.0, // angle in the color wheel
36  0.65, 0.25)) // intensity from light to dark,
37  // starting with low color wheel value
38  , fGrayScaleRaw(evdb::ColorScale(fRawQLow, fRawQHigh,
39  evdb::kLinGray, evdb::kLinear,
40  fRawDiv,
41  270.0, 0.0, // angle in the color wheel
42  0.5, 0.5)) // intensity from light to dark,
43  // starting with low color wheel value
44  , fColorScaleReco(evdb::ColorScale(fRecoQLow, fRecoQHigh,
45  evdb::kBlueToRedII, evdb::kLinear,
46  fRecoDiv,
47  285.0, 135.0,
48  0.65, 0.25))
49  , fGrayScaleReco(evdb::ColorScale(fRecoQLow, fRecoQHigh,
50  evdb::kLinGray, evdb::kLinear,
51  fRecoDiv,
52  270.0, 0.0,
53  0.5, 0.5))
54  {
55  return;
56  }
57 
58  //......................................................................
60  {
61  }
62 
63  //......................................................................
65  {
66  fColorOrGray = pset.get< int >("ColorOrGrayScale");
67  fRawDiv = pset.get< int >("RawDiv");
68  fRecoDiv = pset.get< int >("RecoDiv");
69  fRawQLow = pset.get< double >("RawQLow");
70  fRawQHigh = pset.get< double >("RawQHigh");
71  fRecoQLow = pset.get< double >("RecoQLow");
72  fRecoQHigh = pset.get< double >("RecoQHigh");
73 
74  fColorScaleRaw = evdb::ColorScale(fRawQLow, fRawQHigh,
75  evdb::kBlueToRedII, evdb::kLinear,
76  fRawDiv,
77  285.0, 135.0, // angle in the color wheel
78  0.65, 0.25); // intensity from light to dark,
79  // starting with low color wheel value
80 
81  fGrayScaleRaw = evdb::ColorScale(fRawQLow, fRawQHigh,
82  evdb::kLinGray, evdb::kLinear,
83  fRawDiv,
84  270.0, 0.0, // angle in the color wheel
85  0.5, 0.5); // intensity from light to dark,
86  // starting with low color wheel value
87 
88  fColorScaleReco = evdb::ColorScale(fRecoQLow, fRecoQHigh,
89  evdb::kBlueToRedII, evdb::kLinear,
90  fRecoDiv,
91  285.0, 135.0,
92  0.65, 0.25);
93 
94  fGrayScaleReco = evdb::ColorScale(fRecoQLow, fRecoQHigh,
95  evdb::kLinGray, evdb::kLinear,
96  fRecoDiv,
97  270.0, 0.0,
98  0.5, 0.5);
99 
100  return;
101  }
102 
103  //......................................................................
104  const evdb::ColorScale& ColorDrawingOptions::RawQ() const
105  {
106  if(fColorOrGray > 0) return fGrayScaleRaw;
107 
108  return fColorScaleRaw;
109  }
110 
111  //......................................................................
112  const evdb::ColorScale& ColorDrawingOptions::CalQ() const
113  {
114  if(fColorOrGray > 0) return fGrayScaleReco;
115 
116  return fColorScaleReco;
117  }
118 
119  //......................................................................
120  const evdb::ColorScale& ColorDrawingOptions::RawT() const
121  {
122  if(fColorOrGray > 0) return fGrayScaleRaw;
123 
124  return fColorScaleRaw;
125  }
126 
127  //......................................................................
128  const evdb::ColorScale& ColorDrawingOptions::CalT() const
129  {
130  if(fColorOrGray > 0) return fGrayScaleReco;
131 
132  return fColorScaleReco;
133  }
134 }// namespace
135 
136 namespace evd {
137 
139 
140 } // namespace evd
141 }
142 ////////////////////////////////////////////////////////////////////////
evdb::ColorScale const & CalT() const
double fRecoQHigh
high edge of ADC values for drawing raw digits
evdb::ColorScale const & CalQ() const
double fRawQLow
low edge of ADC values for drawing raw digits
LArSoft includes.
Definition: InfoTransfer.h:33
T get(std::string const &key) const
Definition: ParameterSet.h:271
void reconfigure(fhicl::ParameterSet const &pset)
evdb::ColorScale const & RawQ() const
int fRawDiv
number of divisions in raw
int fColorOrGray
0 = color, 1 = gray
double fRawQHigh
high edge of ADC values for drawing raw digits
evdb::ColorScale const & RawT() const
double fRecoQLow
low edge of ADC values for drawing raw digits
General GArSoft Utilities.
#define DEFINE_ART_SERVICE(svc)
ColorDrawingOptions(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
int fRecoDiv
number of divisions in raw