Quick Start Guide

Building and installing:

  1. Make sure you have the prerequisites installed:
    • ROOT >= 5.24.00
    • cMsg
    • scons

  2. Download the source for both RootSpy and (if needed) cMsg from the downloads section.

  3. Unpack the tarballs and set the appropriate environment vaiables:
    tar xzf cMsg-3.5.1.tgz
    setenv CMSGSRC $PWD/cMsg-3.5

    tar xzf RootSpy-1.3.tgz
    setenv ROOTSPYSRC $PWD/RootSpy-1.3


  4. Build and install cMsg:
    cd $CMSGSRC
    scons --prefix=$CMSGSRC install

    n.b. when I tried compiling cMsg3.5.1 on Mac OS X 10.9.2, I had to modify the following line in the SConstruct file from:
    env.Append(CPPDEFINES = ['Darwin'], SHLINKFLAGS = ['-multiply_defined suppress', '-flat_namespace', '-undefined suppress'])
    to
    env.Append(CPPDEFINES = ['Darwin'], SHLINKFLAGS = ['-flat_namespace', '-undefined', 'suppress'])

    You'll need to look at what the build system spits out for "OSNAME" when you build cMsg with scons. This gets inserted into the installation directory path. Record the full installation directory path:

    setenv CMSGROOT $CMSGSRC/OSNAME

    where OSNAME is replaced with that for your system

    cMsg uses a separate build system for the Java part (used for the cMsg server). Build and install the jar files into the new CMSGROOT directory:

    ant -Dprefix=$CMSGROOT jar install
    cp -r $CMSGSRC/java/jars/* $CMSGROOT/jar

    Finally, you'll need to set your (DY)LD_LIBRARY_PATH to include the $CMSGROOT/lib directory:

    setenv LD_LIBRARY_PATH ${CMSGROOT}/lib:${LD_LIBRARY_PATH}


  5. Build and install RootSpy:
    cd $ROOTSPYSRC
    scons install
    The RootSpy binaries will be placed in a platform-specific directory "BMS_OSNAME" named something like Linux_CentOS6-x86_64-clang3.2 or Darwin_macosx10.9-x86_64-llvm5.1. You'll probably want to set a ROOTSPY environment variable to point to this that can then be easily used for setting your PATH as well as indicating search paths for include files and libraries:

    setenv ROOTSPY ${ROOTSPYSRC}/${BMS_OSNAME}
    setenv PATH ${ROOTSPY}/bin


Testing:

  • A couple of fully-functional examples/tools should be built and installed in the $ROOTSPY/bin directory. The source for the examples is in $ROOTSPYSRC/src/examples. The quickest way to test if rootspy is working is the following. Note that for steps 2, 3, and 4, each program will need to be started in a different window, each of which will need the ROOTSPY_UDL environment variable set.
  1. Set your ROOTSPY_UDL environment variable:

    > setenv ROOTSPY_UDL cMsg://localhost/cMsg/rootspy
  2. Start up cMsg server (if not already running):

    > $ROOTSPYSRC/scripts/start_cmsg_server

  3. Start rootspy_producer example program:

    > $ROOTSPY/bin/rootspy_producer

  4. Start RootSpy GUI:

    > $ROOTSPY/bin/RootSpy
    • click "Select Server/Hist"
    • click "OK" on the dialog window that pops up
    • click "Next" to toggle through the histograms

Additional documentation for RootSpy in the context of GlueX software can be found on the GlueX Wiki HOWTO:

HOWTO get started with the RootSpy GUI software