Re: need instructions on use of bratmain

From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Mon Jul 30 2001 - 15:54:19 EDT

  • Next message: Stephen J. Sanders: "Are brag and brat2 compatible?"

    On Mon, 30 Jul 2001 13:16:15 -0500
    "Stephen J. Sanders" <ssanders@ku.edu> wrote
    concerning ": need instructions on use of bratmain":
    > Hi, 
    >   I am having difficulties trying to use the bratmain program.  Some 
    > background--
    > what I really want is the functionality of the the TestGeantDig routine 
    > that didn't make it into brat2.  Reading the brat2 document, there
    > is a suggestion that users wanting to do what TestGeantDig
    > accomplished need to write their own macros to work with bratmain. 
    > OK. 
    
    If you make one, posting it on your brahms_app area is a really good
    idea.  I actually believe that Erik has something in his CVS area. 
    
    > Before starting on an entirely new macro I thought I would try
    > out bratmain using a slightly modified version of Christian's
    > CentMacro.C program. 
    
    SCRIPT! It's a configuration script, not a program. 
    
    > I'm attaching the file that I'm running at the end of this message.  
    > 
    > This file runs fine interactively.  That is
    > //   promtp% bratroot
    > //   brat [0] .x Config.C
    > //   brat [1] BrMainModule::Instance()->Main();
    > 
    > works as expected.
    
    Uh, I wasn't sure it would. 
    
    > I was expecting to be able to just run bratmain (with Config.C in  
    > current directory) to accomplish the same thing.  However, when I
    > try this the program runs through and exits, apparently never
    > looping over any events.  There are no error messages.
    > Christian, what am I missing?
    
    Well, what you were missing, compared to all the other configuration
    scripts I've been working with, was the use of BrAppOptions in the
    configuration script.  In particular the
    BrAppOptionManager::ProcessCommandLine message.  You see in
    bratmain.cxx, you'll find the lines: 
    
      // Interpret the configuration script
      gROOT->Macro(configFile.Data());
    
      // Test if the commandline was well formesd, otherwise exit
      if (!optionManager->IsOk())
        return 1;
    
    Now, the thing is that BrAppOptionManager::IsOk, would never evaluate
    to non-false unless the message BrAppOptionManager::ProcessCommandLine
    was sent, so the bratmain program terminates after the test above,
    with no warning, error, or the like. 
    
    To facilitate the use of configuration scripts that doesn't send the
    message  BrAppOptionManager::ProcessCommandLine, I've changed
    BrAppOptionManager so that IsOk only tests false if
    BrAppOptionManager::ProcessCommandLine finds a syntactical error on
    the command line (that was in fact the intention all along).  The
    change is commited to CVS, that is, you can use your script.  Thank
    you for reporting this anomaly.  
    
    Changes in BRAT today from my hand, plus some more details on Pawels
    updates. 
    
     2001-07-30  Christian Holm Christensen  <cholm@rcas0009.rcf.bnl.gov>
    
            * managers/BrAppOptionManager.cxx:
            Made a fix that allows scripts using no options to perform anyway.
    
            * db/main/BrMainDb.h:
    	Added DANGEROUS method PurgeDetector.  See log and comment in source
    	file for an extremly severe warning.  DO NOT USE!!!
    
    	* db/main/BrMainDb.cxx:
    	Added new method PurgeDetector that will remove all references to a
            named detector.  This is an EXTREMLY DANGEROUS method.  DO NOT USE IT
    	UNLESS YOU KNOW WHAT YOU'RE DOING!!! THIS IS IMPORTANT!!! YOU MAY
    	CAUSE EREPERABLE DAMAGE TO THE DATABASE!!!
    
    	* db/apps/CreateParameter.cxx:
    	Added option to prevent being failure if a parameter exist.  Should
            only be used for debugging, and against a test database.
    
    	* db/apps/CreateParameter.cxx:
    	Allow the program to continue even if the insertion of one parameter
    
             fails. Hmm, maybe this should be an option.
    
    	* asciidata/Makefile.am:
            Detector parameter file for the year 2000 running is now installed and
    	distributed.
    
    	* db/calib/BrCalibrationsDb.cxx: Nothing, just a line deletion.
    
    	* db/main/BrMainDb.cxx: Aet some higher verbosity requirement.
    
    	* db/calib/BrParameterElement.cxx:
    	Protected some output behind DebugLevel() and changed some cerr, to
    	Warning.
    
    	* db/abc/BrDb.cxx: Initialise  fVerbose and fDebugLevel to zero.
    
    	* db/calib/BrParameterElement.h: Added Print methods
    
    	* db/calib/BrParameterElement.cxx:
    
    
            * db/calib/BrParameterElement.cxx:
    	Added the methods BrParameterElement::Print and
    	BrParameterData::Print.
    
    2001-07-30  Ouerdane Djamel  <ouerdane@rcas0009.rcf.bnl.gov>
    
            * test/Geometry.dat: Corrected C1 length (before 80 cm, now 80.8 cm)
    
    2001-07-30  staszel  <staszel@rcas0009.rcf.bnl.gov>
    
    	* modules/track/dc/BrDCTrackingModule.cxx, modules/track/dc/BrDCTrackin\gModule.h:
            New method SetPromptDelay that allows fPromptDelay to be
    	sent to BrDCClusterFinder.
    
    	* modules/track/dc/BrDCClusterFinder.h:
    	Changes that have to do with introduction of tracking on exp. data: 1) \longer
          	constructor formal variable list, and some new diagnostics histograms.
    
    	* modules/track/dc/BrDCClusterFinder.cxx:
    	Changes that have to do with introduction of tracking from
    	exp. data: 1) new constructor formal variable list,
    	modified Decode method and some new diagnostics histograms.
    
    	* modules/util/BrDriverDC.h, modules/util/BrDriverDC.cxx:
    	Changes that has to do with introduction of T4/T5 calibration
    	and tracking.
    
    	* modules/calib/dc/BrDcCalModule.h:
            T4 and T5 calibration has been introduced
    
    	* modules/calib/dc/BrDcCalModule.cxx:
    	developments regarding T4 and T5 calibration
    
    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 2b30 : Mon Jul 30 2001 - 15:55:24 EDT