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>
17 boost::uuids::random_generator
gen;
18 for (
unsigned int t=0;
t< pls.size(); ++
t){
19 std::vector <boost::shared_ptr<TFormula> >
temp;
20 for (
unsigned int i=0;
i< (pls[
t].formulas()).
size(); ++
i){
22 const auto formulaUniqueName = boost::lexical_cast<
std::string>(uniqueFormulaId);
24 boost::shared_ptr<TFormula>
tt(
new TFormula(formulaUniqueName.c_str(),tmp.formulas()[
i].c_str()));
28 compiledFormulas_.push_back(temp);
38 if (! isInPayload(r,p)) {
throw cms::Exception(
"MalformedPerfPayload") <<
"Requested performance data not available!"; }
40 bool ok = isOk(p,region);
41 if (ok ==
false) {
throw cms::Exception(
"MalformedPerfPayload") <<
"Requested variable does not match internal structure!"; }
43 return compiledFormulas_[
region][resultPos(r)];
58 const boost::shared_ptr<TFormula>&
formula = getFormula(r,p);
62 std::vector<BinningVariables::BinningVariablesType>
t = myBinning();
67 for (std::vector<BinningVariables::BinningVariablesType>::const_iterator it = t.begin(); it != t.end();++it, ++
i){
76 return formula->EvalPar(values);
85 for (
unsigned int ti=0; ti< pls.size(); ++ti){
87 std::vector<BinningVariables::BinningVariablesType>
t = myBinning();
88 for (std::vector<BinningVariables::BinningVariablesType>::const_iterator it = t.begin(); it != t.end();++it){
94 int pos = limitPos(*it);
95 std::pair<float, float> limits = (pls[ti].limits())[pos];
96 if (v<limits.first || v>limits.second) result=
false;
110 unsigned int whocares;
111 if ( ! isOk(point,whocares))
return false;
120 cout <<
"Warning: result not available!" << endl;
124 const boost::shared_ptr<TFormula>&
formula = getFormula(res, point);
125 unsigned int whichone;
126 isOk(point,whichone);
127 cout <<
"-- Formula: " << formula->GetExpFormula(
"p") << endl;
130 std::vector<BinningVariables::BinningVariablesType>
t = myBinning();
132 for (std::vector<BinningVariables::BinningVariablesType>::const_iterator it = t.begin(); it != t.end();++it){
133 int pos = limitPos(*it);
134 std::pair<float, float> limits = (pls[whichone].limits())[pos];
135 cout <<
" Variable: " << *it <<
" with limits: " <<
"from: " << limits.first <<
" to: " << limits.second << endl;
bool isKeyAvailable(BinningVariables::BinningVariablesType)
float value(BinningVariables::BinningVariablesType)
#define TYPELOOKUP_DATA_REG(_dataclass_)
std::vector< std::vector< double > > tmp
tuple size
Write out results.
*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