SLIC's autoname feature can automatically name the output LCIO files using event metadata, such as the type of event or the simulator version. To activate autonaming, use the -O switch from the command line or the /lcio/autoname macro command.

This is an example of using the autoname feature from the command line.

slic -g ./MyDetector.lcdd -O -r 1

The output log shows that the file has been automatically named using the type of input event, the particle gun energy, and the name of the detector.

>>>> BeginRun <0>
Autoname set file name to <mu-_5GeV_SLIC_v2r0p7_MyDetectorName>
Creating new Lcio file <mu-_5GeV_SLIC_v2r0p7_MyDetectorName.slcio>

The autoname feature can be turned on at any time during an interactive session or in a run macro.

/lcio/autoname

The autoname command accepts an optional string containing an ordered list of fields, each of which specifies a chunk of the name. Use the built-in Geant4 help system to see which fields are available.

Idle> help /lcio/autoname

Command /lcio/autoname
Guidance :
Set autonaming parameters.
Valid autoname fields: application version geometry event eventNumber run binary physics date

Parameter : autoname
 Parameter type  : s
 Omittable       : True

Here is a description of each of the fields.

field

description

example

application

name of application

SLIC

version

SLIC's version string

v2r0p7

geometry

geometry tag from the LCDD header

MyDetectorName

event

description of the particle or name of StdHep file

mu-, pythia-ttbar

eventNumber

number of events from beamOn command

1

run

run number

1

binary

name of the slic binary

slic

physics

physics list

LCPhys

date

current date in format YYYY-MM-DD

2007-01-03

To customize the fields and their order, list the fields in order using the macro command.

/lcio/autoname application version geometry event eventNumber run binary physics date 

This results in an output file with a name like this.

SLIC_v2r0p7_MyDetectorName_mu-_5GeV_1_0_slic_LCPhys_2007-01-03.slcio

Alternately, list the fields as an argument to the -O switch. This string must be quoted.

slic -g MyDetector.lcdd -O "application version geometry event eventNumber run binary physics date" -r 1
  • No labels