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

ParameterSet const commonProcessParameterSet_
 
BranchDescription const eventProductBranchDescription_
 
ProductProvenance eventProductProvenance_
 
ParameterSet processParameterSet_
 
BranchDescription const 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.

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

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  }
void setIsProvenanceSetOnRead(bool value=true) noexcept
BranchID const & branchID() const
BranchDescription const runProductBranchDescription_
ParameterSet fillCommonProcessParameterSet()
Hash< ParameterSetType > ParameterSetID
ParameterSet const commonProcessParameterSet_
ProductProvenance eventProductProvenance_
BranchDescription const eventProductBranchDescription_

Member Function Documentation

◆ fillCommonProcessParameterSet()

ParameterSet edm::LHEProvenanceHelper::fillCommonProcessParameterSet ( )

Definition at line 57 of file LHEProvenanceHelper.cc.

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.

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  }
vector< string > vstring
Definition: ExoticaDQM.cc:8
std::string const & moduleName() const
std::string const & processName() const
std::string moduleName(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
static std::string const triggerPaths
Definition: EdmProvDump.cc:48
std::string const & moduleLabel() const
std::vector< std::string > vstring
Definition: Schedule.cc:475
BranchDescription const eventProductBranchDescription_

◆ lheAugment()

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

Definition at line 94 of file LHEProvenanceHelper.cc.

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().

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  }
vector< string > vstring
Definition: ExoticaDQM.cc:8
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:135
static bool isTagComparedInMerge(const std::string &tag)
ParameterSet const commonProcessParameterSet_
std::vector< std::string > vstring
Definition: Schedule.cc:475

◆ lheInit()

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

Definition at line 117 of file LHEProvenanceHelper.cc.

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

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

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
124  ph.emplace_back(
126  processHistoryRegistry.registerProcessHistory(ph);
127 
128  // Save the process history ID for use every event.
129  return ph.id();
130  }
std::string getPassID()
Definition: GetPassID.h:7
std::string const & processName() const
ParameterSetID id() const
ParameterSet const & registerIt()
std::string getReleaseVersion()
BranchDescription const eventProductBranchDescription_

Member Data Documentation

◆ commonProcessParameterSet_

ParameterSet const edm::LHEProvenanceHelper::commonProcessParameterSet_

Definition at line 27 of file LHEProvenanceHelper.h.

Referenced by lheAugment().

◆ eventProductBranchDescription_

BranchDescription const 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_

BranchDescription const edm::LHEProvenanceHelper::runProductBranchDescription_