[Clas12_software] EVIO dictionaries

Mac Mestayer mestayer at jlab.org
Mon Apr 16 13:36:05 EDT 2012


Hello Elliott;

My question wasn't about your use or mis-use of a particular
tag name, like "DC"; it was about the dimensionality of the
tag name.  Is the name just a long string, like "dc-reg2-sec4",
or does it have a definite structure, like bank=dc, leaf=reg2,
sub-leaf=sec4 ?
 				- Mac

"mestayer at jlab.org", (757)-269-7252

On Mon, 16 Apr 2012, Elliott Wolin wrote:

> Hi Mac,
>
> Ignore any correspondence between my example and real life, I just typed 
> whatever tag names came into my head.
>
>
>
> On 04/16/2012 01:22 PM, Mac Mestayer wrote:
>> Hello Elliott;
>> 
>> I liked your examples, but I have a question.
>> I'm not sure what "DC" and then "xpos" means; we have
>> 18 drift chambers arranged in 3 'regions' for each of
>> six 'sectors'.  Don't we need at least one more layer
>> between 'bank' and 'leaf'?
>>
>>             - Mac
>> 
>> "mestayer at jlab.org", (757)-269-7252
>> 
>> On Mon, 16 Apr 2012, Elliott Wolin wrote:
>> 
>>> Hi,
>>> 
>>> This morning I checked into evio-4.0 a new version that implements a
>>> dictionary facility that I believe meets all requirements that were
>>> discussed last week.  To my knowledge this completes the initial round
>>> of C++ upgrades to EVIO, and now the Java and C++ versions should be
>>> completely compatible.
>>> 
>>> A number of other improvements have been discussed, including adding
>>> append mode and random-access I/O.  We need to discuss with the DAQ
>>> group which are feasible and set priorities.
>>> 
>>> I parse three types of XML dictionary tags:  "dictEntry", "bank" and
>>> "leaf".  In all cases the only attributes I look at are "name", "tag"
>>> and "num."  All other tags and attributes are ignored, so the XML can be
>>> used to define whatever else you want, e.g. definitions of composite
>>> bank structures, content specifications (e.g: contentType="int"), etc.
>>> 
>>> dictEntry is the simplest, it just makes a entry into the map of names
>>> vs tag/num pairs.  It can occur anywhere in the XML:
>>> 
>>> <dictEntry name="fred"  tag="1" num="1"/>
>>> 
>>> Here the name "fred" is a synonym for the tag/num pair (1,1).
>>> 
>>> "bank" and "leaf" are for describing hierarchical bank structures, e.g:
>>> 
>>> <bank name="CLAS12" tag="1" num="0">
>>> <bank name="DC" tag="20" num="0">
>>> <leaf name="xpos" tag="20" num="1"/>
>>> <leaf name="ypos" tag="20" num="2"/>
>>> <leaf name="zpos" tag="20" num="3"/>
>>> </bank>
>>> <bank name="SC" tag="30" num="0">
>>> <leaf name="xpos" tag="30" num="1"/>
>>> <leaf name="ypos" tag="30" num="2"/>
>>> <leaf name="zpos" tag="30" num="3"/>
>>> </bank>
>>> </bank>
>>> 
>>> where "bank" means bank-of-banks, and "leaf" means bank-of-ints (or
>>> floats or another primitive types).  The parser will generate map
>>> entries that equate the tag/num pair (1,0) to "CLAS12", (20,0) to
>>> "CLAS12.DC", (20,1) to "CLAS12.DC.xpos", (30,3) to "CLAS12.SC.zpos", etc
>>> (actually I think everything is case-insensitive, have to check).
>>> 
>>> We can discuss other tag names besides "bank" and "leaf," but I think
>>> these are adequate.  Currently if a leaf entry has children an exception
>>> is thrown.  I could change this to a warning if desired.
>>> 
>>> Please give it a try.
>>> 
>>> Thanks,
>>> 
>>> -- 
>>>
>>>                 Sincerely,
>>>                     Elliott
>>> 
>>> 
>>> ================================================================================ 
>>> 
>>>
>>>  Those raised in a morally relative or neutral environment will hold
>>>             no truths to be self-evident.
>>> 
>>> 
>>> Elliott Wolin
>>> Staff Physicist, Jefferson Lab
>>> 12000 Jefferson Ave
>>> Suite 8 MS 12A1
>>> Newport News, VA 23606
>>> 757-269-7365
>>> 
>>> ================================================================================ 
>>> 
>>> _______________________________________________
>>> Clas12_software mailing list
>>> Clas12_software at jlab.org
>>> https://mailman.jlab.org/mailman/listinfo/clas12_software
>>> 
>
> -- 
>
> 				Sincerely,
> 					Elliott
>
>
> ================================================================================
>
>
> Those raised in a morally relative or neutral environment will hold
> 		    no truths to be self-evident.
> 
> Elliott Wolin
> Staff Physicist, Jefferson Lab
> 12000 Jefferson Ave
> Suite 8 MS 12A1
> Newport News, VA 23606
> 757-269-7365
>
> ================================================================================
>



More information about the Clas12_software mailing list