CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
cmspython3::Python11ParameterSet Class Reference

#include <Python11ParameterSet.h>

Public Member Functions

void addNewFileInPath (bool tracked, std::string const &name, std::string const &value)
 
template<typename T >
void addParameter (bool tracked, std::string const &name, T const &value)
 
template<typename T >
void addParameters (bool tracked, std::string const &name, pybind11::list value)
 unfortunate side effect: destroys the original list! More...
 
void addPSet (bool tracked, std::string const &name, Python11ParameterSet const &ppset)
 
void addVPSet (bool tracked, std::string const &name, pybind11::list value)
 
std::string dump () const
 
template<typename T >
T getParameter (bool tracked, std::string const &name) const
 
template<typename T >
pybind11::list getParameters (bool tracked, std::string const &name) const
 templated on the type of the contained object More...
 
Python11ParameterSet getPSet (bool tracked, std::string const &name) const
 
pybind11::list getVPSet (bool tracked, std::string const &name)
 
edm::ESInputTag newESInputTag (std::string const &module, std::string const &data)
 
edm::EventID newEventID (edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi, edm::EventNumber_t event)
 
edm::EventRange newEventRange (edm::RunNumber_t start, edm::LuminosityBlockNumber_t startLumi, edm::EventNumber_t startSub, edm::RunNumber_t end, edm::LuminosityBlockNumber_t endLumi, edm::EventNumber_t endSub)
 
edm::InputTag newInputTag (std::string const &label, std::string const &instance, std::string const &process)
 
edm::LuminosityBlockID newLuminosityBlockID (unsigned int run, unsigned int lumi)
 
edm::LuminosityBlockRange newLuminosityBlockRange (unsigned int start, unsigned int startSub, unsigned int end, unsigned int endSub)
 
Python11ParameterSet newPSet () const
 
edm::ParameterSetpset ()
 
edm::ParameterSet const & pset () const
 
 Python11ParameterSet ()
 
 Python11ParameterSet (edm::ParameterSet const &p)
 

Private Attributes

edm::ParameterSet theParameterSet
 

Detailed Description

Definition at line 20 of file Python11ParameterSet.h.

Constructor & Destructor Documentation

Python11ParameterSet::Python11ParameterSet ( )

Definition at line 5 of file Python11ParameterSet.cc.

Referenced by getPSet(), getVPSet(), and newPSet().

cmspython3::Python11ParameterSet::Python11ParameterSet ( edm::ParameterSet const &  p)
inline

Member Function Documentation

void Python11ParameterSet::addNewFileInPath ( bool  tracked,
std::string const &  name,
std::string const &  value 
)

Definition at line 34 of file Python11ParameterSet.cc.

References addParameter().

Referenced by newEventRange(), and PYBIND11_MODULE().

34  {
36  }
Definition: value.py:1
void addParameter(bool tracked, std::string const &name, T const &value)
template<typename T >
void cmspython3::Python11ParameterSet::addParameter ( bool  tracked,
std::string const &  name,
T const &  value 
)
inline

Definition at line 38 of file Python11ParameterSet.h.

References dataset::name, theParameterSet, and relativeConstraints::value.

Referenced by editorTools.UserCodeTool::__init__(), metTools.AddMETCollection::__init__(), trackTools.MakeAODTrackCandidates::__init__(), HiCoreTools.RestrictInputToAOD::__init__(), coreTools.RunOnData::__init__(), runJetUncertainties.RunJetUncertainties::__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties::__init__(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool::__init__(), editorTools.ChangeSource::__init__(), cmsswVersionTools.PickRelValInputFiles::__init__(), HiCoreTools.RemoveMCMatching::__init__(), coreTools.RemoveMCMatching::__init__(), trackTools.MakePATTrackCandidates::__init__(), trigTools.SwitchOnTrigger::__init__(), HiCoreTools.RemoveAllPATObjectsBut::__init__(), HiCoreTools.RemoveSpecificPATObjects::__init__(), trigTools.SwitchOnTriggerStandAlone::__init__(), trackTools.MakeTrackCandidates::__init__(), tauTools.AddTauCollection::__init__(), trigTools.SwitchOnTriggerMatching::__init__(), HiCoreTools.RemoveCleaning::__init__(), HiCoreTools.AddCleaning::__init__(), trigTools.SwitchOnTriggerMatchingStandAlone::__init__(), trigTools.SwitchOnTriggerMatchEmbedding::__init__(), jetTools.AddJetCollection::__init__(), jetTools.SwitchJetCollection::__init__(), jetTools.UpdateJetCollection::__init__(), jetTools.AddJetID::__init__(), jetTools.SetTagInfos::__init__(), addNewFileInPath(), addParameters(), addPSet(), and addVPSet().

38  {
39  if (tracked) {
40  theParameterSet.template addParameter<T>(name, value);
41  } else {
42  theParameterSet.template addUntrackedParameter<T>(name, value);
43  }
44  }
template<typename T >
void cmspython3::Python11ParameterSet::addParameters ( bool  tracked,
std::string const &  name,
pybind11::list  value 
)
inline

unfortunate side effect: destroys the original list!

Definition at line 55 of file Python11ParameterSet.h.

References addParameter(), findQualityFiles::v, and relativeConstraints::value.

55  {
56  std::vector<T> v = cmspython3::toVector<T>(value);
57  addParameter(tracked, name, v);
58  }
void addParameter(bool tracked, std::string const &name, T const &value)
void cmspython3::Python11ParameterSet::addPSet ( bool  tracked,
std::string const &  name,
Python11ParameterSet const &  ppset 
)
inline

these custom classes do seem to be a hassle to wrap, compared to, say, InputTag maybe we will need to template these someday

Definition at line 63 of file Python11ParameterSet.h.

References addParameter(), and theParameterSet.

Referenced by PYBIND11_MODULE().

63  {
64  addParameter(tracked, name, ppset.theParameterSet);
65  }
void addParameter(bool tracked, std::string const &name, T const &value)
void Python11ParameterSet::addVPSet ( bool  tracked,
std::string const &  name,
pybind11::list  value 
)

Definition at line 7 of file Python11ParameterSet.cc.

References addParameter(), findQualityFiles::v, and relativeConstraints::value.

Referenced by getPSet(), and PYBIND11_MODULE().

7  {
8  std::vector<Python11ParameterSet> v = cmspython3::toVector<Python11ParameterSet>(value);
9  std::vector<edm::ParameterSet> v2;
10  v2.reserve(v.size());
11  for (std::vector<Python11ParameterSet>::iterator ppsetItr = v.begin(), ppsetItrEnd = v.end();
12  ppsetItr != ppsetItrEnd;
13  ++ppsetItr) {
14  v2.push_back(ppsetItr->theParameterSet);
15  }
16  addParameter(tracked, name, v2);
17  }
void addParameter(bool tracked, std::string const &name, T const &value)
std::string cmspython3::Python11ParameterSet::dump ( void  ) const
inline

Definition at line 116 of file Python11ParameterSet.h.

References edm::ParameterSet::dump(), and theParameterSet.

Referenced by cmspython3::PyBind11ProcessDesc::dump(), and PYBIND11_MODULE().

116 { return theParameterSet.dump(); }
std::string dump(unsigned int indent=0) const
template<typename T >
T cmspython3::Python11ParameterSet::getParameter ( bool  tracked,
std::string const &  name 
) const
inline

Definition at line 27 of file Python11ParameterSet.h.

References dataset::name, mps_fire::result, and theParameterSet.

27  {
28  T result;
29  if (tracked) {
30  result = theParameterSet.template getParameter<T>(name);
31  } else {
32  result = theParameterSet.template getUntrackedParameter<T>(name);
33  }
34  return result;
35  }
long double T
template<typename T >
pybind11::list cmspython3::Python11ParameterSet::getParameters ( bool  tracked,
std::string const &  name 
) const
inline

templated on the type of the contained object

Definition at line 48 of file Python11ParameterSet.h.

References dataset::name, cmspython3::toPython11List(), and findQualityFiles::v.

48  {
49  std::vector<T> v = getParameter<std::vector<T> >(tracked, name);
51  }
pybind11::list toPython11List(const std::vector< T > &v)
Python11ParameterSet cmspython3::Python11ParameterSet::getPSet ( bool  tracked,
std::string const &  name 
) const
inline

Definition at line 67 of file Python11ParameterSet.h.

References addVPSet(), getVPSet(), list(), dataset::name, Python11ParameterSet(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by PYBIND11_MODULE().

67  {
68  return Python11ParameterSet(getParameter<edm::ParameterSet>(tracked, name));
69  }
pybind11::list Python11ParameterSet::getVPSet ( bool  tracked,
std::string const &  name 
)

Definition at line 19 of file Python11ParameterSet.cc.

References edm::ParameterSet::getParameterSetVector(), edm::ParameterSet::getUntrackedParameterSetVector(), checklumidiff::l, list(), Python11ParameterSet(), theParameterSet, and findQualityFiles::v.

Referenced by getPSet(), and PYBIND11_MODULE().

19  {
20  std::vector<edm::ParameterSet> const& v =
22 
23  // convert to Python11ParameterSets
25  for (std::vector<edm::ParameterSet>::const_iterator psetItr = v.begin(), psetItrEnd = v.end();
26  psetItr != psetItrEnd;
27  ++psetItr) {
28  l.append(Python11ParameterSet(*psetItr));
29  }
30 
31  return l;
32  }
VParameterSet const & getParameterSetVector(std::string const &name) const
VParameterSet getUntrackedParameterSetVector(std::string const &name, VParameterSet const &defaultValue) const
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
edm::ESInputTag cmspython3::Python11ParameterSet::newESInputTag ( std::string const &  module,
std::string const &  data 
)
inline

Definition at line 80 of file Python11ParameterSet.h.

Referenced by PYBIND11_MODULE().

80  {
81  return edm::ESInputTag(module, data);
82  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
Definition: vlib.h:208
edm::EventID cmspython3::Python11ParameterSet::newEventID ( edm::RunNumber_t  run,
edm::LuminosityBlockNumber_t  lumi,
edm::EventNumber_t  event 
)
inline

Definition at line 84 of file Python11ParameterSet.h.

Referenced by PYBIND11_MODULE().

84  {
85  return edm::EventID(run, lumi, event);
86  }
Definition: event.py:1
edm::EventRange cmspython3::Python11ParameterSet::newEventRange ( edm::RunNumber_t  start,
edm::LuminosityBlockNumber_t  startLumi,
edm::EventNumber_t  startSub,
edm::RunNumber_t  end,
edm::LuminosityBlockNumber_t  endLumi,
edm::EventNumber_t  endSub 
)
inline

Definition at line 99 of file Python11ParameterSet.h.

References addNewFileInPath(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by PYBIND11_MODULE().

104  {
105  return edm::EventRange(start, startLumi, startSub, end, endLumi, endSub);
106  }
Definition: start.py:1
#define end
Definition: vmac.h:39
edm::InputTag cmspython3::Python11ParameterSet::newInputTag ( std::string const &  label,
std::string const &  instance,
std::string const &  process 
)
inline

Definition at line 76 of file Python11ParameterSet.h.

Referenced by PYBIND11_MODULE().

76  {
78  }
static PFTauRenderPlugin instance
char const * label
edm::LuminosityBlockID cmspython3::Python11ParameterSet::newLuminosityBlockID ( unsigned int  run,
unsigned int  lumi 
)
inline

Definition at line 88 of file Python11ParameterSet.h.

Referenced by PYBIND11_MODULE().

edm::LuminosityBlockRange cmspython3::Python11ParameterSet::newLuminosityBlockRange ( unsigned int  start,
unsigned int  startSub,
unsigned int  end,
unsigned int  endSub 
)
inline

Definition at line 92 of file Python11ParameterSet.h.

Referenced by PYBIND11_MODULE().

95  {
96  return edm::LuminosityBlockRange(start, startSub, end, endSub);
97  }
Definition: start.py:1
#define end
Definition: vmac.h:39
Python11ParameterSet cmspython3::Python11ParameterSet::newPSet ( ) const
inline

Definition at line 110 of file Python11ParameterSet.h.

References Python11ParameterSet().

Referenced by PYBIND11_MODULE().

edm::ParameterSet& cmspython3::Python11ParameterSet::pset ( )
inline
edm::ParameterSet const& cmspython3::Python11ParameterSet::pset ( ) const
inline

Definition at line 114 of file Python11ParameterSet.h.

References theParameterSet.

114 { return theParameterSet; }

Member Data Documentation

edm::ParameterSet cmspython3::Python11ParameterSet::theParameterSet
private

Definition at line 119 of file Python11ParameterSet.h.

Referenced by addParameter(), addPSet(), dump(), getParameter(), getVPSet(), and pset().