1 #include "nutools/EventDisplayBase/Colors.h" 10 #include "nutools/EventDisplayBase/ColorScale.h" 25 for (; itr!=itrEnd; ++itr) {
26 if (itr->second) {
delete itr->second; itr->second = 0; }
34 int black_on_white = p.
get<
int>(
"BlackOnWhite.val");
38 std::vector<std::string>
39 cs = p.
get<std::vector<std::string> >(
"ColorScales.val");
40 for (
unsigned int i=0; i<cs.size(); ++i) {
50 std::string palette_tag(nm); palette_tag +=
"_Palette.val";
53 std::string scale_tag(nm); scale_tag +=
"_Scale.val";
54 std::string reverse_tag(nm); reverse_tag +=
"_Reverse.val";
55 std::string ofufc_tag(nm); ofufc_tag +=
"_UnderOverflowColors.val";
60 std::vector<float>
r, hv;
61 std::vector<int> ofufc;
63 n = p.
get<
int> (n_tag);
64 r = p.
get<std::vector<float> >(r_tag);
66 reverse = p.
get<
int> (reverse_tag);
67 ofufc = p.
get<std::vector<int> > (ofufc_tag);
68 hv = p.
get<std::vector<float> >(hv_tag);
79 cs->SetUnderFlowColor(ofufc[0]);
80 cs->SetOverFlowColor(ofufc[1]);
81 if (reverse) cs->Reverse();
105 fFG[2] =
fBG[3] = kGray+1;
106 fFG[3] =
fBG[2] = kGray+2;
107 fFG[4] =
fBG[1] = kGray+3;
118 fFG[3] =
fBG[2] = kGray+1;
119 fFG[2] =
fBG[3] = kGray+2;
120 fFG[1] =
fBG[4] = kGray+3;
149 gStyle->SetAxisColor(fgcolor,
"XYZ");
150 gStyle->SetLabelColor(fgcolor,
"XYZ");
151 gStyle->SetTitleColor(fgcolor,
"XYZ");
152 gStyle->SetCanvasColor(bgcolor);
153 gStyle->SetLegendFillColor(bgcolor);
154 gStyle->SetPadColor(bgcolor);
155 gStyle->SetFuncColor(kRed);
156 gStyle->SetGridColor(fgcolor);
157 gStyle->SetFrameFillColor(bgcolor);
158 gStyle->SetFrameLineColor(bgcolor);
161 gStyle->SetHistLineColor(fgcolor);
162 gStyle->SetStatColor(bgcolor);
163 gStyle->SetStatTextColor(fgcolor);
164 gStyle->SetTitleFillColor(bgcolor);
165 gStyle->SetTitleTextColor(fgcolor);
std::map< std::string, ColorScale * > fColorScales
#define DEFINE_ART_SERVICE(svc)
int fFG[kMAX_FGBG]
Foreground colors.
Manage all things related to colors for the event display.
void UnpackColorScale(fhicl::ParameterSet const &p, const std::string &c)
Colors(fhicl::ParameterSet const &p)
Build an association between a numerical range and a ROOT color index for use in, eg...
ColorScale & Scale(const std::string &nm)
T get(std::string const &key) const
static int Palette(const std::string &nm)
static int Scale(const std::string &nm)
static int max(int a, int b)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
void reconfigure(fhicl::ParameterSet const &p)
static unsigned int reverse(QString &chars, unsigned char *level, unsigned int a, unsigned int b)
static const int kMAX_FGBG