From: hadaq Date: Mon, 27 Sep 2010 17:03:40 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=e6ef520242618b2b6d3c864c206e94e1349d59c5;p=daqdata.git *** empty log message *** --- diff --git a/disks/data2tape.pl b/disks/data2tape.pl index 90a5136..61f7638 100755 --- a/disks/data2tape.pl +++ b/disks/data2tape.pl @@ -24,6 +24,11 @@ GetOptions ('h|help' => \$opt_help, 'p|prefix=s' => \@prefix_list, 'a|arch' => \$opt_arch); +if( $opt_help ) { + &help(); + exit(0); +} + if(-1 == &checkArgs()){ exit(0); } @@ -39,6 +44,32 @@ exit(0); ########################### END OF MAIN ############################ +sub help() +{ + print "\n"; + print << 'EOF'; +date2tape.pl + +This script archives the data if the data were not archived during +data taking automatically via RFIO. + +Usage: + + Command line: date2tape.pl + [-h|--help] : Show this help. + [-s|--start ] : Beginning of time interval. + [-t|--end ] : End of time interval. + [-p|--prefix ] : Archive only these prefixes. + [-a|--arch] : Archiving is done only with this option enabled. + +Examples: + + Archive all hld files with prefixes 'st' and 'be' from sept 4th, 2010: + date2tape.pl -p be -p st -s 2010-09-04_00:00:00 -e 2010-09-04_23:59:59 -a + +EOF +} + sub checkArgs() { my $retval = 0;