18#include "TObjString.h"
36 if (refs.size() == 0) {
37 cerr <<
"unable to retrieve hadronisation references for directory " <<
directory << endl;
41 cout << setw(27) <<
"hadronisation specification" <<
" reference calibration" << endl;
42 cout << setfill(
'-') << setw(60) <<
"-" << endl;
44 for (std::map<string, string>::iterator it = refs.begin(); it != refs.end(); ++it)
45 cout << setw(27) <<
it->first <<
" " <<
it->second << endl;
48std::map<string, string>
55 std::map<string, string>
final;
57 TFile*
file = TFile::Open(filename,
"READ");
58 if (
file->IsZombie())
return final;
60 string refname(directory); refname +=
"/MChadronisation_ref";
62 file->GetObject(refname.c_str(), original);
63 if (!original)
return final;
65 TMapIter
next(original); TObjString*
spec;
66 while ((spec = (TObjString*)
next())) {
67 TObjString*
ref = (TObjString*) original->GetValue(spec);
68 final[string(
spec->GetName())] = string(
ref->GetName());
78 TFile*
file = TFile::Open(filename,
"READ");
79 if (
file->IsZombie()) {
80 cout <<
"Error opening file " <<
filename << endl;
85 file->GetObject(
"VersionInfo/BuildNumber", s);
87 cout <<
"No build number found in file " <<
filename << endl;
90 cout <<
"File " <<
filename <<
" has build number " <<
s->GetName() << endl;
const boost::regex ref(r_ef)
void showBuildNumber(const char *filename)
std::map< std::string, std::string > getHadronisations(const char *filename, const char *directory)
void showHadronisations(const char *filename, const char *directory)