CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
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 19 of file Python11ParameterSet.h.

Constructor & Destructor Documentation

Python11ParameterSet::Python11ParameterSet ( )

Definition at line 4 of file Python11ParameterSet.cc.

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

4 : theParameterSet() {}
edm::ParameterSet theParameterSet
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 31 of file Python11ParameterSet.cc.

References addParameter().

Referenced by PYBIND11_MODULE().

31  {
33 }
void addParameter(bool tracked, std::string const &name, T const &value)
template<typename T >
void Python11ParameterSet::addParameter ( bool  tracked,
std::string const &  name,
T const &  value 
)
inline

Definition at line 37 of file Python11ParameterSet.h.

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

Referenced by metTools.AddMETCollection::__init__(), trackTools.MakeAODTrackCandidates::__init__(), coreTools.RunOnData::__init__(), runJetUncertainties.RunJetUncertainties::__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties::__init__(), cmsswVersionTools.PickRelValInputFiles::__init__(), coreTools.RemoveMCMatching::__init__(), trackTools.MakePATTrackCandidates::__init__(), trigTools.SwitchOnTrigger::__init__(), trigTools.SwitchOnTriggerStandAlone::__init__(), tauTools.AddTauCollection::__init__(), trackTools.MakeTrackCandidates::__init__(), trigTools.SwitchOnTriggerMatching::__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().

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

unfortunate side effect: destroys the original list!

Definition at line 54 of file Python11ParameterSet.h.

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

54  {
55  std::vector<T> v = edm::toVector<T>(value);
56  addParameter(tracked, name, v);
57  }
void addParameter(bool tracked, std::string const &name, T const &value)
void 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 62 of file Python11ParameterSet.h.

References addParameter(), and theParameterSet.

Referenced by PYBIND11_MODULE().

62  {
63  addParameter(tracked, name, ppset.theParameterSet);
64  }
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 6 of file Python11ParameterSet.cc.

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

Referenced by PYBIND11_MODULE().

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

Definition at line 115 of file Python11ParameterSet.h.

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

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

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

Definition at line 26 of file Python11ParameterSet.h.

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

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

templated on the type of the contained object

Definition at line 47 of file Python11ParameterSet.h.

References mergeVDriftHistosByStation::name, edm::toPython11List(), and findQualityFiles::v.

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

Definition at line 66 of file Python11ParameterSet.h.

References Python11ParameterSet().

Referenced by PYBIND11_MODULE().

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

Definition at line 17 of file Python11ParameterSet.cc.

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

Referenced by PYBIND11_MODULE().

17  {
18  std::vector<edm::ParameterSet> const& v =
20 
21  // convert to Python11ParameterSets
22  pybind11::list l;
23  for (std::vector<edm::ParameterSet>::const_iterator psetItr = v.begin(), psetItrEnd = v.end(); psetItr != psetItrEnd;
24  ++psetItr) {
25  l.append(Python11ParameterSet(*psetItr));
26  }
27 
28  return l;
29 }
VParameterSet const & getParameterSetVector(std::string const &name) const
edm::ParameterSet theParameterSet
VParameterSet getUntrackedParameterSetVector(std::string const &name, VParameterSet const &defaultValue) const
edm::ESInputTag Python11ParameterSet::newESInputTag ( std::string const &  module,
std::string const &  data 
)
inline

Definition at line 79 of file Python11ParameterSet.h.

Referenced by PYBIND11_MODULE().

79  {
80  return edm::ESInputTag(module, data);
81  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
tuple module
Definition: callgraph.py:69
edm::EventID Python11ParameterSet::newEventID ( edm::RunNumber_t  run,
edm::LuminosityBlockNumber_t  lumi,
edm::EventNumber_t  event 
)
inline

Definition at line 83 of file Python11ParameterSet.h.

Referenced by PYBIND11_MODULE().

83  {
84  return edm::EventID(run, lumi, event);
85  }
list lumi
Definition: dqmdumpme.py:53
edm::EventRange 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 98 of file Python11ParameterSet.h.

Referenced by PYBIND11_MODULE().

103  {
104  return edm::EventRange(start, startLumi, startSub, end, endLumi, endSub);
105  }
string end
Definition: dataset.py:937
edm::InputTag Python11ParameterSet::newInputTag ( std::string const &  label,
std::string const &  instance,
std::string const &  process 
)
inline

Definition at line 75 of file Python11ParameterSet.h.

References HLT_FULL_cff::InputTag.

Referenced by PYBIND11_MODULE().

75  {
77  }
static PFTauRenderPlugin instance
char const * label
tuple process
Definition: LaserDQM_cfg.py:3
edm::LuminosityBlockID Python11ParameterSet::newLuminosityBlockID ( unsigned int  run,
unsigned int  lumi 
)
inline

Definition at line 87 of file Python11ParameterSet.h.

Referenced by PYBIND11_MODULE().

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

Definition at line 91 of file Python11ParameterSet.h.

Referenced by PYBIND11_MODULE().

94  {
95  return edm::LuminosityBlockRange(start, startSub, end, endSub);
96  }
string end
Definition: dataset.py:937
Python11ParameterSet Python11ParameterSet::newPSet ( ) const
inline

Definition at line 109 of file Python11ParameterSet.h.

References Python11ParameterSet().

Referenced by PYBIND11_MODULE().

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

Definition at line 111 of file Python11ParameterSet.h.

References theParameterSet.

Referenced by PyBind11ProcessDesc::parameterSet(), and edm::cmspybind11::readPSetsFrom().

111 { return theParameterSet; }
edm::ParameterSet theParameterSet
edm::ParameterSet const& Python11ParameterSet::pset ( ) const
inline

Definition at line 113 of file Python11ParameterSet.h.

References theParameterSet.

113 { return theParameterSet; }
edm::ParameterSet theParameterSet

Member Data Documentation

edm::ParameterSet Python11ParameterSet::theParameterSet
private

Definition at line 118 of file Python11ParameterSet.h.

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