Download presentation
Presentation is loading. Please wait.
1
org.lcsim Recon XML Framework
Jeremy McCormick, SLAC
2
Purpose provide XML frontend to org.lcsim that is Marlin-like
replace various ways of feeding reconstruction/analysis parameters to Drivers (.ini files, xml files, etc.) run control or steering of org.lcsim jobs
3
Non-working Example <lcsim> <inputFiles>
<file>/path/to/local/event.slcio</file> <fileUrl>ftp:// </inputFiles> <control> <logFile>/path/to/my/output.log</logFile> <numberOfEvents>1000</numberOfEvents> <verbose>true</verbose> <fileCache>/my/local/cache/dir</fileCache> </control> <execute> <driver name=“MyDriver” type=“org.lcsim.MyDriver”/> </execute> <drivers> <driver name=“MyDriver” type=“org.lcsim.MyDriver”> <specialSecretCodeWord>frobnoz</specialSecretCodeWord> <specialSecretNumber>42</specialSecretNumber> </driver> </drivers> </lcsim>
4
Defining a Driver must have class extending Driver in org.lcsim code (or some other project) if defined in another project, must use <classpath> (see “Class Path” section) name can be anything as long as it is unique type is a fully qualified class extending Driver class MyDriver extends Driver {…} <execute> <driver name=“MyDriver”/> </execute> <drivers> <driver name=“MyDriver” type=“org.lcsim.MyDriver”/> </drivers>
5
Parameters Support defined within <driver> in the <drivers> section Java primitives int, double, long, boolean String 2d arrays some basic types Hep3Vector requires a set method with a single parameter (see next slide) todo: add global parameters not associated to single Driver
6
Defining Parameters define a setter method in your Driver:
class MyDriver extends { public void setMyVariable(int mv); } automatically creates a variable myVariable in the xml <driver …> <myVariable>1234</myVariable> </driver> naming: setMyVariable -> MyVariable -> myVariable first letter is always lower case! (javabeans)
7
Running from the Command Line
new org.lcsim command line script build with maven 2: mvn install ./bin/lcsim mySteeringFile.xml this script is just: java -cp [very long classpath] org.lcsim.job.JobControlManager
8
Running from within Java
JobControlManager mgr = new JobControlManager(); mgr.setup(“/path/to/my/steering.xml”); mgr.run();
9
Job Execution Order defind in <execute> section
references the <drivers> section so nothing is defined here ordering is respected! (obviously) make sure that you don’t accidently comment out a driver here and then forget to put it back <execute> <driver name=“MyDriver”/> </execute> <drivers> <driver name=“MyDriver” type=“org.lcsim.ExampleDriver”/>
10
Input Files defined in <inputFiles> block
file on local file system <file>/path/to/myEvents.slcio</file> file at URL <fileUrl> unlimited number of files can be run in same job currently accepts only total number of events to be run (LCSim.loop(numberOfEvents))
11
All Job Control Parameters
<logFile>./seedtrackerStrategyBuilder.log</logFile> <cacheDirectory>.</cacheDirectory> <numberOfEvents>-1</numberOfEvents> <verbose>true</verbose> <printDriverStatistics>true</printDriverStatistics> <printSystemProperties>true</printSystemProperties> <printUserClassPath>true</printUserClassPath> <printDriversDetailed>true</printDriversDetailed> </control>
12
Job Control Parameters
defined in <control> section parameters that control job execution numberOfEvents - passed to LCSimLoop logFile - log file on local file system verbose - turn on verbose job control output printDetailedDriverInformation - prints name/type of driver and parameter values as they are processed printSystemProperties - prints all properties defined in System.getProperties() printInputFiles - prints input file locations/URLs as they are processed
13
Modifying the Class Path
use to add dependencies external to lcsim that contain Drivers <classpath> <jar>/path/to/local/mylib.jar</jar> <jarUrl> </classpath> </drivers>
14
Actual Example <lcsim> <inputFiles>
<file>./muons10_Theta4-176_1-10GeV_SLIC-v2r3p10_geant4-v9r0p1_LCPhys_sid01.slcio</file> </inputFiles> <control> <logFile>./seedtrackerStrategyBuilder.log</logFile> <cacheDirectory>.</cacheDirectory> <numberOfEvents>-1</numberOfEvents> <verbose>true</verbose> </control> <execute> <driver name="StrategyBuilder"/> </execute> <drivers> <driver name="StrategyBuilder" type="org.lcsim.recon.tracking.seedtracker.strategybuilder.StrategyBuilder"> <output>./seedtrackerStrategyBuilderTest.xml</output> </driver> </drivers> </lcsim>
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.