manTree SFrame GRL instructions

Installation

Start with a clean shell & setup sframe. Then you need to checkout the package:

cd $SFRAME_DIR
svn co svn+ssh://svn.cern.ch/reps/atlasoff/DataQuality/GoodRunsLists/trunk GoodRunsLists
You will need myusername@svn.cern.ch if your cern username is different to your manchester one. If you want to take a tagged version, e.g. 00-00-91, the command is like:
cd $SFRAME_DIR
svn co svn+ssh://svn.cern.ch/reps/atlasoff/DataQuality/GoodRunsLists/tags/GoodRunsLists-00-00-91 GoodRunsLists

Now you need to compile (after patching the makefile):

cd GoodRunsLists/cmt
patch Makefile.Standalone -i /afs/hep.man.ac.uk/g/atlas/SFramePatches/Nov2010/GRL.Makefile.Standalone.patch
make -f Makefile.Standalone

This generates the shared library: GoodRunsLists/StandAlone/libGoodRunsLists.so

Now make a soft link of library libGoodRunsLists.so to your SFrame library folder

ln -s $SFRAME_DIR/GoodRunsLists/StandAlone/libGoodRunsLists.so $SFRAME_DIR/lib

Example: Adding GRL to SFrame analysis code

This example is for Single electron challenge and so assumes you have set up SFrame and manTree according to these instructions as well as topSel.

GRL Location at manchester

To find GRL look in directory :
/afs/hep.man.ac.uk/d/atlas-neutrino/ManTrees/data10/GRL/top/
This GRL for top channel for periods A-H. If you need a GRL to that is not in /afs/hep.man.ac.uk/d/atlas-neutrino/ManTrees/data10/GRL/top/ then following instrictions for generating GRLs.

Generating GRL

For full instructions instructions and https://atlas-top-grls.web.cern.ch/atlas-top-grls/xmlGRL/ReadMe.txt[here]].

To use the GRL generator click here. There are four flags to set:

After setting these flags click submit and the GRL will be downloaded to your personal computer.

To work in SFrame add GRL to config directory (SFrame package)/config/ and follow instructions below.

XML File

Add the library to the config XML file topSel/config/TopSingleEle_config.xml
<JobConfiguration JobName="TopSingleEleJob" OutputLevel="INFO">
  <Library Name="libGoodRunsLists"/>
  

Source Code

To initialize:

void TopESel::BeginCycle() throw(SError) {
  m_grl_reader.AddXMLFile("GRL/grl-100903-noprescaled_A-F2.xml");
  m_grl_reader.AddXMLFile("GRL/grl-G1-G5.xml");
  bool check = m_grl_reader.Interpret();
  if(!check) {
    m_logger << WARNING << "Problem in GRL reader" << SLogger::endmsg;
  } else {
    m_logger << INFO << "GRL Reader Interpret() returned true" << SLogger::endmsg;
  }
  m_grl = m_grl_reader.GetMergedGoodRunsList();
  m_logger << INFO << "Initialized GRL " << m_grl.GetSuggestedName().Data() << SLogger::endmsg;
}

In ExecuteCycle:

Call m_grl and ask if event is in the GRL by passing Run Number & LumiBlock:

i.e bool result = m_grl.HasRunLumiBlock( m_evinfo->RunNumber(), m_evinfo->LumiBlock() );

Header

Add following
#include "GoodRunsLists/TGoodRunsListReader.h"
#include "GoodRunsLists/TGoodRunsList.h"

/// GRL
Root::TGoodRunsListReader m_grl_reader;
Root::TGoodRunsList m_grl;

MAKEFILE

Add:
INCLUDES += -I$(SFRAME_DIR)/GoodRunsLists

-- JohnAlmond - 27-Oct-2010, MarkOwen - 22-Nov-2010

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r6 - 2011-05-05 - JohnAlmond
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Atlas All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback