The SLHA allows to have several blocks with the same name but at different Q scales. This examples shows how to access blocks by matching the first strings of their block definition:
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
using namespace SLHAea;
int main()
{
stringstream some_blocks(
"BLOCK test Q= 1000 \n"
" 1 3.14 \n"
" 2 6.28 \n"
"BLOCK test Q= 2000 \n"
" 1 2.71 \n"
" 2 5.42 \n"
"BLOCK test Q= 2000 \n"
" 1 1.61 \n"
" 2 3.22 \n");
vector<string> key;
key.push_back("TEST");
key.push_back("q=");
key.push_back("1000");
cout << b1.
at(1).
at(1) <<
" == 3.14" << endl;
cout << b1.
at(2).
at(1) <<
" == 6.28" << endl;
key.at(3) = "2000";
cout << b2.
at(1).
at(1) <<
" == 2.71" << endl;
cout << b2.
at(2).
at(1) <<
" == 5.42" << endl;
b3 = *Coll::find(input.
rbegin(), input.
rend(), key);
cout << b3.
at(1).
at(1) <<
" == 1.61" << endl;
cout << b3.
at(2).
at(1) <<
" == 3.22" << endl;
}