#!/usr/bin/env perl

use strict;
use warnings;
use Getopt::Long;
use Pod::Usage;

use PS::MOPS::DET::dbclient;

# Options.
my $instance_name;
my $input_filename;
my $debug;
my $help;

# Start program here.
GetOptions(
    'instance=s' => \$instance_name,
	'input=s' => \$input_filename,
    debug => \$debug,
    help => \$help,
) or pod2usage(2);                      # opts parse error
pod2usage(-verbose => 3) if $help;      # user asked for help
pod2usage(2) unless $instance_name;
pod2usage(2) unless $input_filename;

PS::MOPS::DET::dbclient::insert($instance_name, $input_filename);

__END__

=head1 NAME

detDBInsert - Program to insert false detections into synthetic fields

=head1 SYNOPSIS

detDBInsert --instance INSTANCE_NAME --input INPUT_FILENAME [options] [--help]

  --instance : instance name
  --input : input filename
  --help : show man page

=head1 DESCRIPTION

detDBInsert is currently the primary method of inserting synthetic
and false detections from the MOPS SSM into the detections DC.

=cut
