LISTSERV mailing list manager LISTSERV 16.5

Help for LCD-DEV Archives


LCD-DEV Archives

LCD-DEV Archives


LCD-DEV@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

LCD-DEV Home

LCD-DEV Home

LCD-DEV  February 1999

LCD-DEV February 1999

Subject:

Some thoughts on a parameter database facility -- Comments?

From:

Joanne Bogart <[log in to unmask]>

Date:

03 Feb 1999 17:24:50 -0800 (PST)Wed, 03 Feb 1999 17:24:50 -0800 (PST)

Content-Type:

TEXT/PLAIN

Parts/Attachments:

Parts/Attachments

TEXT/PLAIN (251 lines)


                    Parameter Database and Services for Same
                    ========================================

This facility is meant to address the need to store and access parameters
(such as detector dimensions or smearing parameters) which condition
a process (such as gismo event generation or fast MC).  It has nothing
to do with reading, writing or storing event data.


Visible structure of the data
-----------------------------

Information is organized into _components_

Each component has
  a unique _name_.  Kept in the form of string.         Required

  a unique _handle_                                     Required, assigned
                                                        by facility

  list of _properties_  Kept as strings                 Optional

  list of field-identifier-value pairs                  Optional
     a _field-identifier_ is a string
     a _value_ may be any of
          boolean
          integer
          floating point
          string
          array (list) of integer
          array (list) of floating point
          array (list) of strings
          component handle (maybe)
     (A property can be viewed as an identifier-value pair where the
      the value is boolean)

  Is this sufficient or will we need to allow values having a more arbitrary
  structure?

                    *   *   *   *   *   *   *   *   *

Services
--------

1. Register.  This makes the most sense for applications which are initialized
   before the dbs is assembled (say by reading in one or more files)

An application (i.e., class) should be able to register to be called back
   - for a particular (top-level only?) component, by name
   - for all (top-level?) components having a particular property

The application could then be called back
   - when the component is first assembled 
   - when a field changes its value
   - when it is being deleted from the dbs (if we have such an operation)

2. Read.  Several kinds of information can be obtained.

   a. Given a component name, return its handle (if any)
   b. Given a component handle, return its name
   c. Given a component handle, return list of properties
   d. Given a component handle and field identifier, return value type
      (e.g. list-of-float)
   e. Given a component handle and field identifer, return its
      value.  Maybe have separate routines to do this for different
      value types?

3. Scan.  
   a. Given a property name, call back  once for each component with
      that property (handle and property name would be arguments to
      the callback)
   b. Given a component handle, callback once for each field.
      Arguments passed to callback would include field name, perhaps
      also field type.
      
4. Write
   a.  Establish a component (i.e., give it a name)
   b.  Add a property
   c.  Add a field (supply name, type, data)
   d.  Modify value of existing field (probably not allowed to change
       type except maybe to change length of list
   e.  Notify registrants of change

5. Delete??

                    *   *   *   *   *   *   *   *   *


Some elements of the implementation
-----------------------------------

For each component, keep associative array (e.g., map) of name versus
handle.  Handle is a pointer a structure including
  * a list of all the fields (including properties)
    of the component.  Information for a field looks like
         name
         type ID
         list length, maybe also total size
         pointer to value 

  * a list of registrants for this components
  * (maybe) pointer to parent component, if any

There also has to be some facility for looking up a particular field
of a component.  Could have entries in the associative array of
form   (fully-qualified field name, pointer to field information).
E.g. ("HAD_EC.rOuter", ptr), ("EM_Barrel.material.names", ptr)
("TrackSmear.PtMin", ptr).  Or could find a particular field by doing
one lookup for each qualifying piece of name.  E.g., for
EM_Barrel.material.names first get handle for "EM_Barrel" component,
then for subcomponent "materials" (looking in EM_Barrel assoc. array), 
then for field "names" (in subcomponent materials assoc. array).

To handle registration by property, need to keep a list of registrants
per property (where here the property name is *not* qualified by component
name) as well.  May want to restrict this to properties which appear in
top-level components.

Ideally there would be implementations both for Java and for C++ which
would be linked in as utilities in most if not all of our standard programs.

                    *   *   *   *   *   *   *   *   *

Typical components
------------------

1. Physical detector components, e.g. HAD_EC.

Component name
  HAD_EC                
Property-list
  Calorimeter
  Endcap
  Hadronic_Calorimeter
  Active
  Cylinder
  Physical [implicit from Cylinder property]
  Layered  
  Segmented
Additional fields
  (Assume in addition to above field types there is known type "material"
   consisting of a string name and thickness.  Typical value
   for this type looks like ("Polystyrene", 0.5)

  inner_radius = <float value>    # Existence of these four fields is
  outer_radius = <float value>    # implied by "Cylinder" property
  inner_z      = <float value>
  outer_z      = <float value>
  n_layers     = <integer value>
  layer_materials = <array of material>
  inner_wall = <material>
  outer_wall = <material>

  The above is more or less the set of values appearing in detector
  definitions used by gismo.  A different, partially overlapping
  set is appropriate for Fast MC.  For example, instead of detailed
  materials information, Fast MC would need average values for
  interaction length/cm and radiation length/cm.

2. More abstract or global properties associated with the physical
   detector, e.g.

   Component name
      HAD_Segmentation
   Properties
      Calorimeter   
      Hadronic_Calorimeter
      Segmentation
   Fields
      phi-seg = <integer value>
      costheta-seg = <integer value>
      (could perhaps also describe tower id mapping here.
       For each field within tag need at least
            a name
            first bit in bit field
            width of bit field
      )

   (Might also move n_layers here and include handle for HAD_Segmentation
    among fields of HAD_EC.  Similarly, if materials layout is to be
    the same for EC and Barrel, might define a separate component for that
    and let HAD_EC, HAD_Barrel point to it.)

3. Sets of analysis parameters.  For example, Fast MC calorimeter smearing
   parameters

   Component name
      FastMC_Cal
   Properties
      Calorimeter
      FastMC
   
   Fields
      energySmearEM  = <list of floats>
      energySmearHad = <list of floats>
      transverseSmearEM = <list of floats>
      transverseSmearHad = <list of floats>


                    *   *   *   *   *   *   *   *   *

Setting values en masse
-----------------------

Detailed discussion of how the values get from the outside world into
into the parameter database (that is, into some piece of code which can
invoke the write services) is outside the scope of this note.  Doing this 
in a flexible manner would be the job of a separate facility.  Probably 
the most difficult part of this problem is to determine the type 
of a value in a particular field.  There are at least three possible 
approaches:

1.  For each field, write a special piece of code which knows how
    to parse that field (more or less the way iniData operates now).

2.  Define a sort of database definition file which describes sizes and
    types for all possible components and their fields.  Some compile-like
    procedure would produce a binary version of this information so that
    code attempting to read a parameter-values file could look up how to
    read any particlar field.  This is similar to VMS CLD files.

3.  Come up with a format for the parameters file which includes
    type information along with the values.

I lean towards 3 if it can be made to work because it is the most
flexible.  It is likely that there will be many changes and additions
to the set of interesting parameters.

One question I have is whether the usual primitive types (string, float, 
etc.) and homogenous lists of these types is adequate.  If not, where do 
we draw the line?

                    *   *   *   *   *   *   *   *   *


Layering
--------

The parameter database is meant to be at the bottom of perhaps several
layers of utilities allowing access to parameters.  It is purposely
designed *not* to provide the sort of higher level of organization of 
data which might be desirable for a particular application, such as a 
one-event display.  The hope is that it provides an adequate interface
for a tool to do just that.  The expectation is that the services 
provided by the parameter database would generally not be invoked by
top-level application code, but by such intermediate utilities.



Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

February 2026
June 2017
April 2017
November 2016
September 2016
April 2016
March 2016
February 2016
November 2015
August 2015
July 2015
May 2015
April 2015
March 2015
January 2015
November 2014
September 2014
May 2014
April 2014
February 2014
November 2013
October 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
October 2012
August 2012
July 2012
June 2012
May 2012
April 2012
February 2012
January 2012
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
May 2004
April 2004
March 2004
January 2004
November 2003
September 2003
August 2003
June 2003
May 2003
February 2003
August 2002
July 2002
May 2002
April 2002
March 2002
February 2002
January 2002
November 2001
September 2001
August 2001
June 2001
May 2001
April 2001
March 2001
March 2000
February 2000
January 2000
December 1999
November 1999
October 1999
September 1999
July 1999
May 1999
April 1999
March 1999
February 1999
January 1999
December 1998
November 1998

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use