CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
public_plots_tools.ColorScheme Class Reference
Inheritance diagram for public_plots_tools.ColorScheme:

Public Member Functions

def __init__
 
def InitColors
 

Public Attributes

 color_by_year
 
 color_fill_del
 
 color_fill_peak
 
 color_fill_pileup
 
 color_fill_rec
 
 color_line_del
 
 color_line_peak
 
 color_line_pileup
 
 color_line_rec
 
 file_suffix
 
 logo_name
 
 name
 

Detailed Description

A bit of a cludge, but a simple way to store color choices.

Definition at line 110 of file public_plots_tools.py.

Constructor & Destructor Documentation

def public_plots_tools.ColorScheme.__init__ (   self,
  name 
)

Definition at line 145 of file public_plots_tools.py.

146  def __init__(self, name):
148  self.name = name
149 
150  # Some defaults.
151  self.color_fill_del = "black"
152  self.color_fill_rec = "white"
153  self.color_fill_peak = "black"
157  self.color_by_year = {
158  2010 : "green",
159  2011 : "red",
160  2012 : "blue"
161  }
162  self.color_line_pileup = "black"
163  self.color_fill_pileup = "blue"
164  self.logo_name = "cms_logo.png"
165  self.file_suffix = "_%s" % self.name.lower()
166 
167  tmp_name = self.name.lower()
168  if tmp_name == "greg":
169  # Color scheme 'Greg'.
170  self.color_fill_del = ColorScheme.cms_blue
171  self.color_fill_rec = ColorScheme.cms_orange
172  self.color_fill_peak = ColorScheme.cms_orange
176  self.color_line_pileup = "black"
177  self.color_fill_pileup = ColorScheme.cms_blue
178  self.logo_name = "cms_logo.png"
179  self.file_suffix = ""
180  elif tmp_name == "joe":
181  # Color scheme 'Joe'.
182  self.color_fill_del = ColorScheme.cms_yellow
183  self.color_fill_rec = ColorScheme.cms_red
184  self.color_fill_peak = ColorScheme.cms_red
188  self.color_line_pileup = "black"
189  self.color_fill_pileup = ColorScheme.cms_yellow
190  self.logo_name = "cms_logo_alt.png"
191  self.file_suffix = "_alt"
192  else:
193  print >> sys.stderr, \
194  "ERROR Unknown color scheme '%s'" % self.name
195  sys.exit(1)
196 
197  # Find the full path to the logo PNG file.
198  # NOTE: This is a little fragile, I think.
199  logo_path = os.path.realpath(os.path.dirname(__file__))
200  self.logo_name = os.path.join(logo_path,
201  "../plotdata/%s" % self.logo_name)
202 
203  # End of __init__().

Member Function Documentation

def public_plots_tools.ColorScheme.InitColors (   cls)

Definition at line 114 of file public_plots_tools.py.

115  def InitColors(cls):
116 
117  #------------------------------
118  # For color scheme 'Greg'.
119  #------------------------------
120 
121  # This is the light blue of the CMS logo.
122  ColorScheme.cms_blue = (0./255., 152./255., 212./255.)
123 
124  # This is the orange from the CMS logo.
125  ColorScheme.cms_orange = (241./255., 194./255., 40./255.)
126 
127  # Slightly darker versions of the above colors for the lines.
128  ColorScheme.cms_blue_dark = (102./255., 153./255., 204./255.)
129  ColorScheme.cms_orange_dark = (255./255., 153./255., 0./255.)
130 
131  #------------------------------
132  # For color scheme 'Joe'.
133  #------------------------------
134 
135  # Several colors from the alternative CMS logo, with their
136  # darker line variants.
137 
138  ColorScheme.cms_red = (208./255., 0./255., 37./255.)
139  ColorScheme.cms_yellow = (255./255., 248./255., 0./255.)
140  ColorScheme.cms_purple = (125./255., 16./255., 123./255.)
141  ColorScheme.cms_green = (60./255., 177./255., 110./255.)
142  ColorScheme.cms_orange2 = (227./255., 136./255., 36./255.)
143 
144  # End of InitColors().

Member Data Documentation

public_plots_tools.ColorScheme.color_by_year

Definition at line 156 of file public_plots_tools.py.

public_plots_tools.ColorScheme.color_fill_del

Definition at line 150 of file public_plots_tools.py.

public_plots_tools.ColorScheme.color_fill_peak

Definition at line 152 of file public_plots_tools.py.

public_plots_tools.ColorScheme.color_fill_pileup

Definition at line 162 of file public_plots_tools.py.

public_plots_tools.ColorScheme.color_fill_rec

Definition at line 151 of file public_plots_tools.py.

public_plots_tools.ColorScheme.color_line_del

Definition at line 153 of file public_plots_tools.py.

public_plots_tools.ColorScheme.color_line_peak

Definition at line 155 of file public_plots_tools.py.

public_plots_tools.ColorScheme.color_line_pileup

Definition at line 161 of file public_plots_tools.py.

public_plots_tools.ColorScheme.color_line_rec

Definition at line 154 of file public_plots_tools.py.

public_plots_tools.ColorScheme.file_suffix

Definition at line 164 of file public_plots_tools.py.

public_plots_tools.ColorScheme.logo_name

Definition at line 163 of file public_plots_tools.py.

public_plots_tools.ColorScheme.name

Definition at line 147 of file public_plots_tools.py.

Referenced by dirstructure.Directory.__create_pie_image(), dqm_interfaces.DirID.__eq__(), dirstructure.Directory.__get_full_path(), dirstructure.Comparison.__get_img_name(), dataset.Dataset.__getDataType(), dataset.Dataset.__getFileInfoList(), dirstructure.Comparison.__make_image(), dirstructure.Directory.__repr__(), dqm_interfaces.DirID.__repr__(), dirstructure.Comparison.__repr__(), dirstructure.Directory.calcStats(), utils.StatisticalTest.get_status(), dirstructure.Directory.print_report(), and Vispa.Views.PropertyView.Property.valueChanged().