5 # Short script to submit optical library generation with
10 use File::Basename
qw(fileparse);
13 my ($xml, $fcl, $workdir, $check, $merge) = @ARGV;
16 print "Usage: perl SubmitCommand.pl <project.py xml file> <fcl file> <work dir> [<checkana?>] [<merge?>]\n";
20 if(!(-
e "${workdir}/buildopticallibrary")) {
21 mkdir "${workdir}/buildopticallibrary", 0775;
24 if(!(-
e "${workdir}/buildopticallibrary/xml")) {
25 mkdir "${workdir}/buildopticallibrary/xml", 0775;
28 if(!(-
e "${workdir}/buildopticallibrary)/fcl")) {
29 mkdir "${workdir}/buildopticallibrary/fcl", 0775;
39 my ($fcl_filename, $fcl_directories, $fcl_suffix) = fileparse($fcl,
".fcl");
40 my ($xml_filename, $xml_directories, $xml_suffix) = fileparse($xml,
".xml");
42 if(!(-
e "${workdir}/buildopticallibrary/fcl/${fcl_filename}_${i}${fcl_suffix}")) {
44 open IN,
"${fcl}" or die $!;
45 open OUT,
">${workdir}/buildopticallibrary/fcl/${fcl_filename}_${i}${fcl_suffix}" or die $!;
48 if(/
physics.producers.generator.FirstVoxel/) {
49 print OUT
"physics.producers.generator.FirstVoxel: " . $NVoxelsPerJob*
$i .
"\n";
51 elsif(/
physics.producers.generator.LastVoxel/) {
52 print OUT
"physics.producers.generator.LastVoxel: " . ($NVoxelsPerJob*(
$i+1)-1) .
"\n";
54 elsif(/
physics.producers.generator.N/) {
55 print OUT
"physics.producers.generator.N: ${NPhotonsPerVoxel}\n";
65 if(!(-
e ">${workdir}/buildopticallibrary/xml/${xml_filename}_${i}${xml_suffix}")) {
67 open IN,
"${xml}" or die $!;
68 open OUT,
">${workdir}/buildopticallibrary/xml/${xml_filename}_${i}${xml_suffix}" or die $!;
72 print OUT
'<!ENTITY name "gen_photon_ball_' .
$i .
'">' .
"\n";
74 elsif(/\<
fcl\>(.*)\<\/
fcl\>/) {
75 print OUT
" <fcl>" . abs_path(${workdir}) .
"\/buildopticallibrary\/fcl\/${fcl_filename}_${i}${fcl_suffix}<\/fcl>\n";
88 system qq|project.py --
xml ${workdir}/buildopticallibrary/
xml/${xml_filename}_${i}${xml_suffix} --submit|;
91 system qq|project.py --
xml ${workdir}/buildopticallibrary/
xml/${xml_filename}_${i}${xml_suffix} --merge|;
94 system qq|project.py --
xml ${workdir}/buildopticallibrary/
xml/${xml_filename}_${i}${xml_suffix} --checkana|;
process_name standard_reco_uboone fcl
use File::Basename qw(fileparse)
process_name can override from command line with o or output proton mvapid_weights muon_all_BDT weights xml
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
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")