Linear Collider Forum



Home » Software Tools » org.lcsim » tuples
Re: tuples [message #1367 is a reply to message #1352] Thu, 24 January 2008 08:17 Go to previous message
lima
Messages: 47
Registered: May 2004
Location: DeKalb, IL, USA
Hi Blair,

You should be able to do this by creating another driver to manage the ntuple (say an NtupleManagerDriver), which owns the Ntuple. Then the NtupleManagerDriver would have an initialize() method where the ntuple gets booked, and a finalize() method to write the ntuple to disk.

For filling the tuple, there are two options:

1- any driver gets the reference to the ntuple, and fills some of its variables. In this option, NtupMgrDriver would have a static method returning a reference to the ntuple, allowing any other driver to add stuff to the ntuple. Maybe the ntuple variables need to be declarerd public?

2- NtupleManagerDriver itself fills the ntuple inside two or more (static) filling methods, which can be called by any other drivers, passing the ntuple data as arguments.

These tips should be enough to get you going. Please let
me know if you have any questions.

I actually have a working example for this (~option 2 above) in
src/org/lcsim/recon/cluster/directedtree/DTreeAnalysis.java
.

It is maybe not trivial to understand, but you should concentrate on the ntuple-related lines of code.

I hope it is useful.

Guilherme
 
Read Message
Read Message
Previous Topic:Units for material properties
Next Topic:SUSY particles, charge NaN
Goto Forum:
  


Current Time: Thu Nov 15 16:49:23 Pacific Standard Time 2018
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software