Difference between revisions of "Local File Access"

From GridPP Wiki
Jump to: navigation, search
 
(No difference)

Latest revision as of 11:27, 20 August 2010

For general information on file access see FileAccessPatterns.

Below are instructions for testing the read pattern for an ATLAS AOD file (should work with other kinds of root based files too)

Download ROOT > 5.26 (if you want TTreePerfStats)

Setup root: export ROOTSYS= path/to/root; export LD_LIBRARY_PATH = $ROOTSYS/lib; export PATH = $PATH/lib

Make a shared library containing the details of ATLAS AOD branches. Run "root" then

root [0] TFile *f = TFile::Open("YourAODFile.root")
root [1] f->MakeProject("aod","*","new++");
root [2] .q

Potentially wait a while, then you should have a directory aod with a lot of things in it including aod.so

To run over this YourAODFile.root file use code like that given in

ReadingAODBranches_ExampleCode

To access files via rfio you will also want a link

ln -s $LCG_LOCATION/lib/libdpm.so libshift.so.2.1 

You can then plot the outputs in root

root [0] TFile *f = TFile::Open("OuputAODFile.root")
root [1] ioperf.Draw()

To reorder the file use the example also given at ReadingAODBranches_ExampleCode