13 #include <boost/algorithm/string/split.hpp>
14 #include <boost/algorithm/string/classification.hpp>
15 #include <boost/lexical_cast.hpp>
25 typedef vector<edm::ParameterSet>
VPSet;
28 if (!fileSpec.empty()) {
29 for (VPSet::const_iterator rule = fileSpec.begin(); rule != fileSpec.end(); ++rule) {
30 string s_volumes = rule->getParameter<
string>(
"volumes");
31 string s_sectors = rule->getParameter<
string>(
"sectors");
32 int master = rule->getParameter<
int>(
"master");
33 string path = rule->getParameter<
string>(
"path");
35 vector<unsigned>
volumes = expandList(s_volumes);
36 vector<unsigned>
sectors = expandList(s_sectors);
39 cout <<
"Volumes: " << s_volumes <<
" Sectors: " << s_sectors <<
" Master: " <<
master <<
" Path: " <<
path
41 cout <<
" Expanded volumes: ";
44 cout <<
" Expanded sectors: ";
51 unsigned vpacked = (*i) * 100 + (*j);
56 <<
"VolumeBasedMagneticFieldESProducer: malformed gridFiles config parameter" << endl;
64 keys =
pset.getParameter<vector<int> >(
"scalingVolumes");
65 values =
pset.getParameter<vector<double> >(
"scalingFactors");
69 slaveFieldVersion =
pset.getParameter<
string>(
"paramLabel");
71 if (
pset.existsAs<vector<double> >(
"paramData")) {
72 slaveFieldParameters =
pset.getParameter<vector<double> >(
"paramData");
81 for (vstring::const_iterator
i = v1.begin();
i != v1.end(); ++
i) {
84 unsigned start = boost::lexical_cast<unsigned>(v2.front());
85 unsigned end = boost::lexical_cast<unsigned>(v2.back());
86 if ((v2.size() > 2) || (
start >
end)) {
88 <<
"VolumeBasedMagneticFieldESProducerFromDB: malformed configuration" <<
list << endl;