Check if all counts are zero.
input_file can have multiple comma-separated values
Definition at line 574 of file CheckSteps.py.
◆ __init__()
def python.TrigValSteering.CheckSteps.ZeroCountsStep.__init__ |
( |
|
self, |
|
|
|
name = 'ZeroCounts' |
|
) |
| |
Definition at line 580 of file CheckSteps.py.
580 def __init__(self, name='ZeroCounts'):
581 super(ZeroCountsStep, self).
__init__(name)
582 self.input_file =
'HLTChain.txt,HLTTE.txt,L1AV.txt'
583 self.auto_report_result =
True
585 self.__input_files__ =
None
◆ check_zero_counts()
def python.TrigValSteering.CheckSteps.ZeroCountsStep.check_zero_counts |
( |
|
self, |
|
|
|
input_file |
|
) |
| |
Definition at line 590 of file CheckSteps.py.
590 def check_zero_counts(self, input_file):
591 if not os.path.isfile(input_file):
593 'Skipping %s for %s because the file does not exist',
594 self.name, input_file)
597 with open(input_file, encoding=
'utf-8')
as f_in:
598 for line
in f_in.readlines():
599 split_line = line.split()
601 if int(split_line[-1]) != 0:
603 if lines_checked == 0:
604 self.log.
error(
'Failed to read counts from %s', input_file)
◆ configure()
def python.TrigValSteering.CheckSteps.ZeroCountsStep.configure |
( |
|
self, |
|
|
|
test = None |
|
) |
| |
◆ run()
def python.TrigValSteering.CheckSteps.ZeroCountsStep.run |
( |
|
self, |
|
|
|
dry_run = False |
|
) |
| |
Definition at line 607 of file CheckSteps.py.
607 def run(self, dry_run=False):
609 for input_file
in self.__input_files__:
610 results.append(self.check_zero_counts(input_file))
612 self.result =
max(results)
613 cmd =
'# (internal) {} for {}'.
format(self.name, self.__input_files__)
615 cmd =
'# (internal) {} -> skipped'.
format(self.name)
617 return self.result, cmd
618 self.log.
info(
'Running %s step', self.name)
619 if self.auto_report_result:
621 return self.result, cmd
◆ __input_files__
python.TrigValSteering.CheckSteps.ZeroCountsStep.__input_files__ |
|
private |
◆ auto_report_result
python.TrigValSteering.CheckSteps.ZeroCountsStep.auto_report_result |
◆ input_file
python.TrigValSteering.CheckSteps.ZeroCountsStep.input_file |
◆ required
python.TrigValSteering.CheckSteps.ZeroCountsStep.required |
◆ result
python.TrigValSteering.CheckSteps.ZeroCountsStep.result |
The documentation for this class was generated from the following file:
bool configure(asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool > &tool, ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > &electronEffToolsHandles, ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > &electronSFToolsHandles, ToolHandleArray< CP::IMuonTriggerScaleFactors > &muonToolsHandles, ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > &photonEffToolsHandles, ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > &photonSFToolsHandles, const std::string &triggers, const std::map< std::string, std::string > &legsPerTool, unsigned long nToys, bool debug)