CMS 3D CMS Logo

Classes | Functions
cmspython3 Namespace Reference

Classes

class  PyBind11ProcessDesc
 
class  Python11ParameterSet
 

Functions

void pythonToCppException (const std::string &iType, const std::string &error)
 
template<typename T >
pybind11::list toPython11List (const std::vector< T > &v)
 
template<typename T >
std::vector< TtoVector (pybind11::list &l)
 

Function Documentation

◆ pythonToCppException()

void cmspython3::pythonToCppException ( const std::string &  iType,
const std::string &  error 
)

Definition at line 6 of file PyBind11Wrapper.cc.

6  {
7  throw cms::Exception(iType) << " unknown python problem occurred.\n" << error << std::endl;
8  }

References relativeConstraints::error, and Exception.

Referenced by cmspython3::PyBind11ProcessDesc::read(), and edm::cmspybind11_p3::readPSetsFrom().

◆ toPython11List()

template<typename T >
pybind11::list cmspython3::toPython11List ( const std::vector< T > &  v)

Definition at line 17 of file PyBind11Wrapper.h.

17  {
18  pybind11::list result = pybind11::cast(v);
19  return result;
20  }

References list(), mps_fire::result, and findQualityFiles::v.

Referenced by cmspython3::Python11ParameterSet::getParameters().

◆ toVector()

template<typename T >
std::vector<T> cmspython3::toVector ( pybind11::list l)

Definition at line 24 of file PyBind11Wrapper.h.

24  {
25  std::vector<T> result;
26  result.reserve(l.size());
27  for (unsigned i = 0; i < l.size(); ++i) {
28  result.push_back(l[i].cast<T>());
29  }
30  return result;
31  }

References mps_fire::i, cmsLHEtoEOSManager::l, and mps_fire::result.

mps_fire.i
i
Definition: mps_fire.py:355
findQualityFiles.v
v
Definition: findQualityFiles.py:179
relativeConstraints.error
error
Definition: relativeConstraints.py:53
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
Exception
Definition: hltDiff.cc:246
mps_fire.result
result
Definition: mps_fire.py:303
list
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*", "!HLTx*" if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL. It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of "!*" before the partial wildcard feature was incorporated). Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run