All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
SubmitCommand.pl File Reference

Go to the source code of this file.

Functions

use File::Basename qw (fileparse)
 
use Cwd qw (abs_path)
 
 my ($xml, $fcl, $workdir, $check, $merge)
 
 if (!(defined($xml)||defined($fcl)||defined($workdir)))
 
 if (!(-e"${workdir}/buildopticallibrary"))
 
 if (!(-e"${workdir}/buildopticallibrary/xml"))
 
 if (!(-e"${workdir}/buildopticallibrary)/fcl"))
 
 for (my $i=$StartJob;$i<$StartJob+$NJobs;$i++)
 

Variables

use strict
 
use warnings
 
my $NPhotonsPerVoxel = 30000
 
my $NVoxelsPerJob = 240
 
my $NJobs = 9375
 
my $StartJob = 0
 

Function Documentation

for ( )

Definition at line 37 of file SubmitCommand.pl.

37  {
38 
39  my ($fcl_filename, $fcl_directories, $fcl_suffix) = fileparse($fcl,".fcl");
40  my ($xml_filename, $xml_directories, $xml_suffix) = fileparse($xml,".xml");
41 
42  if(!(-e "${workdir}/buildopticallibrary/fcl/${fcl_filename}_${i}${fcl_suffix}")) {
43 
44  open IN, "${fcl}" or die $!;
45  open OUT, ">${workdir}/buildopticallibrary/fcl/${fcl_filename}_${i}${fcl_suffix}" or die $!;
46 
47  while(<IN>) {
48  if(/physics.producers.generator.FirstVoxel/) {
49  print OUT "physics.producers.generator.FirstVoxel: " . $NVoxelsPerJob*$i . "\n";
50  }
51  elsif(/physics.producers.generator.LastVoxel/) {
52  print OUT "physics.producers.generator.LastVoxel: " . ($NVoxelsPerJob*($i+1)-1) . "\n";
53  }
54  elsif(/physics.producers.generator.N/) {
55  print OUT "physics.producers.generator.N: ${NPhotonsPerVoxel}\n";
56  }
57  else {
58  print OUT "$_";
59  }
60  }
61  close IN or die $!;
62  close OUT or die $!;
63  }
64 
65  if(!(-e ">${workdir}/buildopticallibrary/xml/${xml_filename}_${i}${xml_suffix}")) {
66 
67  open IN, "${xml}" or die $!;
68  open OUT, ">${workdir}/buildopticallibrary/xml/${xml_filename}_${i}${xml_suffix}" or die $!;
69 
70  while(<IN>) {
71  if(/ENTITY name/) {
72  print OUT '<!ENTITY name "gen_photon_ball_' . $i . '">' . "\n";
73  }
74  elsif(/\<fcl\>(.*)\<\/fcl\>/) {
75  print OUT " <fcl>" . abs_path(${workdir}) . "\/buildopticallibrary\/fcl\/${fcl_filename}_${i}${fcl_suffix}<\/fcl>\n";
76  }
77  else {
78  print OUT "$_";
79  }
80  }
81 
82  close IN or die $!;
83  close OUT or die $!;
84  }
85 
86  if(!defined($check)) {
87  if(!defined($merge)) {
88  system qq|project.py --xml ${workdir}/buildopticallibrary/xml/${xml_filename}_${i}${xml_suffix} --submit|;
89  sleep 1;
90  } else {
91  system qq|project.py --xml ${workdir}/buildopticallibrary/xml/${xml_filename}_${i}${xml_suffix} --merge|;
92  }
93  } else {
94  system qq|project.py --xml ${workdir}/buildopticallibrary/xml/${xml_filename}_${i}${xml_suffix} --checkana|;
95  }
96 
97 }
process_name standard_reco_uboone fcl
process_name can override from command line with o or output proton mvapid_weights muon_all_BDT weights xml
Definition: runPID.fcl:28
process_name drop raw::OpDetWaveforms_DataApr2016RecoStage1_saturation_ * physics
do one_file $F done echo for F in find $TOP name CMakeLists txt print
my($xml, $fcl, $workdir, $check, $merge)
then echo echo For and will not be changed by echo further linking echo echo B echo The symbol is in the uninitialized data multiple common symbols may appear with the echo same name If the symbol is defined the common echo symbols are treated as undefined references For more echo details on common see the discussion of warn common echo in *Note Linker see the discussion of warn common echo in *Note Linker such as a global int variable echo as opposed to a large global array echo echo I echo The symbol is an indirect reference to another symbol This echo is a GNU extension to the a out object file format which is echo rarely used echo echo N echo The symbol is a debugging symbol echo echo R echo The symbol is in a read only data section echo echo S echo The symbol is in an uninitialized data section for small echo objects echo echo T echo The symbol is in the the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not defined
my $NVoxelsPerJob
do i e
do echo $i
Definition: TrainMVA.sh:30
then echo fcl name
print OUTPUT<< EOF;< setup name="Default"version="1.0">< worldref="volWorld"/></setup ></gdml > EOF close(OUTPUT)
open(RACETRACK) or die("Could not open file $RACETRACK for writing")
if ( defined($xml)||defined($fcl)||defined($workdir))

Definition at line 15 of file SubmitCommand.pl.

15  {
16  print "Usage: perl SubmitCommand.pl <project.py xml file> <fcl file> <work dir> [<checkana?>] [<merge?>]\n";
17  exit(1);
18 }
do one_file $F done echo for F in find $TOP name CMakeLists txt print
if ( -e"${workdir}/buildopticallibrary")

Definition at line 20 of file SubmitCommand.pl.

20  {workdir}/buildopticallibrary")) {
21  mkdir "${workdir}/buildopticallibrary", 0775;
22 }
if ( -e"${workdir}/buildopticallibrary/xml")

Definition at line 24 of file SubmitCommand.pl.

24  {workdir}/buildopticallibrary/xml")) {
25  mkdir "${workdir}/buildopticallibrary/xml", 0775;
26 }
process_name can override from command line with o or output proton mvapid_weights muon_all_BDT weights xml
Definition: runPID.fcl:28
if ( !(-e"${workdir}/buildopticallibrary)/fcl )

Definition at line 28 of file SubmitCommand.pl.

28  {workdir}/buildopticallibrary)/fcl")) {
29  mkdir "${workdir}/buildopticallibrary/fcl", 0775;
30 }
process_name standard_reco_uboone fcl
my (   $xml,
  $fcl,
  $workdir,
  $check,
  $merge 
)
use File::Basename qw ( fileparse  )
use Cwd qw ( abs_path  )

Variable Documentation

my $NJobs = 9375

Definition at line 34 of file SubmitCommand.pl.

my $NPhotonsPerVoxel = 30000

Definition at line 32 of file SubmitCommand.pl.

my $NVoxelsPerJob = 240

Definition at line 33 of file SubmitCommand.pl.

my $StartJob = 0

Definition at line 35 of file SubmitCommand.pl.

use strict

Definition at line 8 of file SubmitCommand.pl.

use warnings

Definition at line 9 of file SubmitCommand.pl.