[Halld-offline] MD5 Geometry checksum added to HDDS and HDGeant
David Lawrence
davidl at jlab.org
Fri Nov 9 10:47:22 EST 2012
Hi Mark,
Not yet. We still have several places where misalignment of geometry
can take place
and that are not generating checksums so that a comparison can even be made.
We can discuss what type of enforcement we want (warn user, require
user action to
continue, refuse to run, ....). I'm pretty open to how its handled, as
long as there is
eventually at least a warning to the user that a misalignment was detected.
Regards,
-David
On 11/9/12 10:13 AM, Mark M. Ito wrote:
> Is there any enforcement of consistency?
>
> On 11/08/2012 08:59 AM, David Lawrence wrote:
>> Hi Offliners,
>>
>> I have recently committed a series of changes to our code
>> repository that
>> implement a means of calculating an md5 checksum of the HDDS XML
>> files used of the geometry. The changes are in HDDS, HDDM, and HDGeant.
>> Therefore, if you update either HDDS or sim-recon, you should updated
>> the
>> other as well to get a working system.
>>
>> The primary motivation of this is to provide a way to check that the
>> geometry used to produce an hddm file matches the geometry in an
>> existing
>> set of XML files. Development of new experiments or any other
>> exercise that
>> may require optimization of the geometry should find this an important
>> bookkeeping tool.
>>
>> This is related to a change I committed last week that provides
>> an option
>> in hdgeant to dynamically generate, compile, and link the geometry from
>> the XML source at run time.
>>
>> Some details:
>>
>> - The hdds tools that generate the FORTRAN and C++(root) code using
>> the XML files for input now produce a md5geom() subroutine as
>> part of
>> the generated code. This subroutine returns the md5 checksum for
>> the
>> geometry used to generate that code.
>>
>> - A single checksum is produced for the entire set of XML files that are
>> used. The checksum calculation is integrated with the Xerces
>> parser so
>> that as the parser includes files, they are added to the checksum
>> (the order of
>> the files is thus important but is handled by Xerces).
>>
>> - The simulation HDDM format (class="s") was modified to include places
>> for geometry md5 checksums for hdgeant, mcsmear, and the dana
>> analysis program. Currently, only hdgeant fills in this value
>> (mcsmear
>> has a lot of hard-coded geometry). The new geometry tag is only
>> written
>> out for the first event.
>>
>> - The hdgeant program has been modified to allow command line arguments.
>> One is "-xml" which will generate, compile, and dynamically link
>> geometry
>> based on the XML source in the directory pointed to by the
>> HDDS_HOME
>> environment variable.
>> Another is "-checksum" which will print the md5 checksum for the
>> geometry
>> to be used and then exit. If the -xml option is given along with
>> the
>> -checksum option, then the generate,compile,link cycle is performed
>> first and the checksum obtained from the shared object.
>>
>> - A new hdds-md5 tool was added to allow you to quickly calculate the
>> md5 checksum of the current set of XML files so you can compare to
>> the one recorded in the hddm file.
>>
>>
>> If you experience any trouble or have questions or comments, please
>> contact me.
>>
>> Regards,
>> -David
>> _______________________________________________
>> Halld-offline mailing list
>> Halld-offline at jlab.org
>> https://mailman.jlab.org/mailman/listinfo/halld-offline
>>
>
More information about the Halld-offline
mailing list