Hi Steve et al, Before commenting Steve's mail, I'd like to take this chance to point out that i've updated BRAT: * Some fixes in the build system * Some fixes to do with uninitialised pointer in BrTileParameters * Some fixes of superflous warnings in BrSiDigModule and BrTileDigModule Updated version number: Version: 1.15.7 CVS Tag: BRAT-1-15-7 If you feel we skipped 1.15.6 then you are right. I made that release, but shortly after found out that it was buggy - sorry. On Thu, 03 May 2001 11:31:09 -0500 "Stephen J. Sanders" <ssanders@ukans.edu> wrote concerning ": centrality and question": > Now my question: Because several modules and corresponding calibrations > are needed to obtain the centrality value, I wanted to come up with a > minimal root program that could be run interactively and which would > illustrate how to put the routines together to get the desired > centrality results. I'm having considerable trouble with this, > however. Take a look at brahms_app/cholm_app/jobs/GlbPackage.{h,cxx} and brahms_app/cholm_app/scripts/RdoConfig.C (in the BRAHMS CVS) for an example of bundling all (more or less) global data modules together into one package (GlbPackage) and a configuration script (RdoConfig.C) to be used with TestMainModule. What you do is to build GlbPackage.so (assuming Linux - see also Makefile): g++ `root-config --cflags` `brat-config --cflags` -I. \ -g -c GlbPackage.cxx -o GlbPackage.o rootcint -f GlbPackageCint.cxx -c `brat-config --cflags` -I. \ GlbPackage.h g++ `root-config --cflags` `brat-config --cflags` -I. \ -g -c GlbPackageCint.cxx -o GlbPackageCint.o g++ -Wl,-soname,GlbPackage.so -o GlbPackage.so \ GlbPackageCint.o GlbPackage.o and put it somewhere searched by ROOT (as set in .rootrc variable Unix.*.Root.DynamicPath), and put RdoConfig.C somewhere by ROOT (as set in .rootrc variable Unix.*.Root.MacroPath), and then you're ready to go: TestMainModule RdoConfig.C --help to get a list of options. I recommend doing TestMainModule RdoConfig.C -i <inputfile> -o <outputfile> \ -H <histfile> -r <runno> -v 5 Incidently, this is what I've used for the past 2 months for all my analysis on CRF and a sligtly modified RdoConfig.C for local analysis jobs. > /home/sanders/cern/root_v3.00.06/bin/root.exe: error in loading shared > libraries: /home/sanders/Brahms/brat/lib/linux/libBrat_Raw.so: undefined > symbol: __12BrTrigScalerPCcT1 As Hiro said, it has to do with your BratLoad.C. I've updated the one in brat/test. I've also updated bratroot to preload libBrat_Trig and updated brat-config to output that library as well if you request --modlibs. > I would like to get the stripped down interactive code working, but > otherwise things do seem to work OK in a compiled program. In theory, it should be possible to run RdoConfig.C interactively, if one does away with all the BrAppOption's and BrAppOptionManager, and replaces that by variables. Then one would have to send the message BrMainModule::Main by hand though: brat [0] .x ModifiedRdoConfig.C brat [1] BrMainModule::Instance()->Main(); > The disfunctional code that I'm trying to get working follows: (It still > has a lot of stuff that isn't really needed for just getting out a > centrality) Rather than commenting on your code, I thought I'd supply you with an example of how I would do it. Please note that the script will not work, 'cause some of the modules behave non-module like! Please refer to the comments in the script to see which. Also refer to the script to see how to run it interactively. I know the script looks rather long, but half of it is comments, so it shouldn't be too hard to read. There's another thing: Comments - please comment your code!!! This goes for quite a lot of people in fact. I had to poke around a bit, and I was dazzled by the tremendious non-existence of comments! This script is a watered down version of what I got in RdoConfig.C. Feel free to comment, ask questions, and use this example. I believe the overall idea is somewhat clear. For more, see also class docuemnation on BrMainModule, BrModule, BrModuleContainer, and source code of TestMainModule.cxx. Yours, Christian ----------------------------------------------------------- Holm Christensen Phone: (+45) 35 35 96 91 Sankt Hansgade 23, 1. th. Office: (+45) 353 25 305 DK-2200 Copenhagen N Web: www.nbi.dk/~cholm Denmark Email: cholm@nbi.dk
This archive was generated by hypermail 2b29 : Thu May 03 2001 - 18:48:51 EDT