Skip to content

Commit

Permalink
Inital Import
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonwatts committed Jan 5, 2017
1 parent ad4543b commit 6823de2
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# xAODTutorials
Some scripts to get started with basic things

## Introduction

Scripts in here are meant to be stand alone and do some very simple thing.

## Setting up a standard RootCore directory

In order to access a xAOD file you need a RootCore release. This script builds
one from scratch. It is meant to be run from a machine similar to the tev
machines.

Usage:

source access_xAOD_from_command_line.sh ../RootCoreDir

You should run from a new shell. It will leave your shell setup and ready.
You can then type:

root -l $ROOTCOREDIR/scripts/load_packages.C DAOD_TRUTH0.testmeout.pool.root

The load_packages.C configures ROOT for accessing the xAOD file. If that ran successfully you'll get no errors.
34 changes: 34 additions & 0 deletions access_xAOD_from_command_line.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# Run this file to generate a directory from which you can type
#
# root '$ROOTCOREDIR/scripts/load_packages.C' <xaod-filename.root>
#
# The load_packages.C configures ROOT to read xAOD files
#
# Usage:
# source access_xAOD_from_command_line.sh <dir>
#
# Where <dir> is a fully qualified (and can be cd'd to).
# Expect that this is a new shell
#

if [ "x$1" == "x" ]; then
echo Usage: source access_xAOD_from_command_line.sh dir-to-build-in
fi

mkdir -p $1
cd $1

setupATLAS
# Sets up the AnalysisBase (general purpose) release
# Version 2.3.53 is matched to the release that genrated the xAOD.
# In this case that was 20.1.8.3.
rcSetup Base,2.3.53

# Compile
rc find_packages
rc compile

# Everything is now setup for
# root '$ROOTCOREDIR/scripts/load_packages.C' <xaod-file.root>

0 comments on commit 6823de2

Please sign in to comment.