#include <iostream>
#include <exception>
#include <cassert>
#include <string>
#include <map>
#include <sstream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <TFile.h>
#include <TObjString.h>
#include "PathResolver/PathResolver.h"
#include "egammaLayerRecalibTool/egammaLayerRecalibTool.h"
#include "xAODEgamma/EgammaxAODHelpers.h"
Go to the source code of this file.
|
std::map< std::string, std::string > | parse (const std::string &list) |
|
◆ parse()
std::map<std::string, std::string> parse |
( |
const std::string & |
list | ) |
|
Definition at line 1054 of file egammaLayerRecalibTool.cxx.
1056 std::cout <<
"list: '" <<
list <<
"'" << std::endl;
1057 std::map<std::string, std::string>
result;
1059 while (TObjString* sObj = (TObjString*)
next())
1061 const TString&
item(sObj->GetString());
1062 std::cout <<
"item: '" <<
item <<
"'" << std::endl;
1063 TObjArray* item_list = TString(
item).Tokenize(
":");
1066 if (item_list->GetEntries() == 1) {
1068 value =
static_cast<TObjString*
>(item_list->At(0))->GetString().Data();
1070 else if (item_list->GetEntries() == 2) {
1071 key =
static_cast<TObjString*
>(item_list->At(0))->GetString().Data();
1072 value =
static_cast<TObjString*
>(item_list->At(1))->GetString().Data();
1075 std::cerr <<
"invalid string " <<
item << std::endl;
1078 std::cerr <<
"trying to insert two times key " <<
key << std::endl;