GithubHelp home page GithubHelp logo

makecms3classfiles's Introduction

makeCMS3ClassFiles

This function quickly makes class files -- for CMS3 or anything else -- as well as the skeleton for a looper.

###To download this:

git clone https://github.com/cmstas/software.git

###To run:

  1. Start ROOT root
  2. In ROOT command line load .L makeCMS3ClassFiles.C++
  3. makeCMS3ClassFiles("file you want to run on.root", "tree within that file", "class name", "namespace name", "object name")

N.B. The branchNamesFile variable is hardcoded to null, and paranoid is an optional sixth argument that defaults to false. If you want to change the branchNamesFile, you should do so in the file directly. If you have no idea what I'm talking about, don't worry about it.

###For a skeleton looper: Doing the above will also make ScanChain.C and doAll.C, which is a skeleton looper.

###For New Students:

  1. Download this and run it. For the first argument, use any sample in /hadoop/cms/store/group/snt/phys14 (ideally pick the most recent SMS sample you can find in that directory, but any sample really should work for most purposes). This will produce CMS3.cc CMS3.h doAll.C and ScanChain.C.
  2. Test this by running "root doAll.C". If you have troubles, your ROOT is probably installed incorrectly, ask smart people for help.
  3. Now you write your code in looper.C and run it in doAll.C. You can use this ScanChain to fill plots, make babies, whatever you want.

###Troubleshooting:

  • The most common symptom is getting all 0s back. In this case:
    • Make sure your class files are generated on the exact file you're running over. In particular, if branches have been added or removed, it can easily cause problems
    • If you're running on CMS3.cc/CMS3.h, make sure you update CORE and rerun. The .so file in CORE depends on the CMS3 class files, and you don't want a mismatch.
    • If you're making private class files, make sure not to call them CMS3.cc/CMS3.h. This will cause conflicts and undefind behavior.
    • If it complains about a ROOT version mismatch, recompile CORE from your current terminal. That mismatch has been known to lead to this behavior.
  • If it says that a branch does not exist, you're not doing the Init and/or GetEntry properly in your looper.

For bug reports or feature requests, open an issue in github.

makecms3classfiles's People

Contributors

wsicheng 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.