Purpose:

The script does some tests on a on a ROOT file.

Location:

On AFS:
/afs/cern.ch/exp/totem/soft/sw_tester/
On SVN:
https://svnweb.cern.ch/cern/wsvn/totem/trunk/offline/cmssw/tools/sw_tester/

Usage:

cd /afs/cern.ch/exp/totem/soft/sw_tester/
./sw_tester.py [options] FILE
OR
./afs_sw_tester.sh [options] FILE

Current options:

Check that there are events in the file:
-e, --checkEvents
Load file from CASTOR tape (might take hours):
-t, --loadFromTape
Print debug/timing info:
-d, --debug

Examples:

Using local files:
./sw_tester.py myHistograms.root
./sw_tester.py /tmp/tvirkkul/anotherFile.root
./sw_tester.py -e myFileWithEvents.root

Reading from CASTOR:

./sw_tester.py root://castorpublic//castor/cern.ch/user/t/tvirkkul/histogramFile.root
./sw_tester.py -e root://castorpublic//castor/cern.ch/user/t/tvirkkul/bigFileOnCastor.root
./sw_tester.py -te root://castorpublic//castor/cern.ch/user/t/tvirkkul/fileOnTape.root

Versions:

There are two versions of the script:
1. sw_tester.py expects the user to have set up the CMSSW environment. That is, source cmsset_default.sh and eval `scram runtime -sh` have been run.
2. afs_sw_tester.sh is a wrapper script that loads ROOT, pyROOT, and Xrootd from AFS, so that you don't have to set up the CMSSW environment.

Exit status codes:

2: Argument error Invalid command line argument. To read from CASTOR, FILE should be of type root:////path/to/file. Note the number of slashes (/).

3: File not found or it's a directory Check the file path.

4: Empty file File exists but it's empty.

5: Corrupted file The file is corrupted or it is not a valid ROOT file. cmsRun might have crashed in the middle of writing events.

Errors 6, 7, and 8 only occur when using the -e --checkEvents flag.

6: No event tree found Couldn't find "Events" tree in ROOT file. The file might be an NTuple file or contain histograms or cmsRun might have crashed before creating the tree.

7: No branches found I have not been able to produce this error.

8: No events found The Events tree exists but it doesn't contain any events. cmsRun might have created the file and crashed before it could record any events.

50: Couldn't load ROOT Python couldn't import the ROOT module. The CMSSW environment isn't set up properly. Run the appropriate source and eval commands. This error should not occur when using afs_sw_tester.sh

60: CASTOR error An error occurred when querying or reading from CASTOR. Most likely the CASTOR environment variables aren't set.

61: CASTOR file error: The file might have been deleted.

-- BartoszRakoczy - 01 Aug 2014

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2014-08-01 - BartoszRakoczy
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    TOTEM All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 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