CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
edm::LHEProvenanceHelper Struct Reference

#include <LHEProvenanceHelper.h>

Public Member Functions

ParameterSet fillCommonProcessParameterSet ()
 
void lheAugment (lhef::LHERunInfo const *runInfo)
 
ProcessHistoryID lheInit (ProcessHistoryRegistry &processHistoryRegistry)
 
 LHEProvenanceHelper (TypeID const &eventProductType, TypeID const &runProductType, ProductRegistry &productRegistry)
 

Public Attributes

const ParameterSet commonProcessParameterSet_
 
const BranchDescription eventProductBranchDescription_
 
ProductProvenance eventProductProvenance_
 
ParameterSet processParameterSet_
 
const BranchDescription runProductBranchDescription_
 

Detailed Description

Definition at line 17 of file LHEProvenanceHelper.h.

Constructor & Destructor Documentation

◆ LHEProvenanceHelper()

edm::LHEProvenanceHelper::LHEProvenanceHelper ( TypeID const &  eventProductType,
TypeID const &  runProductType,
ProductRegistry productRegistry 
)
explicit

Definition at line 18 of file LHEProvenanceHelper.cc.

21  : eventProductBranchDescription_(BranchDescription(InEvent,
22  "source",
23  "LHEFile"
24  // , "LHE"
25  ,
26  "LHEEventProduct",
27  "LHEEventProduct",
28  "",
29  "LHESource",
31  TypeWithDict(eventProductType.typeInfo()),
32  false)),
33  runProductBranchDescription_(BranchDescription(InRun,
34  "source",
35  "LHEFile"
36  // , "LHE"
37  ,
38  "LHERunInfoProduct",
39  "LHERunInfoProduct",
40  "",
41  "LHESource",
43  TypeWithDict(runProductType.typeInfo()),
44  false)),
48  // Add the products to the product registry
50  ep.setIsProvenanceSetOnRead();
51  productRegistry.copyProduct(ep);
54  productRegistry.copyProduct(rp);
55  }

References edm::ProductRegistry::copyProduct(), SiStripBadComponentsDQMServiceTemplate_cfg::ep, eventProductBranchDescription_, runProductBranchDescription_, and edm::BranchDescription::setIsProvenanceSetOnRead().

Member Function Documentation

◆ fillCommonProcessParameterSet()

ParameterSet edm::LHEProvenanceHelper::fillCommonProcessParameterSet ( )

Definition at line 57 of file LHEProvenanceHelper.cc.

57  {
58  // We create a process parameter set for the "LHC" process.
59  // This function only fills parameters whose values are independent of the LHE input files.
60  // We don't currently use the untracked parameters, However, we make them available, just in case.
65  typedef std::vector<std::string> vstring;
66  vstring empty;
67 
68  vstring modlbl;
69  modlbl.reserve(1);
70  modlbl.push_back(moduleLabel);
71  pset.addParameter("@all_sources", modlbl);
72 
74  triggerPaths.addParameter<vstring>("@trigger_paths", empty);
75  pset.addParameter<ParameterSet>("@trigger_paths", triggerPaths);
76 
77  ParameterSet pseudoInput;
78  pseudoInput.addParameter<std::string>("@module_edm_type", "Source");
79  pseudoInput.addParameter<std::string>("@module_label", moduleLabel);
80  pseudoInput.addParameter<std::string>("@module_type", moduleName);
81  pset.addParameter<ParameterSet>(moduleLabel, pseudoInput);
82 
83  pset.addParameter<vstring>("@all_esmodules", empty);
84  pset.addParameter<vstring>("@all_esprefers", empty);
85  pset.addParameter<vstring>("@all_essources", empty);
86  pset.addParameter<vstring>("@all_loopers", empty);
87  pset.addParameter<vstring>("@all_modules", empty);
88  pset.addParameter<vstring>("@end_paths", empty);
89  pset.addParameter<vstring>("@paths", empty);
90  pset.addParameter<std::string>("@process_name", processName);
91  return pset;
92  }

References edm::ParameterSet::addParameter(), relativeConstraints::empty, eventProductBranchDescription_, HerwigMaxPtPartonFilter_cfi::moduleLabel, edm::BranchDescription::moduleLabel(), edm::moduleName(), edm::BranchDescription::moduleName(), SimL1EmulatorRepack_CalouGT_cff::processName, edm::BranchDescription::processName(), muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, and triggerPaths.

◆ lheAugment()

void edm::LHEProvenanceHelper::lheAugment ( lhef::LHERunInfo const *  runInfo)

Definition at line 94 of file LHEProvenanceHelper.cc.

94  {
96  if (runInfo == nullptr)
97  return;
98  typedef std::vector<std::string> vstring;
99  auto const& heprup = *runInfo->getHEPRUP();
100  processParameterSet_.addParameter<int>("IDBMUP1", heprup.IDBMUP.first);
101  processParameterSet_.addParameter<int>("IDBMUP2", heprup.IDBMUP.second);
102  processParameterSet_.addParameter<int>("EBMUP1", heprup.EBMUP.first);
103  processParameterSet_.addParameter<int>("EBMUP2", heprup.EBMUP.second);
104  processParameterSet_.addParameter<int>("PDFGUP1", heprup.PDFGUP.first);
105  processParameterSet_.addParameter<int>("PDFGUP2", heprup.PDFGUP.second);
106  processParameterSet_.addParameter<int>("PDFSUP1", heprup.PDFSUP.first);
107  processParameterSet_.addParameter<int>("PDFSUP2", heprup.PDFSUP.second);
108  processParameterSet_.addParameter<int>("IDWTUP", heprup.IDWTUP);
109  for (auto const& header : runInfo->getHeaders()) {
111  continue;
112  }
114  }
115  }

References edm::ParameterSet::addParameter(), commonProcessParameterSet_, RecoTauValidation_cfi::header, LHERunInfoProduct::isTagComparedInMerge(), processParameterSet_, and submitPVValidationJobs::runInfo.

Referenced by LH5Source::LH5Source(), LHESource::LHESource(), LHESource::nextEvent(), and LH5Source::nextEvent().

◆ lheInit()

ProcessHistoryID edm::LHEProvenanceHelper::lheInit ( ProcessHistoryRegistry processHistoryRegistry)

Definition at line 117 of file LHEProvenanceHelper.cc.

117  {
118  // Now we register the process parameter set.
120  //std::cerr << processParameterSet_.dump() << std::endl;
121 
122  // Insert an entry for this process in the process history registry
123  ProcessHistory ph;
124  ph.emplace_back(
126  processHistoryRegistry.registerProcessHistory(ph);
127 
128  // Save the process history ID for use every event.
129  return ph.id();
130  }

References edm::ProcessHistory::emplace_back(), eventProductBranchDescription_, edm::getPassID(), edm::getReleaseVersion(), edm::ParameterSet::id(), edm::ProcessHistory::id(), edm::BranchDescription::processName(), processParameterSet_, edm::ParameterSet::registerIt(), and edm::ProcessHistoryRegistry::registerProcessHistory().

Referenced by LH5Source::LH5Source(), LHESource::LHESource(), LHESource::nextEvent(), and LH5Source::nextEvent().

Member Data Documentation

◆ commonProcessParameterSet_

const ParameterSet edm::LHEProvenanceHelper::commonProcessParameterSet_

Definition at line 27 of file LHEProvenanceHelper.h.

Referenced by lheAugment().

◆ eventProductBranchDescription_

const BranchDescription edm::LHEProvenanceHelper::eventProductBranchDescription_

◆ eventProductProvenance_

ProductProvenance edm::LHEProvenanceHelper::eventProductProvenance_

Definition at line 26 of file LHEProvenanceHelper.h.

Referenced by LH5Source::readEvent_(), and LHESource::readEvent_().

◆ processParameterSet_

ParameterSet edm::LHEProvenanceHelper::processParameterSet_

Definition at line 28 of file LHEProvenanceHelper.h.

Referenced by lheAugment(), and lheInit().

◆ runProductBranchDescription_

const BranchDescription edm::LHEProvenanceHelper::runProductBranchDescription_
edm::ParameterSet::registerIt
ParameterSet const & registerIt()
Definition: ParameterSet.cc:113
edm::ParameterSetID
Hash< ParameterSetType > ParameterSetID
Definition: ParameterSetID.h:21
ProducerES_cfi.ProcessHistory
ProcessHistory
Definition: ProducerES_cfi.py:14
edm::ParameterSet::id
ParameterSetID id() const
Definition: ParameterSet.cc:189
edm::getPassID
std::string getPassID()
Definition: GetPassID.h:7
edm::InRun
Definition: BranchType.h:11
edm::LHEProvenanceHelper::processParameterSet_
ParameterSet processParameterSet_
Definition: LHEProvenanceHelper.h:28
edm::vstring
std::vector< std::string > vstring
Definition: Schedule.cc:653
edm::BranchDescription::processName
std::string const & processName() const
Definition: BranchDescription.h:73
edm::InEvent
Definition: BranchType.h:11
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LHEProvenanceHelper::fillCommonProcessParameterSet
ParameterSet fillCommonProcessParameterSet()
Definition: LHEProvenanceHelper.cc:57
ParameterSet
Definition: Functions.h:16
edm::ParameterSet::addParameter
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:135
edm::LHEProvenanceHelper::eventProductProvenance_
ProductProvenance eventProductProvenance_
Definition: LHEProvenanceHelper.h:26
triggerPaths
static const std::string triggerPaths
Definition: EdmProvDump.cc:46
LHERunInfoProduct::isTagComparedInMerge
static bool isTagComparedInMerge(const std::string &tag)
Definition: LHERunInfoProduct.cc:188
edm::LHEProvenanceHelper::commonProcessParameterSet_
const ParameterSet commonProcessParameterSet_
Definition: LHEProvenanceHelper.h:27
SimL1EmulatorRepack_CalouGT_cff.processName
processName
Definition: SimL1EmulatorRepack_CalouGT_cff.py:17
edm::BranchDescription::moduleName
std::string const & moduleName() const
Definition: BranchDescription.h:115
edm::BranchDescription::moduleLabel
std::string const & moduleLabel() const
Definition: BranchDescription.h:72
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
edm::getReleaseVersion
std::string getReleaseVersion()
Definition: GetReleaseVersion.cc:7
vstring
vector< string > vstring
Definition: ExoticaDQM.cc:8
submitPVValidationJobs.runInfo
dictionary runInfo
Definition: submitPVValidationJobs.py:1013
RecoTauValidation_cfi.header
header
Definition: RecoTauValidation_cfi.py:292
edm::LHEProvenanceHelper::eventProductBranchDescription_
const BranchDescription eventProductBranchDescription_
Definition: LHEProvenanceHelper.h:24
HerwigMaxPtPartonFilter_cfi.moduleLabel
moduleLabel
Definition: HerwigMaxPtPartonFilter_cfi.py:4
edm::moduleName
std::string moduleName(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
edm::BranchDescription::setIsProvenanceSetOnRead
void setIsProvenanceSetOnRead(bool value=true) noexcept
Definition: BranchDescription.h:112
edm::BranchDescription::branchID
BranchID const & branchID() const
Definition: BranchDescription.h:74
SiStripBadComponentsDQMServiceTemplate_cfg.ep
ep
Definition: SiStripBadComponentsDQMServiceTemplate_cfg.py:86
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::LHEProvenanceHelper::runProductBranchDescription_
const BranchDescription runProductBranchDescription_
Definition: LHEProvenanceHelper.h:25