ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.subdetector.DCSC_Subdetector Class Reference
Inheritance diagram for python.subdetector.DCSC_Subdetector:
Collaboration diagram for python.subdetector.DCSC_Subdetector:

Public Member Functions

def __init__ (self)
 
def __repr__ (self)
 
def get_variable (self, name)
 
def set_input_mapping (self, what, mapping)
 
def evaluate_inputs (self, lbtime)
 
def merge_variable_states (self, states)
 
def merge_inputs (self, channel, *inputs)
 
def merge_input_information (self, channel, *inputs)
 
def merge_input_variables (self, inputs)
 
def map_inputs_to_outputs (self, inputs)
 
def input_channel_set (self)
 
def get_name_for_input_channel (self, input_channel)
 
def get_ids_which_are (self, output_channel, states, what)
 
def calculate_dead_fraction (self, since, until, output_channel, states, state_iovs)
 
def debug_what_changed (self, runlb, prev_states, states)
 
def calculate_dead_fraction_all (self, output_channel, local_variables)
 
def dq_worst (self, states)
 
def merge_globals (self, output_channel, dead_frac_iovs, global_variables)
 
def calculate_result_for_output (self, output_channel, local_variables, global_variables)
 
def select_globals (self, output_channel, input_globals)
 
def calculate_result (self, inputs_by_output, global_variables)
 
def run (self, lbtime, run_iovs=None)
 
def start (self)
 
def done (self)
 

Public Attributes

 input_to_output_map
 
 channel_indices
 
 run_iovs
 

Detailed Description

A defect calculator for one subdetector.

Definition at line 22 of file subdetector.py.

Constructor & Destructor Documentation

◆ __init__()

def python.subdetector.DCSC_Subdetector.__init__ (   self)

Definition at line 27 of file subdetector.py.

27  def __init__(self):
28 
29  # calculate the inverse mapping if appropriate
30  if not hasattr(self, "input_to_output_map") and hasattr(self, "mapping"):
31  # NOTE: this breaks silently if an input channel was accidentally
32  # mapped to more than one output channel. Maybe I should add a check.
33  inverse = dict((value, key)
34  for key, values in six.iteritems(self.mapping)
35  for value in values)
36 
37  self.input_to_output_map = inverse
38 

Member Function Documentation

◆ __repr__()

def python.subdetector.DCSC_Subdetector.__repr__ (   self)

Definition at line 39 of file subdetector.py.

39  def __repr__(self):
40  return self.__class__.__name__
41 

◆ calculate_dead_fraction()

def python.subdetector.DCSC_Subdetector.calculate_dead_fraction (   self,
  since,
  until,
  output_channel,
  states,
  state_iovs 
)
Calculate the dead fraction and the resulting traffic light code.

Reimplemented in python.subdetectors.tile.Tile.

Definition at line 264 of file subdetector.py.

264  def calculate_dead_fraction(self, since, until, output_channel, states,
265  state_iovs):
266  """
267  Calculate the dead fraction and the resulting traffic light code.
268  """
269 
270  #states = [s.good if s is not None else None for s in state_iovs]
271 
272  n_total = len(states)
273  n_working = states.count(GOOD)
274  n_bad = states.count(BAD)
275  n_ooc = states.count(OUT_OF_CONFIG)
276  n_unfilled = states.count(EMPTY)
277 
278  log.debug("%s -> %s tot:%4s working:%4s bad:%4s ooc:%4s empty:%4s",
279  since, until, n_total, n_working, n_bad, n_ooc, n_unfilled)
280 
281  # Reminder to self:
282  # Need to take total from the right hand side here, ultimately.
283  # Perhaps the correct method is to insert "empty IoVs" for missing
284  # channels
285  assert n_total == len(self.mapping[output_channel])
286 
287  if logEnabledFor(logging.DEBUG):
288  if n_unfilled:
289  args = output_channel, states, EMPTY
290  unfilled_chans = sorted(self.get_ids_which_are(*args))
291  log.debug("WARNING: the following channelids are unfilled: "
292  "%r", unfilled_chans)
293 
294  if n_ooc:
295  ooc_ids = self.get_ids_which_are(output_channel, states, OUT_OF_CONFIG)
296  log.debug("OOC ids: %s", sorted(ooc_ids))
297  if n_bad:
298  bad_ids = self.get_ids_which_are(output_channel, states, BAD)
299  log.debug("BAD ids: %s", sorted(bad_ids))
300 
301  assert not n_total - n_working - n_bad - n_ooc - n_unfilled, (
302  "Some states unaccounted for? This is a bug.")
303 
304  n_config = n_total - n_ooc
305  dead_fraction = 1. - n_working / n_total
306 
307  code = GREEN
308  if self.dead_fraction_caution is not None and (
309  self.dead_fraction_caution < dead_fraction <= self.dead_fraction_bad):
310  code = YELLOW
311 
312  elif dead_fraction > self.dead_fraction_bad:
313  code = RED
314 
315  # If the number of unfilled channels is sufficient to send us over the
316  # caution threshold, then set the code to GREY to indicate a problem.
317  unfilled_fraction = n_unfilled / n_total
318  threshold = (self.dead_fraction_caution
319  if self.dead_fraction_caution is not None else
320  self.dead_fraction_bad)
321  if unfilled_fraction > threshold:
322  code = GREY
323 
324  if n_unfilled and config.opts.mark_unfilled_grey:
325  code = GREY
326 
327  # what the heck is thrust?
328  thrust = 0.
329  return code, dead_fraction, thrust, n_config, n_working
330 

◆ calculate_dead_fraction_all()

def python.subdetector.DCSC_Subdetector.calculate_dead_fraction_all (   self,
  output_channel,
  local_variables 
)

Definition at line 336 of file subdetector.py.

336  def calculate_dead_fraction_all(self, output_channel, local_variables):
337 
338  log.debug("Calculating dead fractions for output: %i", output_channel)
339 
340  # local_variables is a list of IOVSets (one for each input channel),
341  # for this output channel.
342  # Why would you call it local_variables?
343 
344  #prev_states = []
345 
346  dead_frac_iovs = IOVSet()
347  calc_dead_frac = self.calculate_dead_fraction
348  # loop over smallest IOV chunks for this output channel
349  for since, until, states in process_iovs(self.run_iovs, *local_variables):
350  run_iov = states[0]
351  # state_iovs is now a list of iovs, one for each input channel mapped
352  # to this output channel
353  state_iovs = states[1:]
354 
355  states = [s.good for s in state_iovs]
356 
357  if run_iov._is_empty:
358  # Ignore regions outside runs.
359  continue
360 
361  iov_state = calc_dead_frac(since, until, output_channel,
362  states, state_iovs)
363 
364  #dead_frac_iovs.add(since, until, output_channel, *iov_state)
365  result_iov = DCSOFL_IOV(since, until, output_channel, *iov_state)
366  result_iov._orig_iovs = state_iovs
367  dead_frac_iovs.append(result_iov)
368 
369  return dead_frac_iovs#.solidify(DCSOFL_IOV)
370 

◆ calculate_result()

def python.subdetector.DCSC_Subdetector.calculate_result (   self,
  inputs_by_output,
  global_variables 
)
Terrible name for a method.
Calculate the iov extents and dead fractions for all output channels.
In other words, the IoVs to be written to DCSOFL for this subdetector.

Definition at line 464 of file subdetector.py.

464  def calculate_result(self, inputs_by_output, global_variables):
465  """
466  Terrible name for a method.
467  Calculate the iov extents and dead fractions for all output channels.
468  In other words, the IoVs to be written to DCSOFL for this subdetector.
469  """
470  result = IOVSet(iov_type=DCSOFL_IOV)
471 
472  # loop over output channel dictionary
473  for channel, input_iovs in sorted(six.iteritems(inputs_by_output)):
474  these_globals = self.select_globals(channel, global_variables)
475  args = channel, input_iovs, these_globals
476  result.extend(self.calculate_result_for_output(*args))
477 
478  return result
479 

◆ calculate_result_for_output()

def python.subdetector.DCSC_Subdetector.calculate_result_for_output (   self,
  output_channel,
  local_variables,
  global_variables 
)
Calculate the iov extents and dead fractions for one output channel

* If there are 'non-global' variables, evaluate the dead fraction, which
  effectively becomes a new global variable.
* If there are no global variables, return the above as a result
* If there are global variables, merge them together.

Definition at line 426 of file subdetector.py.

426  def calculate_result_for_output(self, output_channel,
427  local_variables, global_variables):
428  """
429  Calculate the iov extents and dead fractions for one output channel
430 
431  * If there are 'non-global' variables, evaluate the dead fraction, which
432  effectively becomes a new global variable.
433  * If there are no global variables, return the above as a result
434  * If there are global variables, merge them together.
435  """
436 
437  dead_frac_iovs = IOVSet(iov_type=DCSOFL_IOV)
438 
439  if local_variables:
440  dead_frac_iovs = self.calculate_dead_fraction_all(output_channel,
441  local_variables)
442 
443  if not global_variables:
444  # There are no globals, we're done.
445  return dead_frac_iovs
446 
447  return self.merge_globals(output_channel, dead_frac_iovs, global_variables)
448 

◆ debug_what_changed()

def python.subdetector.DCSC_Subdetector.debug_what_changed (   self,
  runlb,
  prev_states,
  states 
)
Apparently not used

Definition at line 331 of file subdetector.py.

331  def debug_what_changed(self, runlb, prev_states, states):
332  """Apparently not used"""
333  changes = [(a, b) for a, b in zip(prev_states, states) if a != b]
334  log.debug("Changes at %s: %i: %s", runlb, len(changes), tally(changes))
335 

◆ done()

def python.subdetector.DCSC_Subdetector.done (   self)
An empty function which can be overloaded to do any needed 
post-processing

Definition at line 526 of file subdetector.py.

526  def done(self):
527  """
528  An empty function which can be overloaded to do any needed
529  post-processing
530  """
531 

◆ dq_worst()

def python.subdetector.DCSC_Subdetector.dq_worst (   self,
  states 
)
Make a DQ-colour decision based on `states`

Definition at line 371 of file subdetector.py.

371  def dq_worst(self, states):
372  """
373  Make a DQ-colour decision based on `states`
374  """
375  states = set([s.Code for s in states])
376  if RED in states: return RED
377  elif YELLOW in states: return YELLOW
378  elif WHITE in states: return WHITE
379  elif GREEN in states: return GREEN
380  return RED
381 

◆ evaluate_inputs()

def python.subdetector.DCSC_Subdetector.evaluate_inputs (   self,
  lbtime 
)
Read the cool database and determine the state of the input channels
by luminosity block

Definition at line 64 of file subdetector.py.

64  def evaluate_inputs(self, lbtime):
65  """
66  Read the cool database and determine the state of the input channels
67  by luminosity block
68  """
69 
70  # inputs is literally the same as self.variables
71  # # Is this true?? I don't think it is
72  # calculate_good_iovs will calculate the goodness of all input channels
73  # and remap the channel ids if necessary.
74  # TODO: This could be rewritten to be more clear.
75  inputs = [v.calculate_good_iovs(lbtime, self) for v in self.variables]
76 
77  # Why do we care what the hash value is for the variables??
78  if log.isEnabledFor(logging.INFO):
79  log.info("lbtime hash = % 09x, inputs hash = %09x",
80  hash(lbtime), hash(tuple(self.variables)))
81  return inputs
82 

◆ get_ids_which_are()

def python.subdetector.DCSC_Subdetector.get_ids_which_are (   self,
  output_channel,
  states,
  what 
)

Definition at line 258 of file subdetector.py.

258  def get_ids_which_are(self, output_channel, states, what):
259  indices = [i for i, x in enumerate(states) if x is what]
260  chan_indices = self.channel_indices[output_channel]
261  input_chan_name = self.get_name_for_input_channel
262  return [input_chan_name(chan_indices[i]) for i in indices]
263 

◆ get_name_for_input_channel()

def python.subdetector.DCSC_Subdetector.get_name_for_input_channel (   self,
  input_channel 
)
If it is possible to give a logical name for an input channel, return
it here. These numbers are used for debugging purposes.

By default, do nothing. Over-ridden by subdetectors

Definition at line 249 of file subdetector.py.

249  def get_name_for_input_channel(self, input_channel):
250  """
251  If it is possible to give a logical name for an input channel, return
252  it here. These numbers are used for debugging purposes.
253 
254  By default, do nothing. Over-ridden by subdetectors
255  """
256  return input_channel
257 

◆ get_variable()

def python.subdetector.DCSC_Subdetector.get_variable (   self,
  name 
)
Get a DCS_Variable by name.

Definition at line 42 of file subdetector.py.

42  def get_variable(self, name):
43  """
44  Get a DCS_Variable by name.
45  """
46  for variable in self.variables:
47  if variable.folder_name == name:
48  return variable
49 
50  raise RuntimeError("Folder '%s' not found" % name)
51 

◆ input_channel_set()

def python.subdetector.DCSC_Subdetector.input_channel_set (   self)
Return a set containing the all input channel IDs for this subdetector

Definition at line 243 of file subdetector.py.

243  def input_channel_set(self):
244  """
245  Return a set containing the all input channel IDs for this subdetector
246  """
247  return set(v for vals in self.mapping.values() for v in vals)
248 

◆ map_inputs_to_outputs()

def python.subdetector.DCSC_Subdetector.map_inputs_to_outputs (   self,
  inputs 
)
Determine which input channels belong to which output channels.
inputs is a list of IOVSets, exactly one per channel.

Definition at line 200 of file subdetector.py.

200  def map_inputs_to_outputs(self, inputs):
201  """
202  Determine which input channels belong to which output channels.
203  inputs is a list of IOVSets, exactly one per channel.
204  """
205  # Per output object, store a list of iov lists.
206  result = {}
207 
208  # Keep a record of the channels we have seen, and what their index
209  # will be in the states list. This is so that we can determine later
210  # which channel a state belongs to. (For empty IoVs, for instance)
211  self.channel_indices = {}
212  seen_channels = set()
213 
214  empty_iovset_types = [iovs.empty_maker() for iovs in inputs]
215 
216  # input to output map is the inverse map with
217  # key=input_channel and val=output_channel
218  mapping = self.input_to_output_map
219 
220  # Loop over channels
221  for iovs in inputs:
222  if not iovs: continue # Can this happen?
223  input_channel = iovs[0].channel
224  if input_channel not in mapping:
225  raise RuntimeError("channel not found in mapping: " + str(input_channel))
226  seen_channels.add(input_channel)
227  output_channel = mapping[input_channel]
228  result.setdefault(output_channel, []).append(iovs)
229  self.channel_indices.setdefault(output_channel, []).append(input_channel)
230 
231  missing_channels = self.input_channel_set - seen_channels
232 
233  for channel, make_iovset in zip(missing_channels, empty_iovset_types):
234  # No IoVs for this channel. Append an empty IoV range.
235  output_channel = mapping[channel]
236  result.setdefault(output_channel, []).append(make_iovset())
237  (self.channel_indices.setdefault(output_channel, [])
238  .append(channel))
239 
240  return result
241 

◆ merge_globals()

def python.subdetector.DCSC_Subdetector.merge_globals (   self,
  output_channel,
  dead_frac_iovs,
  global_variables 
)
Merge together global states to decide a final code

If the dead fraction is unavailable, writes -1.

Definition at line 382 of file subdetector.py.

382  def merge_globals(self, output_channel, dead_frac_iovs, global_variables):
383  """
384  Merge together global states to decide a final code
385 
386  If the dead fraction is unavailable, writes -1.
387  """
388  result_iovs = IOVSet()
389  if self.run_iovs is not None:
390  # run_iovs are used to constrain to what runs the calculator will
391  # write. If there is a hole in `run_iovs`, then no records are emitted.
392  state_ranges = process_iovs(self.run_iovs, dead_frac_iovs, *global_variables)
393  else:
394  state_ranges = process_iovs(dead_frac_iovs, *global_variables)
395 
396  for since, until, states in state_ranges:
397  if self.run_iovs:
398  # No run_iovs were specified, so run for all available input data
399  run_iov, dead_frac_iov = states[:2]
400 
401  if run_iov._is_empty:
402  # We're outside of a run, don't write an IoV.
403  continue
404 
405  states = states[1:]
406  else:
407  dead_frac_iov = states[0]
408 
409  if not dead_frac_iov._is_empty:
410  dead_fraction, thrust, n_config, n_working = dead_frac_iov[4:]
411  else:
412  dead_fraction, thrust, n_config, n_working = -1., 0., -1, -1
413  states = states[1:]
414 
415  code = self.dq_worst(states)
416  state = dead_fraction, thrust, n_config, n_working
417 
418  if code is WHITE:
419  # Don't write empty regions
420  continue
421 
422  result_iovs.add(since, until, output_channel, code, *state)
423 
424  return result_iovs.solidify(DCSOFL_IOV)
425 

◆ merge_input_information()

def python.subdetector.DCSC_Subdetector.merge_input_information (   self,
  channel,
inputs 
)
Join up the information which was used to make a decision across 
multiple variables.

Definition at line 137 of file subdetector.py.

137  def merge_input_information(self, channel, *inputs):
138  """
139  Join up the information which was used to make a decision across
140  multiple variables.
141  """
142  result = IOVSet()
143  for since, until, states in process_iovs(*inputs):
144  info = tuple(state._orig_iov[3:] for state in states)
145  result.add(since, until, channel, info)
146 
147  return result.solidify(GoodIOV)
148 

◆ merge_input_variables()

def python.subdetector.DCSC_Subdetector.merge_input_variables (   self,
  inputs 
)
Merge multiple variables together for many channels.
Takes a list of IOVSets, one for each DCSC_Variable.

Definition at line 150 of file subdetector.py.

150  def merge_input_variables(self, inputs):
151  """
152  Merge multiple variables together for many channels.
153  Takes a list of IOVSets, one for each DCSC_Variable.
154  """
155 
156  result = []
157  info_states = IOVSet(iov_type=GoodIOV)
158 
159  # Reassign inputs to be a list of dictionaries with
160  # Key=channel_id and Val=IOVSet
161  inputs = [iovs.by_channel for iovs in inputs]
162 
163  # set of channel ids
164  all_channels = sorted(set(y for x in inputs for y in x.keys()))
165 
166  tally_system_states = config.opts.tally_system_states
167 
168  for channel in all_channels:
169 
170  # Handle one channel at a time for variable merging
171  c_inputs = [x[channel] for x in inputs]
172 
173  # Merge "good" state across multiple variables
174  result.append(self.merge_inputs(channel, *c_inputs))
175 
176  if tally_system_states:
177  # Merge Input information across multiple variables
178  info_state = self.merge_input_information(channel, *c_inputs)
179  info_states.extend(info_state)
180 
181 
182  if tally_system_states:
183  # Print a tally of the states for the different systems
184  from DQUtils.ext import tally
185  def pretty(state):
186  return "/".join(x[0] for x in state)
187 
188  chans, iovs = zip(*sorted(six.iteritems(info_states.by_channel)))
189  for since, until, states in process_iovs(self.run_iovs, *iovs):
190  if states[0]._is_empty:
191  # Not inside a run
192  continue
193 
194  statetally = tally(pretty(x.good) for x in states[1:])
195 
196  print(since, until, statetally)
197 
198  return result
199 

◆ merge_inputs()

def python.subdetector.DCSC_Subdetector.merge_inputs (   self,
  channel,
inputs 
)
Merge multiple variables together for one input channel.
Each 'inputs' arg is an IOVSet that corresponds to this input channel.

Definition at line 121 of file subdetector.py.

121  def merge_inputs(self, channel, *inputs):
122  """
123  Merge multiple variables together for one input channel.
124  Each 'inputs' arg is an IOVSet that corresponds to this input channel.
125  """
126  # inputs must correspond to and be in sync with subdetector.variables...?
127 
128  result = IOVSet()
129  # combine the IOVSets into smallest chunks using process_iovs
130  for since, until, states in process_iovs(*inputs):
131  # Get the worst state for the list of vectors
132  state = self.merge_variable_states(states)
133  result.add(since, until, channel, state)
134 
135  return result.solidify(GoodIOV)
136 

◆ merge_variable_states()

def python.subdetector.DCSC_Subdetector.merge_variable_states (   self,
  states 
)
Merge input channel states across variables, taking the worst.

For detector configuration variables, it is assumed that if no IoV 
exists for that channel in this variable, then it is in a good state.

Definition at line 83 of file subdetector.py.

83  def merge_variable_states(self, states):
84  """
85  Merge input channel states across variables, taking the worst.
86 
87  For detector configuration variables, it is assumed that if no IoV
88  exists for that channel in this variable, then it is in a good state.
89  """
90 
91  # Start off with a good result.
92  result = True
93 
94  # This assumes that the states array is in sync with the variables array..
95  # Maybe I could add an assert statement here.
96  # WOA! That's not cool! TODO: MAKE THIS BETTER
97  # I don't think it has broken anything before but depending on how the variables
98  # are defined in a subdetector I think this could be very bad!!!
99 
100  # loop over states
101  for state, variable in zip(states, self.variables):
102  state = state.good if state else None
103  if state == OUT_OF_CONFIG:
104  assert variable.is_config_variable, "OOC without is_config_variable!"
105  # If any state is out of config, we know the result.
106  return state
107 
108  elif state is None or state < result:
109  if state is WHITE and variable.is_config_variable:
110  # Empty config variables are equivalent to "GOOD", so these
111  # states should be skipped.
112  continue
113  result = state
114 
115  # More simplistic way of doing the above, but can't handle config vars:
116  # return min(None if not state else state.good for state in states)
117 
118  return result
119 
120 

◆ run()

def python.subdetector.DCSC_Subdetector.run (   self,
  lbtime,
  run_iovs = None 
)
Run the DCSC for this subdetector.

* Evaluate inputs
* Merge input variables together
* Calculate resulting IoVs to be written

Reimplemented in python.subdetector.DCSC_DefectTranslate_Subdetector, and python.subdetector.DCSC_Subdetector_DefectsOnly.

Definition at line 480 of file subdetector.py.

480  def run(self, lbtime, run_iovs=None):
481  """
482  Run the DCSC for this subdetector.
483 
484  * Evaluate inputs
485  * Merge input variables together
486  * Calculate resulting IoVs to be written
487  """
488 
489  self.run_iovs = run_iovs
490 
491  self.start()
492 
493  # evaluate_inputs will calculate the goodness of all channels
494  # for each variable, remapping channel ids if necessary.
495  # this 'variables' object is the same as self.variables
496  # -> hold this thought, I'm not sure this is correct
497  variables = self.evaluate_inputs(lbtime)
498 
499  # separate variables into global and local.
500  # They are lists of IOVSets
501  # Each element of the list corresponds to a DCSC_Variable
502  local_variables = [v.iovs for v in variables if not v.is_global]
503  global_variables = [v.iovs for v in variables if v.is_global]
504 
505  # Merge IOVSets into a list with one IOVSet per channel
506  input_channel_states = self.merge_input_variables(local_variables)
507 
508  # We only have merged input_channel_states if there are local variables
509  if input_channel_states:
510  inputs_by_output = self.map_inputs_to_outputs(input_channel_states)
511 
512  else:
513  # If there are no locals, we need an empty locals list per output
514  inputs_by_output = dict((cid, []) for cid in self.mapping.keys())
515 
516  # Calculate the final output IOVs
517  result_iovs = self.calculate_result(inputs_by_output, global_variables)
518 
519  self.done()
520 
521  return result_iovs
522 

◆ select_globals()

def python.subdetector.DCSC_Subdetector.select_globals (   self,
  output_channel,
  input_globals 
)
Returns a list where each element is a list of (single channel) iovs.

The `input_globals` may contain a list of iovs which has multiple 
channels. This function may be over-ridden by inheriting classes to 
select channels for this output channel.

Reimplemented in python.subdetectors.lar.LAr.

Definition at line 449 of file subdetector.py.

449  def select_globals(self, output_channel, input_globals):
450  """
451  Returns a list where each element is a list of (single channel) iovs.
452 
453  The `input_globals` may contain a list of iovs which has multiple
454  channels. This function may be over-ridden by inheriting classes to
455  select channels for this output channel.
456  """
457  global_iov_sets = []
458  for input_global in input_globals:
459  for channel, iovs in sorted(six.iteritems(input_global.by_channel)):
460  global_iov_sets.append(iovs)
461 
462  return global_iov_sets
463 

◆ set_input_mapping()

def python.subdetector.DCSC_Subdetector.set_input_mapping (   self,
  what,
  mapping 
)
Set mapping of input channels for a DCSC_Variable_With_Mapping.
Some input folders have different channel numbering conventions.

Definition at line 52 of file subdetector.py.

52  def set_input_mapping(self, what, mapping):
53  """
54  Set mapping of input channels for a DCSC_Variable_With_Mapping.
55  Some input folders have different channel numbering conventions.
56  """
57  variable = self.get_variable(what)
58  # Mapping only makes sense for DCSC_Variable_With_Mapping
59  if not isinstance(variable, DCSC_Variable_With_Mapping):
60  raise RuntimeError("'%s' is not a DCSC_Variable_With_Mapping!")
61 
62  variable.input_channel_map = mapping
63 

◆ start()

def python.subdetector.DCSC_Subdetector.start (   self)

Definition at line 523 of file subdetector.py.

523  def start(self):
524  "Empty function called at start"
525 

Member Data Documentation

◆ channel_indices

python.subdetector.DCSC_Subdetector.channel_indices
Determine which input channels belong to which output channels.
inputs is a list of IOVSets, exactly one per channel.

Definition at line 211 of file subdetector.py.

◆ input_to_output_map

python.subdetector.DCSC_Subdetector.input_to_output_map

Definition at line 37 of file subdetector.py.

◆ run_iovs

python.subdetector.DCSC_Subdetector.run_iovs
Run the DCSC for this subdetector.

* Evaluate inputs
* Merge input variables together
* Calculate resulting IoVs to be written

Definition at line 489 of file subdetector.py.


The documentation for this class was generated from the following file:
dq_defect_compare_tags.pretty
def pretty(defects)
Definition: dq_defect_compare_tags.py:57
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
python.subdetector.DCSOFL_IOV
def DCSOFL_IOV(channel, Code, deadFrac, Thrust, NConfig, NWorking)
Definition: subdetector.py:19
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
python.Bindings.values
values
Definition: Control/AthenaPython/python/Bindings.py:797
python.ext.tally
def tally(stuff)
Definition: DataQuality/DQUtils/python/ext/__init__.py:4
python.events.process_iovs
def process_iovs(*iovsets)
Definition: events.py:30
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:224
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.subdetector.logEnabledFor
logEnabledFor
Definition: subdetector.py:15
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790