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, BranchIDListHelper &helper)
 

Public Attributes

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

Detailed Description

Definition at line 19 of file LHEProvenanceHelper.h.

Constructor & Destructor Documentation

◆ LHEProvenanceHelper()

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

Definition at line 20 of file LHEProvenanceHelper.cc.

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

24  : eventProductBranchDescription_(BranchDescription(InEvent,
25  "source",
26  "LHEFile"
27  // , "LHE"
28  ,
29  "LHEEventProduct",
30  "LHEEventProduct",
31  "",
32  "LHESource",
34  TypeWithDict(eventProductType.typeInfo()),
35  false)),
36  runProductBranchDescription_(BranchDescription(InRun,
37  "source",
38  "LHEFile"
39  // , "LHE"
40  ,
41  "LHERunInfoProduct",
42  "LHERunInfoProduct",
43  "",
44  "LHESource",
46  TypeWithDict(runProductType.typeInfo()),
47  false)),
51  branchListIndexes_(1, 0) {
52  // Add the products to the product registry
54  ep.setIsProvenanceSetOnRead();
55  productRegistry.copyProduct(ep);
58  productRegistry.copyProduct(rp);
59  BranchIDList bli(1UL, ep.branchID().id());
60  branchIDListHelper.updateFromInput({{bli}});
61  }
void setIsProvenanceSetOnRead(bool value=true) noexcept
BranchID const & branchID() const
BranchListIndexes branchListIndexes_
BranchDescription const runProductBranchDescription_
ParameterSet fillCommonProcessParameterSet()
Hash< ParameterSetType > ParameterSetID
ParameterSet const commonProcessParameterSet_
std::vector< BranchID::value_type > BranchIDList
Definition: BranchIDList.h:18
ProductProvenance eventProductProvenance_
BranchDescription const eventProductBranchDescription_

Member Function Documentation

◆ fillCommonProcessParameterSet()

ParameterSet edm::LHEProvenanceHelper::fillCommonProcessParameterSet ( )

Definition at line 63 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.

63  {
64  // We create a process parameter set for the "LHC" process.
65  // This function only fills parameters whose values are independent of the LHE input files.
66  // We don't currently use the untracked parameters, However, we make them available, just in case.
71  typedef std::vector<std::string> vstring;
72  vstring empty;
73 
74  vstring modlbl;
75  modlbl.reserve(1);
76  modlbl.push_back(moduleLabel);
77  pset.addParameter("@all_sources", modlbl);
78 
80  triggerPaths.addParameter<vstring>("@trigger_paths", empty);
81  pset.addParameter<ParameterSet>("@trigger_paths", triggerPaths);
82 
83  ParameterSet pseudoInput;
84  pseudoInput.addParameter<std::string>("@module_edm_type", "Source");
85  pseudoInput.addParameter<std::string>("@module_label", moduleLabel);
86  pseudoInput.addParameter<std::string>("@module_type", moduleName);
87  pset.addParameter<ParameterSet>(moduleLabel, pseudoInput);
88 
89  pset.addParameter<vstring>("@all_esmodules", empty);
90  pset.addParameter<vstring>("@all_esprefers", empty);
91  pset.addParameter<vstring>("@all_essources", empty);
92  pset.addParameter<vstring>("@all_loopers", empty);
93  pset.addParameter<vstring>("@all_modules", empty);
94  pset.addParameter<vstring>("@end_paths", empty);
95  pset.addParameter<vstring>("@paths", empty);
96  pset.addParameter<std::string>("@process_name", processName);
97  return pset;
98  }
vector< string > vstring
Definition: ExoticaDQM.cc:7
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:482
BranchDescription const eventProductBranchDescription_

◆ lheAugment()

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

Definition at line 100 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().

100  {
102  if (runInfo == nullptr)
103  return;
104  typedef std::vector<std::string> vstring;
105  auto const& heprup = *runInfo->getHEPRUP();
106  processParameterSet_.addParameter<int>("IDBMUP1", heprup.IDBMUP.first);
107  processParameterSet_.addParameter<int>("IDBMUP2", heprup.IDBMUP.second);
108  processParameterSet_.addParameter<int>("EBMUP1", heprup.EBMUP.first);
109  processParameterSet_.addParameter<int>("EBMUP2", heprup.EBMUP.second);
110  processParameterSet_.addParameter<int>("PDFGUP1", heprup.PDFGUP.first);
111  processParameterSet_.addParameter<int>("PDFGUP2", heprup.PDFGUP.second);
112  processParameterSet_.addParameter<int>("PDFSUP1", heprup.PDFSUP.first);
113  processParameterSet_.addParameter<int>("PDFSUP2", heprup.PDFSUP.second);
114  processParameterSet_.addParameter<int>("IDWTUP", heprup.IDWTUP);
115  for (auto const& header : runInfo->getHeaders()) {
117  continue;
118  }
120  }
121  }
vector< string > vstring
Definition: ExoticaDQM.cc:7
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:136
static bool isTagComparedInMerge(const std::string &tag)
ParameterSet const commonProcessParameterSet_
std::vector< std::string > vstring
Definition: Schedule.cc:482

◆ lheInit()

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

Definition at line 123 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().

123  {
124  // Now we register the process parameter set.
126  //std::cerr << processParameterSet_.dump() << std::endl;
127 
128  // Insert an entry for this process in the process history registry
130  ph.emplace_back(
132  processHistoryRegistry.registerProcessHistory(ph);
133 
134  // Save the process history ID for use every event.
135  return ph.id();
136  }
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

◆ branchListIndexes_

BranchListIndexes edm::LHEProvenanceHelper::branchListIndexes_

Definition at line 32 of file LHEProvenanceHelper.h.

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

◆ commonProcessParameterSet_

ParameterSet const edm::LHEProvenanceHelper::commonProcessParameterSet_

Definition at line 30 of file LHEProvenanceHelper.h.

Referenced by lheAugment().

◆ eventProductBranchDescription_

BranchDescription const edm::LHEProvenanceHelper::eventProductBranchDescription_

◆ eventProductProvenance_

ProductProvenance edm::LHEProvenanceHelper::eventProductProvenance_

Definition at line 29 of file LHEProvenanceHelper.h.

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

◆ processParameterSet_

ParameterSet edm::LHEProvenanceHelper::processParameterSet_

Definition at line 31 of file LHEProvenanceHelper.h.

Referenced by lheAugment(), and lheInit().

◆ runProductBranchDescription_

BranchDescription const edm::LHEProvenanceHelper::runProductBranchDescription_