4 #include <boost/uuid/uuid.hpp> 5 #include <boost/uuid/uuid_generators.hpp> 6 #include <boost/uuid/uuid_io.hpp> 7 #include <boost/lexical_cast.hpp> 15 boost::uuids::random_generator
gen;
16 for (
unsigned int t = 0;
t < pls.size(); ++
t) {
17 std::vector<std::shared_ptr<TFormula> >
temp;
18 for (
unsigned int i = 0;
i < (pls[
t].formulas()).
size(); ++
i) {
20 const auto formulaUniqueName = boost::lexical_cast<
std::string>(uniqueFormulaId);
22 std::shared_ptr<TFormula>
tt(
new TFormula(formulaUniqueName.c_str(), tmp.formulas()[
i].c_str()));
26 compiledFormulas_.push_back(temp);
35 if (!isInPayload(r, p)) {
36 throw cms::Exception(
"MalformedPerfPayload") <<
"Requested performance data not available!";
39 bool ok = isOk(p, region);
41 throw cms::Exception(
"MalformedPerfPayload") <<
"Requested variable does not match internal structure!";
44 return compiledFormulas_[
region][resultPos(r)];
53 if (!isInPayload(r, p))
60 const std::shared_ptr<TFormula>&
formula = getFormula(r, p);
64 std::vector<BinningVariables::BinningVariablesType>
t = myBinning();
69 for (std::vector<BinningVariables::BinningVariablesType>::const_iterator it = t.begin(); it != t.end(); ++it, ++
i) {
78 return formula->EvalPar(values);
86 for (
unsigned int ti = 0; ti < pls.size(); ++ti) {
88 std::vector<BinningVariables::BinningVariablesType>
t = myBinning();
89 for (std::vector<BinningVariables::BinningVariablesType>::const_iterator it = t.begin(); it != t.end(); ++it) {
96 int pos = limitPos(*it);
97 std::pair<float, float>
limits = (pls[ti].limits())[pos];
98 if (v < limits.first || v > limits.second)
101 if (result ==
true) {
115 unsigned int whocares;
116 if (!isOk(point, whocares))
127 cout <<
"Warning: result not available!" << endl;
131 const std::shared_ptr<TFormula>&
formula = getFormula(res, point);
132 unsigned int whichone;
133 isOk(point, whichone);
134 cout <<
"-- Formula: " << formula->GetExpFormula(
"p") << endl;
137 std::vector<BinningVariables::BinningVariablesType>
t = myBinning();
139 for (std::vector<BinningVariables::BinningVariablesType>::const_iterator it = t.begin(); it != t.end(); ++it) {
140 int pos = limitPos(*it);
141 std::pair<float, float>
limits = (pls[whichone].limits())[pos];
142 cout <<
" Variable: " << *it <<
" with limits: " 143 <<
"from: " << limits.first <<
" to: " << limits.second << endl;
bool isKeyAvailable(BinningVariables::BinningVariablesType)
float value(BinningVariables::BinningVariablesType)
def gen(fragment, howMuch)
Production test section ####.
#define TYPELOOKUP_DATA_REG(_dataclass_)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point