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

In this example, a file is read in, the value of sign(mu) and the comment of tan(beta) in the MINPAR block are changed, and the changed SLHA structure is written to a file:

#include <fstream>
#include <slhaea.h>
using namespace std;
using namespace SLHAea;
int main()
{
Coll input;
ifstream ifs("slha1.txt");
ifs >> input;
ifs.close();
input["MINPAR"][4][1] = "-1.0";
input["MINPAR"][3][2] = "# tan(beta)";
ofstream ofs("slha1.txt");
ofs << input;
ofs.close();
}