My personal toolbox

Here I want to gather some tools that might prove useful for more people than just me...

Currently available are


ROOT class to parse the command line

The TCmdLine class encapsulates the 'getopt' function provided by most (all?) un*x systems. The user only has to add one line per additional option to his code. Sample usage:

  int main(int argc, char **argv)
  {
    TOptionBool help, verbose;
    TOptionInt maxevents(10000);
    TOptionString outputfile("histograms.root");

    TCmdLine opts;

    opts.AddOption("help",'h',help);
    opts.AddOption("verbose",'v',verbose);
    opts.AddOption("events",'e',maxevents);
    opts.AddOption("output",'o',outputfile);

    opts.Parse(&argc,argv);

    ...

    while ( tree.Next() ) {
      if ( event++ == maxevents ) break;
      ...
      histo->Fill(foobar);
    }

    TFile file(outputfile);
    histo->Write();
    file.Close();
  }
    

More detailed information can be found in the README and in the source code


Simple Makefile for LaTeX Sources

This Makefile can be used for simple LaTeX documents that are not spread over several files. The Makefile doesn't have to be edited!

Per default for each *.tex file in the directory, the corresponding DVI file is created. Postscript can be generated with make ps or make myfile.ps if a file myfile.tex exists.

Other targets are clean (remove all temporary files) and clobber (remove DVI and PS files as well).


Useful figures

Conversion tables (gnuplot sources)

  · Degrees vs. radians degrees-radian.jpg degrees-radian.eps
  · Pseudorapidity vs. degrees eta-degrees.jpg eta-degrees.eps
  · Pseudorapidity vs. radians eta-radian.jpg eta-radian.eps
  · Radians vs. degrees radian-degrees.jpg radian-degrees.eps

Email me: Ingo Strauch Back to my physics page Last updated: 13-Jul-2001