13 #include <boost/algorithm/string/split.hpp> 14 #include <boost/algorithm/string/classification.hpp> 24 typedef vector<edm::ParameterSet>
VPSet;
27 if (!fileSpec.empty()) {
28 for (VPSet::const_iterator rule = fileSpec.begin(); rule != fileSpec.end(); ++rule) {
29 string s_volumes = rule->getParameter<
string>(
"volumes");
30 string s_sectors = rule->getParameter<
string>(
"sectors");
31 int master = rule->getParameter<
int>(
"master");
32 string path = rule->getParameter<
string>(
"path");
34 vector<unsigned>
volumes = expandList(s_volumes);
35 vector<unsigned>
sectors = expandList(s_sectors);
38 cout <<
"Volumes: " << s_volumes <<
" Sectors: " << s_sectors <<
" Master: " <<
master <<
" Path: " <<
path 40 cout <<
" Expanded volumes: ";
43 cout <<
" Expanded sectors: ";
50 unsigned vpacked = (*i) * 100 + (*j);
55 <<
"VolumeBasedMagneticFieldESProducer: malformed gridFiles config parameter" << endl;
63 keys =
pset.getParameter<vector<int> >(
"scalingVolumes");
64 values =
pset.getParameter<vector<double> >(
"scalingFactors");
68 slaveFieldVersion =
pset.getParameter<
string>(
"paramLabel");
70 if (
pset.existsAs<vector<double> >(
"paramData")) {
71 slaveFieldParameters =
pset.getParameter<vector<double> >(
"paramData");
80 for (vstring::const_iterator
i = v1.begin();
i != v1.end(); ++
i) {
83 unsigned start = std::stoul(v2.front());
84 unsigned end = std::stoul(v2.back());
85 if ((v2.size() > 2) || (
start > end)) {
87 <<
"VolumeBasedMagneticFieldESProducerFromDB: malformed configuration" << list << endl;
89 for (
unsigned k =
start;
k <= end; ++
k) {
def split(sequence, size)
std::vector< unsigned > expandList(const std::string &list)