SLIC's autoname feature can automatically name the output LCIO files using event metadata, such as the type of event or the simular 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.

{noformat}
slic -g ./MyDetector.lcdd -O -r 1
{noformat}

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.

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

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

{noformat}
/lcio/autoname
{noformat}

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.

{noformat}
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
{noformat}

Here is a description of each of the fields.

||field||description||example||
|application|name of application|SLIC|
|version|SLIC's version string|v2r1p0|
|geometry|geometry tag from the LCDD header|sdjan03|
|event|description of the physics event|ttbar|
|eventNumber|number of events from beamOn command|1000|
|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.

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

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

{noformat}
SLIC_v2r0p7_MyDetectorName_mu-_5GeV_1_0_slic_LCPhys_2007-01-03.slcio
{noformat}

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

{noformat}
slic -g MyDetector.lcdd -O "application version geometry event eventNumber run binary physics date" -r 1
{noformat}