- jwebb's home page
- Posts
- 2019
- 2018
- 2017
- 2016
- 2015
- 2014
- 2013
- November (1)
- October (1)
- September (1)
- July (1)
- June (1)
- April (1)
- March (3)
- February (1)
- January (1)
- 2012
- 2011
- December (2)
- September (3)
- August (5)
- July (6)
- June (6)
- May (1)
- April (5)
- March (5)
- February (2)
- January (2)
- 2010
- December (3)
- October (3)
- September (2)
- August (2)
- June (2)
- May (4)
- April (4)
- March (2)
- February (4)
- January (10)
- 2009
- 2008
- 2007
- 2006
- July (1)
- My blog
- Post new blog entry
- All blogs
AgML Update -- Refactoring ROOT dictionary
Updated on Thu, 2016-05-12 13:38. Originally created by jwebb on 2016-05-12 13:33.
The current implementation of AgML requires 647 separate ROOT dictionary entries in order to support the STAR geometry model. This includes entries for each geometry module (e.g. one for the EcalGeo.xml, one for the EcalGeo6.xml, one for the TpceGeo1.xml, etc...). And it includes entries for every data structure declared within each geometry module. This has an impact on compilation time which we would like to reduce.
Why do we need so many dictionary entries? Two reasons:
05/12/2016
First attempt brings the dictionary entries down from 647 to 140. The 140 dictionary entries correspond to classes used to describe a configuration state for the geometry modules.
Code is able to reproduce the y2012 -- y2015 geoemtry tags.
Issue exists with FTPC and its supports. Old Geometry.cxx model tied the FtpcGeo.xml and SupoGeo.xml modules together, creating them in the same routine, triggered by a single detector state. The new scheme creates one detector module per detector state. Need to work around this by either (a) creating new SUPOxx detector states, or extending FTPCxx states to create the support geometry as well.
Why do we need so many dictionary entries? Two reasons:
- We use the ROOT dictionary as a factory in order to instantiate the modules and blocks which build detectors and volumes:
- We use the ROOT dictionary to manipulate the data structures declared in the modules from the master steering routine
AgModule *module = (AgModule *)TClass::GetClass("EcalGeo6") -> New(); AgBlock *block = (AgBlock *)TClass::GetClass("ECAL") -> New();
AgStructure::AgDetpNew('ECAL'); AgStructure::AgDetpAdd('Emcg_t', 'version', 1.0f ); // Set Emcg_t emcg; emcg.version = 1.0f; module -> Construct( block );Very type sensitive ... calling with a double or an int in the above code would silently fail. Many accesses to ROOT dictionary to find the address of a data member, and then set the value of that data member. Just not a good design.
05/12/2016
First attempt brings the dictionary entries down from 647 to 140. The 140 dictionary entries correspond to classes used to describe a configuration state for the geometry modules.
Code is able to reproduce the y2012 -- y2015 geoemtry tags.
Issue exists with FTPC and its supports. Old Geometry.cxx model tied the FtpcGeo.xml and SupoGeo.xml modules together, creating them in the same routine, triggered by a single detector state. The new scheme creates one detector module per detector state. Need to work around this by either (a) creating new SUPOxx detector states, or extending FTPCxx states to create the support geometry as well.
»
- jwebb's blog
- Login or register to post comments