#!/usr/bin/env perl
#
# DS comment: yes, this is a horribly ugly and long perl script... please don't look at it :-)
# if you do: first we have some global counters and constants, and then two main functions for I/O (readLogs & writeOutput)
# - and two help functions to get the info for capacitors corrections,  
#   and a conversion between voltage and current for the OpAmp's
#
use strict;
use File::stat;
use Time::localtime;

my $debug = 1; #print flag: 0=quiet, 1=basic info, 2,3=progressively more info

# constants to switch on/off methods and checks
my $useGainRT = 0; # 1=>gainRT, otherwise gain(Odd/Even) info
my $checkVRefErr = 0; # select !=1 to skip VRefErr check
my $checkDFTErr = 1; # select !=1 to skip DFTErr check

# I/0 variables
my $chipQRdatabasefile = "/home/tpc/work/database/chipQR.txt";
my $topdir = "../logs"; # where to store summary info


my $script = "checklog.pl"; 
if (-l $script) {
#    print "script $script is a symbolic link\n";
    my $scriptname = readlink($script);
    $script = $scriptname;
}
my $date_string = ctime(stat($script)->mtime);
my $outputstring ="CHK $script $date_string\n";
print "outputstring $outputstring"
