My First Volume - 3/5

Now let’s put it all together. The script will read the config.dat file and create two variations of the geometry, “short” and “long”. It calls the routines defined in and twice, once per variation:

my @allConfs = ("short", "long");

foreach my $conf ( @allConfs )
       $configuration{"variation"} = $conf ;

       # geometry

Go ahead and run it:

./ config.dat
You should see that two files are created:
  • example__geometry_long.txt
  • example__geometry_short.txt

The variation is part of the file name. When running gemc you can choose the variation by specifying it in the gcard file:

<detector name="example" factory="TEXT" variation="long"/>

../../../../_images/next.png ../../../../_images/previous.png