CMS 3D CMS Logo

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() [1/2]

Python11ParameterSet::Python11ParameterSet ( )

Definition at line 4 of file Python11ParameterSet.cc.

4 : theParameterSet() {}

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

◆ Python11ParameterSet() [2/2]

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

Definition at line 23 of file Python11ParameterSet.h.

23 : theParameterSet(p) {}

Member Function Documentation

◆ addNewFileInPath()

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

Definition at line 31 of file Python11ParameterSet.cc.

31  {
33 }

References addParameter(), and Skims_PA_cff::name.

Referenced by PYBIND11_MODULE().

◆ addParameter()

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

◆ addParameters()

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.

54  {
55  std::vector<T> v = edm::toVector<T>(value);
56  addParameter(tracked, name, v);
57  }

References addParameter(), Skims_PA_cff::name, and findQualityFiles::v.

◆ addPSet()

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.

62  {
63  addParameter(tracked, name, ppset.theParameterSet);
64  }

References addParameter(), Skims_PA_cff::name, and theParameterSet.

Referenced by PYBIND11_MODULE().

◆ addVPSet()

void Python11ParameterSet::addVPSet ( bool  tracked,
std::string const &  name,
pybind11::list  value 
)

Definition at line 6 of file Python11ParameterSet.cc.

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 }

References addParameter(), Skims_PA_cff::name, and findQualityFiles::v.

Referenced by PYBIND11_MODULE().

◆ dump()

std::string Python11ParameterSet::dump ( void  ) const
inline

Definition at line 115 of file Python11ParameterSet.h.

115 { return theParameterSet.dump(); }

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

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

◆ getParameter()

template<typename T >
T Python11ParameterSet::getParameter ( bool  tracked,
std::string const &  name 
) const
inline

Definition at line 26 of file Python11ParameterSet.h.

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  }

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

◆ getParameters()

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.

47  {
48  std::vector<T> v = getParameter<std::vector<T> >(tracked, name);
49  return edm::toPython11List(v);
50  }

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

◆ getPSet()

Python11ParameterSet Python11ParameterSet::getPSet ( bool  tracked,
std::string const &  name 
) const
inline

Definition at line 66 of file Python11ParameterSet.h.

66  {
67  return Python11ParameterSet(getParameter<edm::ParameterSet>(tracked, name));
68  }

References Skims_PA_cff::name, and Python11ParameterSet().

Referenced by PYBIND11_MODULE().

◆ getVPSet()

pybind11::list Python11ParameterSet::getVPSet ( bool  tracked,
std::string const &  name 
)

Definition at line 17 of file Python11ParameterSet.cc.

17  {
18  std::vector<edm::ParameterSet> const& v =
20 
21  // convert to Python11ParameterSets
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 }

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

Referenced by PYBIND11_MODULE().

◆ newESInputTag()

edm::ESInputTag Python11ParameterSet::newESInputTag ( std::string const &  module,
std::string const &  data 
)
inline

Definition at line 79 of file Python11ParameterSet.h.

79  {
80  return edm::ESInputTag(module, data);
81  }

References data.

Referenced by PYBIND11_MODULE().

◆ newEventID()

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.

83  {
84  return edm::EventID(run, lumi, event);
85  }

References writedatasetfile::run.

Referenced by PYBIND11_MODULE().

◆ newEventRange()

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.

103  {
104  return edm::EventRange(start, startLumi, startSub, end, endLumi, endSub);
105  }

References end.

Referenced by PYBIND11_MODULE().

◆ newInputTag()

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.

75  {
77  }

References HLT_2018_cff::InputTag, instance, label, and LaserDQM_cfg::process.

Referenced by PYBIND11_MODULE().

◆ newLuminosityBlockID()

edm::LuminosityBlockID Python11ParameterSet::newLuminosityBlockID ( unsigned int  run,
unsigned int  lumi 
)
inline

Definition at line 87 of file Python11ParameterSet.h.

87  {
89  }

References writedatasetfile::run.

Referenced by PYBIND11_MODULE().

◆ newLuminosityBlockRange()

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.

94  {
95  return edm::LuminosityBlockRange(start, startSub, end, endSub);
96  }

References end.

Referenced by PYBIND11_MODULE().

◆ newPSet()

Python11ParameterSet Python11ParameterSet::newPSet ( ) const
inline

Definition at line 109 of file Python11ParameterSet.h.

109 { return Python11ParameterSet(); }

References Python11ParameterSet().

Referenced by PYBIND11_MODULE().

◆ pset() [1/2]

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

Definition at line 111 of file Python11ParameterSet.h.

111 { return theParameterSet; }

References theParameterSet.

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

◆ pset() [2/2]

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

Definition at line 113 of file Python11ParameterSet.h.

113 { return theParameterSet; }

References theParameterSet.

Member Data Documentation

◆ theParameterSet

edm::ParameterSet Python11ParameterSet::theParameterSet
private

Definition at line 118 of file Python11ParameterSet.h.

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

edm::toPython11List
pybind11::list toPython11List(const std::vector< T > &v)
Definition: PyBind11Wrapper.h:17
edm::ESInputTag
Definition: ESInputTag.h:87
start
Definition: start.py:1
edm::ParameterSet::getUntrackedParameterSetVector
VParameterSet getUntrackedParameterSetVector(std::string const &name, VParameterSet const &defaultValue) const
Definition: ParameterSet.cc:2161
Python11ParameterSet::addParameter
void addParameter(bool tracked, std::string const &name, T const &value)
Definition: Python11ParameterSet.h:37
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
findQualityFiles.v
v
Definition: findQualityFiles.py:179
end
#define end
Definition: vmac.h:39
edm::FileInPath
Definition: FileInPath.h:64
edm::ParameterSet::dump
std::string dump(unsigned int indent=0) const
Definition: ParameterSet.cc:825
edm::LuminosityBlockID
Definition: LuminosityBlockID.h:31
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
Python11ParameterSet::theParameterSet
edm::ParameterSet theParameterSet
Definition: Python11ParameterSet.h:118
LaserDQM_cfg.process
process
Definition: LaserDQM_cfg.py:3
value
Definition: value.py:1
module
Definition: vlib.h:198
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
Python11ParameterSet::Python11ParameterSet
Python11ParameterSet()
Definition: Python11ParameterSet.cc:4
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
writedatasetfile.run
run
Definition: writedatasetfile.py:27
T
long double T
Definition: Basic3DVectorLD.h:48
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
edm::ParameterSet::getParameterSetVector
VParameterSet const & getParameterSetVector(std::string const &name) const
Definition: ParameterSet.cc:2153
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
event
Definition: event.py:1
edm::EventID
Definition: EventID.h:31
edm::EventRange
Definition: EventRange.h:31
lumi
Definition: LumiSectionData.h:20
label
const char * label
Definition: PFTauDecayModeTools.cc:11
edm::LuminosityBlockRange
Definition: LuminosityBlockRange.h:32