Changes to monitoring software

From: Kris Hagel (hagel@CyclotronMail.tamu.edu)
Date: Mon Sep 03 2001 - 23:17:37 EDT

  • Next message: Christian Holm Christensen: "Centrality methods (was Re: BRAT 2.0.35)"

    Hello,
    This message is to announce a surgery to the monitoring software.  The
    motivation for the surgery was manyfold.  The most important reason is that we
    wanted the monitoring software to follow a more formal path of a module ala
    BrModule.  It was therefore desirable to have BrDetectorMonitor inherit from
    BrModule and have BrSuperMonitor do all of the Init, Begin, End and Finish jobs.
    
    This was difficult because the TGXXXXX's all inherit from TObject as well as
    BrModule.  At the time of writing, it was necessary to pick one or the other and
    given that I wanted a GUI, I picked the TGXXXXX stuff and more or less put in
    the functionality of BrModule ad-hoc.
    
    With the advent of the signal/slot communication in ROOT, it became possible to
    have the graphics objects inherit from anything you want and use the signal/slot
    communication mechanism instead of the graphics messaging system which
    necessitated the inheritance from the base graphic class ie TGMainFrame or
    TGTransientFrame.
    
    So, I changed the BrBaseMonitor, BrDetectorMonitor and BrSuperMonitor to use the
    signal/slot mechanism.  This has the side effect of really cleaning up the code
    and making it, I think, easier to maintain.  After that, BrBaseMonitor inherits
    from nothing, BrDetectorMonitor inherits from BrBaseMonitor and BrModule and
    BrSuperMonitor inherits from BrBaseMonitor and TNamed.
    
    That necessitated going through all of the DetectorMonitors (ie
    BrOnlineMonitorZDC etc) and taking out the Init statements as that is now done
    by BrSuperMonitor in it's Init method.  THIS IS IMPORTANT!  If you have a
    BrOnlineMonitorXXX that you have out, MAKE SURE YOU REMOVE THE INIT FROM THE
    CONSTRUCTOR.
    
    A side effect of this is the following.  If you are using the BrOnlineMonitorXXX
    standalone (which I have never seen anyone besides me do; surprise! it has that
    capability), you will need to call the Init method before executing the Event
    method. (ie before pressing Begin on the GUI)
    
    I also worked on SuperMon.  It is now possible to say SuperMon Config.C and it
    will execute a file named Config.C (in much the same way that bratmain does it
    which is where the idea comes from anyway) which is expected to get an instance
    of BrSuperMonitor via 
    BrSuperMonitor *mon = BrSuperMonitor::Instance(); 
    and then adding it's own detector monitors.  This is useful if you want to look
    at a particular monitor in SuperMon without waiting for it to load all of the
    others that you are not interested in.
    
    These changes have been tested, but given the magnitude of the surgery, I could
    imagine that I left something undone.  It is working for me, however.  Let me
    know if you encounter any problems.
    
    Enjoy.
    
    Regards
    
    Kris
    



    This archive was generated by hypermail 2b30 : Mon Sep 03 2001 - 23:18:25 EDT