SLHAea  0.1
containers for SUSY Les Houches Accord input/output
 All Classes Namespaces Files Functions Variables Typedefs
01_basic_input.cpp

Here is the first of some examples that demonstrate how SLHAea can be used. To compile this example with GCC, just do:

g++ -I/path/to/slhaea/ -o 01_basic_input 01_basic_input.cpp

This example demonstrates how to read in a file and how to access individual fields, lines, and blocks:

#include <fstream>
#include <iostream>
#include <slhaea.h>
using namespace std;
using namespace SLHAea;
int main()
{
ifstream ifs("slha1.txt");
Coll input(ifs);
cout << "tan(beta) = " << input["MINPAR"][3][1] << endl << endl;
cout << "m_top(pole) line:\n" << input["SMINPUTS"][6] << endl << endl;
cout << "SMINPUTS block:\n" << input["SMINPUTS"];
}