26 #include "boost/program_options.hpp" 36 typedef std::map<std::string, std::vector<edm::BranchDescription> >
IdToBranches;
47 typedef std::map<edm::ParameterSetID, edm::ParameterSetBlob>
ParameterSetMap;
58 simpleId_(iSimpleId) {
61 void addChild(HistoryNode
const&
child) {
62 children_.push_back(child);
66 parameterSetID()
const {
67 return config_.parameterSetID();
72 return config_.processName();
77 return children_.size();
82 return &children_.back();
85 typedef std::vector<HistoryNode>::const_iterator const_iterator;
86 typedef std::vector<HistoryNode>::iterator iterator;
88 iterator
begin() {
return children_.begin();}
89 iterator
end() {
return children_.end();}
91 const_iterator
begin()
const {
return children_.begin();}
92 const_iterator
end()
const {
return children_.end();}
94 void print(std::ostream& os)
const {
95 os << config_.processName()
96 <<
" '" << config_.passID() <<
"' '" 97 << config_.releaseVersion() <<
"' [" 99 << config_.parameterSetID() <<
")" 104 void printEventSetupHistory(ParameterSetMap
const& iPSM,
105 std::vector<std::string>
const& iFindMatch,
106 std::ostream& oErrorLog)
const;
107 void printOtherModulesHistory(ParameterSetMap
const& iPSM,
109 std::vector<std::string>
const& iFindMatch,
110 std::ostream& oErrorLog)
const;
111 void printTopLevelPSetsHistory(ParameterSetMap
const& iPSM,
112 std::vector<std::string>
const& iFindMatch,
113 std::ostream& oErrorLog)
const;
116 configurationID()
const {
123 std::vector<HistoryNode> children_;
124 unsigned int simpleId_;
127 std::ostream&
operator<<(std::ostream& os, HistoryNode
const& node) {
131 bool HistoryNode::sort_ =
false;
138 for(
auto const&
process : iHist) {
140 <<
process.processName() <<
" '" 142 <<
process.releaseVersion() <<
"' (" 143 <<
process.parameterSetID() <<
")" 145 indent += indentDelta;
150 void HistoryNode::printHistory(
std::string const& iIndent)
const {
153 for(
auto const& item : *
this) {
155 item.printHistory(indent + indentDelta);
163 std::ostringstream
result;
170 result << iType <<
": " << name <<
" " << iProcessName <<
"\n" 176 void HistoryNode::printEventSetupHistory(ParameterSetMap
const& iPSM,
177 std::vector<std::string>
const& iFindMatch,
178 std::ostream& oErrorLog)
const {
179 for(
auto const& itH : *
this) {
181 ParameterSetMap::const_iterator itFind = iPSM.find(itH.parameterSetID());
182 if(itFind == iPSM.end()){
183 oErrorLog <<
"No ParameterSetID for " << itH.parameterSetID() << std::endl;
186 std::vector<std::string> sourceStrings, moduleStrings;
188 std::vector<std::string> sources = processConfig.
getParameter<std::vector<std::string> >(
"@all_essources");
189 for(
auto& itM : sources) {
194 bool foundMatch =
true;
195 if(!iFindMatch.empty()) {
196 for (
auto const& stringToFind : iFindMatch) {
197 if (retValue.find(stringToFind) == std::string::npos) {
204 sourceStrings.push_back(
std::move(retValue));
208 std::vector<std::string>
modules = processConfig.getParameter<std::vector<std::string> >(
"@all_esmodules");
209 for(
auto& itM : modules) {
214 bool foundMatch =
true;
215 if(!iFindMatch.empty()) {
216 for (
auto const& stringToFind : iFindMatch) {
217 if (retValue.find(stringToFind) == std::string::npos) {
224 moduleStrings.push_back(
std::move(retValue));
228 std::sort(sourceStrings.begin(), sourceStrings.end());
229 std::sort(moduleStrings.begin(), moduleStrings.end());
231 std::copy(sourceStrings.begin(), sourceStrings.end(),
232 std::ostream_iterator<std::string>(
std::cout,
"\n"));
233 std::copy(moduleStrings.begin(), moduleStrings.end(),
234 std::ostream_iterator<std::string>(
std::cout,
"\n"));
237 itH.printEventSetupHistory(iPSM, iFindMatch, oErrorLog);
244 std::ostringstream
result;
248 result <<
"Module: " << label <<
" " << iProcessName <<
"\n" <<
" parameters: ";
253 void HistoryNode::printOtherModulesHistory(ParameterSetMap
const& iPSM,
255 std::vector<std::string>
const& iFindMatch,
256 std::ostream& oErrorLog)
const {
257 for(
auto const& itH : *
this) {
259 ParameterSetMap::const_iterator itFind = iPSM.find(itH.parameterSetID());
260 if(itFind == iPSM.end()){
261 oErrorLog <<
"No ParameterSetID for " << itH.parameterSetID() << std::endl;
264 std::vector<std::string> moduleStrings;
266 std::vector<std::string>
modules = processConfig.getParameter<std::vector<std::string> >(
"@all_modules");
267 for(
auto& itM : modules) {
269 if(iModules.end() == iModules.find(std::make_pair(itH.processName(), itM))) {
274 bool foundMatch =
true;
275 if(!iFindMatch.empty()) {
276 for (
auto const& stringToFind : iFindMatch) {
277 if (retValue.find(stringToFind) == std::string::npos) {
284 moduleStrings.push_back(
std::move(retValue));
289 std::sort(moduleStrings.begin(), moduleStrings.end());
291 std::copy(moduleStrings.begin(), moduleStrings.end(),
292 std::ostream_iterator<std::string>(
std::cout,
"\n"));
294 itH.printOtherModulesHistory(iPSM, iModules, iFindMatch, oErrorLog);
298 static void appendToSet(std::set<std::string>&iSet, std::vector<std::string>
const& iFrom){
299 for(
auto const&
n : iFrom) {
307 std::ostringstream
result;
310 result <<
"PSet: " << iName <<
" " << iProcessName <<
"\n" <<
" parameters: ";
316 void HistoryNode::printTopLevelPSetsHistory(ParameterSetMap
const& iPSM,
317 std::vector<std::string>
const& iFindMatch,
318 std::ostream& oErrorLog)
const {
319 for(
auto const& itH : *
this) {
321 ParameterSetMap::const_iterator itFind = iPSM.find(itH.parameterSetID());
322 if(itFind == iPSM.end()){
323 oErrorLog <<
"No ParameterSetID for " << itH.parameterSetID() << std::endl;
327 std::set<std::string> namesToExclude;
328 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_modules"));
329 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_sources"));
330 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_loopers"));
332 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_esmodules"));
333 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_essources"));
334 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_esprefers"));
335 if (processConfig.existsAs<std::vector<std::string>>(
"all_aliases")) {
336 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_aliases"));
339 std::vector<std::string> allNames{};
340 processConfig.getParameterSetNames(allNames);
342 std::vector<std::string>
results;
343 for(
auto const&
name: allNames){
344 if (
name.empty() ||
'@' ==
name[0] || namesToExclude.find(
name)!=namesToExclude.end()) {
349 bool foundMatch =
true;
350 if(!iFindMatch.empty()) {
351 for (
auto const& stringToFind : iFindMatch) {
352 if (retValue.find(stringToFind) == std::string::npos) {
363 std::sort(results.begin(), results.end());
365 std::copy(results.begin(), results.end(),
366 std::ostream_iterator<std::string>(
std::cout,
"\n"));
368 itH.printTopLevelPSetsHistory(iPSM, iFindMatch, oErrorLog);
374 std::unique_ptr<TFile>
377 std::unique_ptr<edm::SiteLocalConfig> slcptr = std::make_unique<edm::service::SiteLocalConfigService>(
edm::ParameterSet());
378 auto slc = std::make_shared<edm::serviceregistry::ServiceWrapper<edm::SiteLocalConfig> >(
std::move(slcptr));
383 fileNames.push_back(filename);
387 <<
"File " << filename <<
" was not found or could not be opened.\n";
390 std::unique_ptr<TFile>
result(TFile::Open(catalog.
fileNames()[0].c_str()));
393 <<
"File " << fileNames[0] <<
" was not found or could not be opened.\n";
402 std::unique_ptr<TFile>
405 std::unique_ptr<TFile>
result(TFile::Open(filename.c_str()));
409 return makeTFileWithLookup(filename);
417 char const* trackiness = (psetEntry.
isTracked()?
"tracked":
"untracked");
418 os <<
"PSet " << trackiness <<
" = (";
419 prettyPrint(os, psetEntry.
pset(), iIndent + iIndentDelta, iIndentDelta);
425 std::vector<edm::ParameterSet>
const& vps = vpsetEntry.
vpset();
426 os <<
"VPSet " << (vpsetEntry.
isTracked() ?
"tracked" :
"untracked") <<
" = ({" << std::endl;
430 for(
auto const& item : vps) {
431 os << start << newIndent;
438 os << iIndent<<
"})";
446 oStream <<
"{" << std::endl;
447 for(
auto const& item : iPSet.
tbl()) {
449 oStream << newIndent<< item.first <<
": " << item.second << std::endl;
451 for(
auto const& item : iPSet.
psetTable()) {
454 oStream << newIndent << item.first <<
": ";
461 oStream << newIndent << item.first <<
": ";
465 oStream << iIndent<<
"}";
476 bool showDependencies,
477 bool extendedAncestors,
478 bool extendedDescendants,
479 bool excludeESModules,
481 bool showTopLevelPSets,
482 std::vector<std::string>
const& findMatch,
483 bool dontPrintProducts,
491 void printErrors(std::ostream& os);
492 int exitCode()
const;
497 std::set<edm::BranchID>& ancestorBranchIDs,
498 std::ostringstream& sout,
501 void addDescendants(
edm::BranchID const& branchID, std::set<edm::BranchID>& descendantBranchIDs,
502 std::ostringstream& sout,
527 void dumpProcessHistory_();
528 void dumpEventFilteringParameterSets_(TFile *
file);
534 bool showDependencies,
535 bool extendedAncestors,
536 bool extendedDescendants,
537 bool excludeESModules,
538 bool showOtherModules,
539 bool showTopLevelPSets,
540 std::vector<std::string>
const& findMatch,
541 bool dontPrintProducts,
544 inputFile_(makeTFile(filename)),
548 showDependencies_(showDependencies),
549 extendedAncestors_(extendedAncestors),
550 extendedDescendants_(extendedDescendants),
551 excludeESModules_(excludeESModules),
552 showOtherModules_(showOtherModules),
553 productRegistryPresent_(
true),
554 showTopLevelPSets_(showTopLevelPSets),
555 findMatch_(findMatch),
556 dontPrintProducts_(dontPrintProducts),
557 dumpPSetID_(dumpPSetID) {
579 std::cout <<
"No event filtering information is available.\n";
580 std::cout <<
"------------------------------\n";
582 std::cout <<
"Event filtering information for " 584 <<
" processing steps is available.\n" 585 <<
"The ParameterSets will be printed out, " 586 <<
"with the oldest printed first.\n";
597 if(history !=
nullptr) {
602 if(history->GetEntry(0) <= 0) {
603 std::cout <<
"No event filtering information is available; the event history tree has no entries\n";
609 assert (events !=
nullptr);
611 if (eventSelectionsBranch ==
nullptr)
return;
614 eventSelectionsBranch->SetAddress(&pids);
615 if(eventSelectionsBranch->GetEntry(0) <= 0) {
616 std::cout <<
"No event filtering information is available; the event selections branch has no entries\n";
625 std::cout <<
"ParameterSetID: " <<
id <<
'\n';
627 ParameterSetMap::const_iterator
i =
psm_.find(
id);
628 if(i ==
psm_.end()) {
629 std::cout <<
"We are unable to find the corresponding ParameterSet\n";
632 if(
id == empty.
id()) {
633 std::cout <<
"But it would have been empty anyway\n";
643 std::cout <<
" -------------------------\n";
648 std::cout <<
"Processing History:" << std::endl;
649 std::map<edm::ProcessConfigurationID, unsigned int> simpleIDs;
650 for(
auto const& ph :
phv_) {
653 for(
auto const& pc : ph) {
654 if(parent->size() == 0) {
655 unsigned int id = simpleIDs[pc.id()];
658 simpleIDs[pc.id()] =
id;
660 parent->addChild(HistoryNode(pc,
id));
661 parent = parent->lastChildAddress();
664 bool isUnique =
true;
665 for(
auto& child : *parent) {
666 if(child.configurationID() == pc.id()) {
673 simpleIDs[pc.id()] = parent->size() + 1;
674 parent->addChild(HistoryNode(pc, simpleIDs[pc.id()]));
675 parent = parent->lastChildAddress();
687 assert(
nullptr != meta);
696 ParameterSetMap* pPsm = &
psm_;
701 assert(
nullptr != psetTree);
702 typedef std::pair<edm::ParameterSetID, edm::ParameterSetBlob> IdToBlobs;
704 IdToBlobs* pIdToBlob = &idToBlob;
706 for(
long long i = 0;
i != psetTree->GetEntries(); ++
i) {
707 psetTree->GetEntry(
i);
708 psm_.insert(idToBlob);
732 assert(
nullptr != pReg);
735 for(
auto const& item :
psm_) {
737 pset.setID(item.first);
743 for(
auto const& history :
phv_) {
744 for(
auto const&
process : history) {
753 else if(!phm.empty()) {
754 for(
auto const& history : phm) {
755 phv_.push_back(history.second);
756 for(
auto const&
process : history.second) {
769 throw cms::Exception(
"Command Line Argument") <<
"Illegal ParameterSetID string. It should contain 32 hexadecimal characters";
776 std::map<edm::BranchID, std::set<edm::ParentageID> > perProductParentage;
780 if(
nullptr == parentageTree) {
781 std::cerr <<
"ERROR, no Parentage tree available so cannot show dependencies, ancestors, or descendants.\n";
782 std::cerr <<
"Possibly this is not a standard EDM format file. For example, dependency, ancestor, and\n";
783 std::cerr <<
"descendant options to edmProvDump will not work with nanoAOD format files.\n\n";
791 std::vector<edm::ParentageID> orderedParentageIDs;
792 orderedParentageIDs.reserve(parentageTree->GetEntries());
797 parentageTree->GetEntry(
i);
799 orderedParentageIDs.push_back(parentageBuffer.
id());
804 if(
nullptr == eventMetaTree) {
807 if(
nullptr == eventMetaTree) {
815 if(
nullptr!=storedProvBranch) {
816 std::vector<edm::StoredProductProvenance>
info;
817 std::vector<edm::StoredProductProvenance>* pInfo = &
info;
818 storedProvBranch->SetAddress(&pInfo);
819 for(Long64_t
i = 0, numEntries = eventMetaTree->GetEntries();
i <
numEntries; ++
i) {
820 storedProvBranch->GetEntry(
i);
821 for(
auto const& item : info) {
823 perProductParentage[bid].insert(orderedParentageIDs.at(item.parentageIDIndex_));
829 if (
nullptr != productProvBranch) {
830 std::vector<edm::ProductProvenance>
info;
831 std::vector<edm::ProductProvenance>* pInfo = &
info;
832 productProvBranch->SetAddress(&pInfo);
833 for(Long64_t
i = 0, numEntries = eventMetaTree->GetEntries();
i <
numEntries; ++
i) {
834 productProvBranch->GetEntry(
i);
835 for(
auto const& item : info) {
836 perProductParentage[item.branchID()].insert(item.parentageID());
840 std::cerr <<
" ERROR, could not find provenance information so can not show dependencies\n";
850 std::map<edm::BranchID, std::set<edm::BranchID> > parentToChildren;
854 for (
auto const& itParentageSet : perProductParentage) {
856 for (
auto const& itParentageID : itParentageSet.second) {
858 if(
nullptr != parentage) {
860 parentToChildren[
branch].insert(childBranchID);
863 std::cerr <<
" ERROR:parentage info not in registry ParentageID=" << itParentageID << std::endl;
875 std::cout <<
"---------Producers with data in file---------" << std::endl;
883 std::map<edm::BranchID, std::string> branchIDToBranchName;
885 for(
auto const& processConfig :
phc_) {
887 if(
nullptr == processParameterSet || processParameterSet->
empty()) {
891 auto& product = item.second;
892 if(product.processName() != processConfig.processName()) {
899 branchIDToBranchName[product.branchID()] = product.branchName();
906 if(moduleLabel ==
source) {
919 s << moduleParameterSetCopy.
id();
921 s << moduleParameterSet.
id();
923 moduleToIdBranches[std::make_pair(product.processName(), product.moduleLabel())][s.str()].push_back(product);
928 for(
auto const& item : moduleToIdBranches) {
929 std::ostringstream sout;
930 sout <<
"Module: " << item.first.second <<
" " << item.first.first << std::endl;
931 std::set<edm::BranchID> allBranchIDsForLabelAndProcess;
933 for(
auto const& idBranch : idToBranches) {
934 sout <<
" PSet id:" << idBranch.first << std::endl;
936 sout <<
" products: {" << std::endl;
938 std::set<edm::BranchID> branchIDs;
939 for(
auto const&
branch : idBranch.second) {
941 sout <<
" " <<
branch.branchName() << std::endl;
943 branchIDs.insert(
branch.branchID());
944 allBranchIDsForLabelAndProcess.insert(
branch.branchID());
946 sout <<
" }" << std::endl;
948 ParameterSetMap::const_iterator itpsm = psm_.find(psid);
949 if(psm_.end() == itpsm) {
951 errorLog_ <<
"No ParameterSetID for " << psid << std::endl;
954 sout <<
" parameters: ";
960 sout <<
" dependencies: {" << std::endl;
961 std::set<edm::ParentageID> parentageIDs;
962 for(
auto const&
branch : branchIDs) {
965 std::set<edm::ParentageID>
const&
temp = perProductParentage[
branch];
966 parentageIDs.insert(temp.begin(), temp.end());
968 for(
auto const& parentID : parentageIDs) {
970 if(
nullptr != parentage) {
972 sout <<
" " << branchIDToBranchName[
branch] << std::endl;
975 sout <<
" ERROR:parentage info not in registry ParentageID=" << parentID << std::endl;
978 if(parentageIDs.empty()) {
979 sout <<
" no dependencies recorded (event may not contain data from this module)" << std::endl;
981 sout <<
" }" << std::endl;
985 sout <<
" extendedAncestors: {" << std::endl;
986 std::set<edm::BranchID> ancestorBranchIDs;
987 for (
auto const& branchID : allBranchIDsForLabelAndProcess) {
988 addAncestors(branchID, ancestorBranchIDs, sout, perProductParentage);
990 for (
auto const& ancestorBranchID : ancestorBranchIDs) {
991 sout <<
" " << branchIDToBranchName[ancestorBranchID] <<
"\n";
993 sout <<
" }" << std::endl;
997 sout <<
" extendedDescendants: {" << std::endl;
998 std::set<edm::BranchID> descendantBranchIDs;
999 for (
auto const& branchID : allBranchIDsForLabelAndProcess) {
1000 addDescendants(branchID, descendantBranchIDs, sout, parentToChildren);
1002 for (
auto const& descendantBranchID : descendantBranchIDs) {
1003 sout <<
" " << branchIDToBranchName[descendantBranchID] <<
"\n";
1005 sout <<
" }" << std::endl;
1007 bool foundMatch =
true;
1009 for (
auto const& stringToFind :
findMatch_) {
1010 if (sout.str().find(stringToFind) == std::string::npos) {
1022 std::cout <<
"---------Other Modules---------" << std::endl;
1025 std::cout <<
"---------All Modules---------" << std::endl;
1030 std::cout <<
"---------EventSetup---------" << std::endl;
1035 std::cout <<
"---------Top Level PSets---------" << std::endl;
1049 std::set<edm::ParentageID>
const& parentIDs = perProductParentage[branchID];
1050 for (
auto const& parentageID : parentIDs) {
1052 if(
nullptr != parentage) {
1055 if(ancestorBranchIDs.insert(
branch).second) {
1060 sout <<
" ERROR:parentage info not in registry ParentageID=" << parentageID << std::endl;
1069 for (
auto const& childBranchID : parentToChildren[branchID]) {
1070 if (descendantBranchIDs.insert(childBranchID).second) {
1071 addDescendants(childBranchID, descendantBranchIDs, sout, parentToChildren);
1101 using namespace boost::program_options;
1104 descString +=
" [options] <filename>";
1105 descString +=
"\nAllowed options";
1106 options_description desc(descString);
1110 ,
"alphabetially sort EventSetup components")
1112 ,
"print what data each EDProducer is directly dependent upon")
1113 (kExtendedAncestorsCommandOpt
1114 ,
"print what data each EDProducer is dependent upon including indirect dependences")
1116 ,
"print what data depends on the data each EDProducer produces including indirect dependences")
1117 (kExcludeESModulesCommandOpt
1118 ,
"do not print ES module information")
1120 ,
"show all modules (not just those that created data in the file)")
1121 (kShowTopLevelPSetsCommandOpt,
"show all top level PSets")
1123 "show only modules whose information contains the matching string (or all the matching strings, this option can be repeated with different strings)")
1125 ,
"do not print products produced by module")
1126 (kDumpPSetIDCommandOpt, value<std::string>()
1127 ,
"print the parameter set associated with the parameter set ID string (and print nothing else)")
1131 options_description hidden;
1132 hidden.add_options()(
kFileNameOpt, value<std::string>(),
"file name");
1135 options_description cmdline_options;
1136 cmdline_options.add(desc).add(hidden);
1138 positional_options_description
p;
1139 p.add(kFileNameOpt, -1);
1143 store(command_line_parser(argc, argv).
options(cmdline_options).positional(p).
run(), vm);
1145 }
catch(
error const& iException) {
1150 if(vm.count(kHelpOpt)) {
1155 if(vm.count(kSortOpt)) {
1156 HistoryNode::sort_ =
true;
1159 bool showDependencies =
false;
1160 if(vm.count(kDependenciesOpt)) {
1161 showDependencies =
true;
1164 bool extendedAncestors =
false;
1165 if(vm.count(kExtendedAncestorsOpt)) {
1166 extendedAncestors =
true;
1169 bool extendedDescendants =
false;
1170 if(vm.count(kExtendedDescendantsOpt)) {
1171 extendedDescendants =
true;
1174 bool excludeESModules =
false;
1175 if(vm.count(kExcludeESModulesOpt)) {
1176 excludeESModules =
true;
1179 bool showAllModules =
false;
1180 if(vm.count(kShowAllModulesOpt)) {
1181 showAllModules =
true;
1184 bool showTopLevelPSets =
false;
1185 if(vm.count(kShowTopLevelPSetsOpt)) {
1186 showTopLevelPSets=
true;
1190 if(vm.count(kFileNameOpt)) {
1193 }
catch(boost::bad_any_cast
const&
e) {
1198 std::cout <<
"Data file not specified." << std::endl;
1204 if(vm.count(kDumpPSetIDOpt)) {
1207 }
catch(boost::bad_any_cast
const&
e) {
1213 std::vector<std::string> findMatch;
1214 if(vm.count(kFindMatchOpt)) {
1216 findMatch = vm[
kFindMatchOpt].as<std::vector<std::string> >();
1217 }
catch(boost::bad_any_cast
const&
e) {
1223 bool dontPrintProducts =
false;
1224 if(vm.count(kDontPrintProductsOpt)) {
1225 dontPrintProducts=
true;
1231 ProvenanceDumper dumper(fileName, showDependencies, extendedAncestors, extendedDescendants,
1232 excludeESModules, showAllModules, showTopLevelPSets, findMatch, dontPrintProducts, dumpPSetID);
1249 std::cerr <<
"Unknown exception caught\n";
std::stringstream errorLog_
static char const *const kDontPrintProductsCommandOpt
std::vector< ProcessHistory > ProcessHistoryVector
T getParameter(std::string const &) const
std::string const & idToParameterSetBlobsBranchName()
std::vector< ProcessConfiguration > ProcessConfigurationVector
std::string const & BranchTypeToMetaDataTreeName(BranchType const &branchType)
static char const *const kDumpPSetIDOpt
static char const *const kDependenciesOpt
std::string const & parentageTreeName()
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
static char const *const kFindMatchCommandOpt
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static char const *const kShowTopLevelPSetsCommandOpt
bool productRegistryPresent_
ParameterSetID id() const
edm::ProductRegistry reg_
void addAncestors(edm::BranchID const &branchID, std::set< edm::BranchID > &ancestorBranchIDs, std::ostringstream &sout, std::map< edm::BranchID, std::set< edm::ParentageID > > &perProductParentage) const
void dumpParameterSetForID_(edm::ParameterSetID const &id)
static char const *const kHelpOpt
HistoryNode historyGraph_
char const * what() const override
static char const *const kDontPrintProductsOpt
std::string const & eventSelectionsBranchName()
S & print(S &os, JobReport::InputFile const &f)
void dumpEventFilteringParameterSets_(TFile *file)
edm::ProcessHistoryVector phv_
static char const *const kDependenciesCommandOpt
std::vector< EventSelectionID > EventSelectionIDVector
static char const *const kHelpCommandOpt
std::string const & parameterSetsTreeName()
static std::string const input
static char const *const kShowTopLevelPSetsOpt
std::ostream & operator<<(std::ostream &os, edm::ProcessHistory &iHist)
std::vector< BranchID > const & parents() const
static char const *const kShowAllModulesCommandOpt
ParameterSet const & pset() const
returns the PSet
static char const *const kExcludeESModulesCommandOpt
std::string const & processHistoryMapBranchName()
edm::propagate_const< std::unique_ptr< TFile > > inputFile_
static char const *const kSortOpt
bool extendedDescendants_
bool getMapped(key_type const &k, value_type &result) const
EventSelectionIDVector const & eventSelectionIDs() const
static char const *const kExcludeESModulesOpt
std::map< std::pair< std::string, std::string >, IdToBranches > ModuleToIdBranches
void dumpEventFilteringParameterSets(edm::EventSelectionIDVector const &ids)
std::string const & eventHistoryBranchName()
Long64_t numEntries(TFile *hdl, std::string const &trname)
def unique(seq, keepstr=True)
static char const *const kSortCommandOpt
std::string eventSetupComponent(char const *iType, std::string const &iCompName, edm::ParameterSet const &iProcessConfig, std::string const &iProcessName)
std::string nonProducerComponent(std::string const &iCompName, edm::ParameterSet const &iProcessConfig, std::string const &iProcessName)
static ServiceToken createContaining(std::unique_ptr< T > iService)
create a service token that holds the service defined by iService
bool getMapped(key_type const &k, value_type &result) const
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
std::vector< ParameterSet > const & vpset() const
returns the VPSet
bool insertMapped(value_type const &v, bool forceUpdate=false)
ProvenanceDumper(std::string const &filename, bool showDependencies, bool extendedAncestors, bool extendedDescendants, bool excludeESModules, bool showAllModules, bool showTopLevelPSets, std::vector< std::string > const &findMatch, bool dontPrintProducts, std::string const &dumpPSetID)
std::string const & metaDataTreeName()
std::string const & BranchTypeToProductTreeName(BranchType const &branchType)
static char const *const kExtendedAncestorsCommandOpt
static std::string const triggerResults
bool isRegistered() const
Hash< ParameterSetType > ParameterSetID
std::string const & parameterSetMapBranchName()
element_type const * get() const
static void appendToSet(std::set< std::string > &iSet, std::vector< std::string > const &iFrom)
static std::ostream & prettyPrint(std::ostream &oStream, edm::ParameterSet const &iPSet, std::string const &iIndent, std::string const &iIndentDelta)
std::string const & processHistoryBranchName()
std::map< std::string, std::vector< edm::BranchDescription > > IdToBranches
int main(int argc, char *argv[])
void dumpProcessHistory_()
edm::ProcessConfigurationVector phc_
psettable const & psetTable() const
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
ParameterSet const & getParameterSet(std::string const &) const
static char const *const kShowAllModulesOpt
std::string const & parentageBranchName()
ProductList & productListUpdator()
void addDescendants(edm::BranchID const &branchID, std::set< edm::BranchID > &descendantBranchIDs, std::ostringstream &sout, std::map< edm::BranchID, std::set< edm::BranchID > > &parentToChildren) const
std::vector< std::string > findMatch_
std::map< ParameterSetID, ParameterSetBlob > ParameterSetMap
std::string const & productDescriptionBranchName()
static char const *const kExtendedDescendantsOpt
vpsettable const & vpsetTable() const
static char const *const kFileNameOpt
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
std::string const & eventTreeName()
std::string const & eventHistoryTreeName()
static char const *const kExtendedAncestorsOpt
table const & tbl() const
static ParentageRegistry * instance()
static std::string const triggerPaths
ParameterSet const & registerIt()
static std::string const source
std::map< ProcessHistoryID, ProcessHistory > ProcessHistoryMap
std::string const & moduleDescriptionMapBranchName()
bool insertMapped(value_type const &v)
static Registry * instance()
static std::string topLevelPSet(std::string const &iName, edm::ParameterSet const &iProcessConfig, std::string const &iProcessName)
static char const *const kDumpPSetIDCommandOpt
static char const *const kExtendedDescendantsCommandOpt
def operate(timelog, memlog, json_f, num)
void printErrors(std::ostream &os)
static char const *const kFindMatchOpt