Giter Site home page Giter Site logo

scripts's Introduction

scripts

This directory contains various scripts to perform analysis tasks.
The general assumed structure are like the following:

CORE/
    .git/
    ...
    Makefile
    CMS3_CORE.so
    ...
YOUR_CORE/
    .git/
    ...
    Makefile
    libYOUR_CORE.so
    ...
SOME_PACKAGE/
    .git/
    ...
    Makefile
    libYourPackage.so
    ...
ProjectMetis/ # https://github.com/aminnj/ProjectMetis
    .git/
    ...
    Makefile
    libYourPackage.so
    ...
plottery/ # https://github.com/aminnj/plottery
    .git/
    ...
    Makefile
    libYourPackage.so
    ...
.git
ScanChain.C # your looper or whatever
...
ScanChain.h
...
bootstrap.sh
...
scripts/ # <---- this package
    .git
    setup.sh
    root.sh
    run.sh
    run.C
    ...

See this WWW analysis code as an example. In particular note the bootstrap.sh in that package.

Once you have setup like this, you setup your scripts/ like

$ source scripts/setup.sh

The scripts/ assumes ScanChain.C or whichever is your looper has EXACTLY the following format:

void ScanChain(TChain* chain, TString output_name, TString option_string, int nevents)

Then, you can run over a root file with this ScanChain by issuing a command like:

$ run.sh /path/to/ScanChain.C /path/to/output.root Events 1000 'OptionString' '/hadoop/cms/store/blah/cms3/NewPhysicsMCNtuple/merged_*.root,/hadoop/cms/store/blah/cms3/SuckySMBkg/merged_*.root'
         ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^ ^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         Use this ScanChain   Make your output      Tree   #   Any additional  Comma separated list of inputs or input pattern.
                              based on what each    in     of  options         Please note that when using wildcards '*' use quotes properly.
                              ScanChain does        input  evt ScanChain needs Also, you can only use wildcards at the base level names. (e.g. merged_*.root and not /hadoop/*/*/merged*.root)
                                                           to                                                                                                                ^ ^
                                                           run                                                                                                          These will fail. (feature request?)

scripts's People

Contributors

sgnoohc avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.