Class: ExeCppLogReader

Inherits:
CommandLine_Exe show all
Defined in:
lib/exe_cpplogreader.rb

Instance Attribute Summary

Attributes inherited from CommandLine_Exe

#exe_path

Instance Method Summary collapse

Methods inherited from CommandLine_Exe

#executable_path

Methods included from Utilities

which

Constructor Details

#initialize(batch_folderpath, sample_index, analyte_name, chromatogram_type, *params) ⇒ ExeCppLogReader

Returns a new instance of ExeCppLogReader.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/exe_cpplogreader.rb', line 6

def initialize(batch_folderpath,sample_index,analyte_name,chromatogram_type, *params)

  @batch_folderpath = batch_folderpath
  @sample_index = sample_index
  @analyte_name = analyte_name

  @chromatogram_type =
    case chromatogram_type.downcase
      when 'quantifier','a','quant'
        'Quant'
      when 'qualifier','q','qual'
        'Qual'
      when 'internal standard', 'internalstandard','is'
        'IS'
      else
        chromatogram_type
    end

  super('CppLogReader.py',*params)

end

Instance Method Details

#runObject



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/exe_cpplogreader.rb', line 28

def run
  retcode,rundetails = super(cmd)

  if retcode
    rundetails[:stdout] = JSON.parse(rundetails[:stdout])
  else
    errmsg = "#(rundetails[:cmd]} - #{rundetails[:stdout]}"
    puts errmsg
    $log_detercomp.error errmsg
  end

  return retcode,rundetails
end