Working with a Sample Driver
Drivers are for processing events one-by-one and doing some work on the data. This may include performing some physics analysis or creating plots. A driver can contain additional, "child" drivers, so the complexity of the processing algorithm can be segmented into several different logical functions.
If you want to load Drivers that are in packages, you have to choose
File->Load and specify the full path of the program. So, if your Driver
MyDriver contains a statement like
then you have to
Opening the LCIO File
Start JAS3 and open the file from the LCSim Event Browser Tutorial using the File -> Open command. If (and only if) you have both the LCIO and the org.lcsim plugin installed, you will be asked which one to use. In this case select the org.lcsim plugin.
If you now see the record loop commands and the name of the file displayed in the record source drop-down box, the file is loaded OK.
Opening the Sample Driver
Open a sample driver by going to Help -> Examples and navigating to org.lcsim Examples. Click on Analysis101.java to load the sample driver in a new window.
To compile the sample Driver into code that will be executed when given events from the LCIO record, right-click on the window and click Compile.
You should see a message similar to the following.
This indicates that the code was successfully compiled into a binary class file.
To load the Driver so that it will process events, select Load from the right-click menu.
Subsequent compiles of this file will cause the Driver to be automatically reloaded.
The Go button processes all events until the end of the file
The Go 1 button processes only the next event
To process some events using the loaded Driver, click on the Go button on the toolbar or press F5. This will run the Driver's process method over all the records in the LCIO file.
Once the processing is completed, expand all the folders on the JASTree menu.
You should then have something similar to this.
JASTree after Processing
This particular example produces some histograms, which should be shown in the JASTree menu.
Try selecting the nTracks plot by double-clicking on its icon in the JASTree. The plot will be displayed in a new window.
View any other plot by double-clicking its icon in a similar fashion.
You can save the current plot from the file menu (via Save As) and you can save the whole tree by right-clicking on the folder (aida4286aida in this example) and selecting "Save As".