Copy the last N lines of a log file into a separate file
Definition at line 411 of file CheckSteps.py.
◆ __init__()
| python.TrigValSteering.CheckSteps.TailStep.__init__ |
( |
| self, |
|
|
| name = 'Tail' ) |
Definition at line 414 of file CheckSteps.py.
414 def __init__(self, name='Tail'):
415 super(TailStep, self).__init__(name)
416 self.log_file = 'athena.log'
417 self.output_name = None
418 self.executable = 'tail'
419 self.num_lines = 5000
420 self.output_stream = Step.OutputStream.STDOUT_ONLY
421
◆ configure()
| python.TrigValSteering.CheckSteps.TailStep.configure |
( |
| self, |
|
|
| test ) |
Definition at line 422 of file CheckSteps.py.
423 if self.output_name is None:
424 split = os.path.splitext(self.log_file)
425 self.output_name = split[0]+'.tail'
426 if len(split) > 1:
427 self.output_name += split[1]
428 self.args += ' -n {:d}'.format(self.num_lines)
429 self.args += ' '+self.log_file
430 self.args += ' >'+self.output_name
432
433
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)
◆ executable
| str python.TrigValSteering.CheckSteps.TailStep.executable = 'tail' |
◆ log_file
| str python.TrigValSteering.CheckSteps.TailStep.log_file = 'athena.log' |
◆ num_lines
| int python.TrigValSteering.CheckSteps.TailStep.num_lines = 5000 |
◆ output_name
| str python.TrigValSteering.CheckSteps.TailStep.output_name = None |
◆ output_stream
| python.TrigValSteering.CheckSteps.TailStep.output_stream = Step.OutputStream.STDOUT_ONLY |
The documentation for this class was generated from the following file: