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 if(1 ==
phv_.size()) {
653 std::map<edm::ProcessConfigurationID, unsigned int> simpleIDs;
654 for(
auto const& ph :
phv_) {
657 for(
auto const& pc : ph) {
658 if(parent->size() == 0) {
659 unsigned int id = simpleIDs[pc.id()];
662 simpleIDs[pc.id()] =
id;
664 parent->addChild(HistoryNode(pc,
id));
665 parent = parent->lastChildAddress();
668 bool isUnique =
true;
669 for(
auto& child : *parent) {
670 if(child.configurationID() == pc.id()) {
677 simpleIDs[pc.id()] = parent->size() + 1;
678 parent->addChild(HistoryNode(pc, simpleIDs[pc.id()]));
679 parent = parent->lastChildAddress();
692 assert(
nullptr != meta);
701 ParameterSetMap* pPsm = &
psm_;
706 assert(
nullptr != psetTree);
707 typedef std::pair<edm::ParameterSetID, edm::ParameterSetBlob> IdToBlobs;
709 IdToBlobs* pIdToBlob = &idToBlob;
711 for(
long long i = 0;
i != psetTree->GetEntries(); ++
i) {
712 psetTree->GetEntry(
i);
713 psm_.insert(idToBlob);
737 assert(
nullptr != pReg);
740 for(
auto const& item :
psm_) {
742 pset.setID(item.first);
748 for(
auto const& history :
phv_) {
749 for(
auto const&
process : history) {
758 else if(!phm.empty()) {
759 for(
auto const& history : phm) {
760 phv_.push_back(history.second);
761 for(
auto const&
process : history.second) {
774 throw cms::Exception(
"Command Line Argument") <<
"Illegal ParameterSetID string. It should contain 32 hexadecimal characters";
781 std::map<edm::BranchID, std::set<edm::ParentageID> > perProductParentage;
785 if(
nullptr == parentageTree) {
786 std::cerr <<
"ERROR, no Parentage tree available so cannot show dependencies, ancestors, or descendants.\n";
787 std::cerr <<
"Possibly this is not a standard EDM format file. For example, dependency, ancestor, and\n";
788 std::cerr <<
"descendant options to edmProvDump will not work with nanoAOD format files.\n\n";
796 std::vector<edm::ParentageID> orderedParentageIDs;
797 orderedParentageIDs.reserve(parentageTree->GetEntries());
802 parentageTree->GetEntry(
i);
804 orderedParentageIDs.push_back(parentageBuffer.
id());
809 if(
nullptr == eventMetaTree) {
812 if(
nullptr == eventMetaTree) {
820 if(
nullptr!=storedProvBranch) {
821 std::vector<edm::StoredProductProvenance>
info;
822 std::vector<edm::StoredProductProvenance>* pInfo = &
info;
823 storedProvBranch->SetAddress(&pInfo);
824 for(Long64_t
i = 0, numEntries = eventMetaTree->GetEntries();
i <
numEntries; ++
i) {
825 storedProvBranch->GetEntry(
i);
826 for(
auto const& item : info) {
828 perProductParentage[bid].insert(orderedParentageIDs.at(item.parentageIDIndex_));
834 if (
nullptr != productProvBranch) {
835 std::vector<edm::ProductProvenance>
info;
836 std::vector<edm::ProductProvenance>* pInfo = &
info;
837 productProvBranch->SetAddress(&pInfo);
838 for(Long64_t
i = 0, numEntries = eventMetaTree->GetEntries();
i <
numEntries; ++
i) {
839 productProvBranch->GetEntry(
i);
840 for(
auto const& item : info) {
841 perProductParentage[item.branchID()].insert(item.parentageID());
845 std::cerr <<
" ERROR, could not find provenance information so can not show dependencies\n";
855 std::map<edm::BranchID, std::set<edm::BranchID> > parentToChildren;
859 for (
auto const& itParentageSet : perProductParentage) {
861 for (
auto const& itParentageID : itParentageSet.second) {
863 if(
nullptr != parentage) {
865 parentToChildren[
branch].insert(childBranchID);
868 std::cerr <<
" ERROR:parentage info not in registry ParentageID=" << itParentageID << std::endl;
879 std::cout <<
"---------Producers with data in file---------" << std::endl;
887 std::map<edm::BranchID, std::string> branchIDToBranchName;
889 for(
auto const& processConfig :
phc_) {
891 if(
nullptr == processParameterSet || processParameterSet->
empty()) {
895 auto& product = item.second;
896 if(product.processName() != processConfig.processName()) {
903 branchIDToBranchName[product.branchID()] = product.branchName();
910 if(moduleLabel ==
source) {
923 s << moduleParameterSetCopy.
id();
925 s << moduleParameterSet.
id();
927 moduleToIdBranches[std::make_pair(product.processName(), product.moduleLabel())][s.str()].push_back(product);
932 for(
auto const& item : moduleToIdBranches) {
933 std::ostringstream sout;
934 sout <<
"Module: " << item.first.second <<
" " << item.first.first << std::endl;
935 std::set<edm::BranchID> allBranchIDsForLabelAndProcess;
937 for(
auto const& idBranch : idToBranches) {
938 sout <<
" PSet id:" << idBranch.first << std::endl;
940 sout <<
" products: {" << std::endl;
942 std::set<edm::BranchID> branchIDs;
943 for(
auto const&
branch : idBranch.second) {
945 sout <<
" " <<
branch.branchName() << std::endl;
947 branchIDs.insert(
branch.branchID());
948 allBranchIDsForLabelAndProcess.insert(
branch.branchID());
950 sout <<
" }" << std::endl;
952 ParameterSetMap::const_iterator itpsm = psm_.find(psid);
953 if(psm_.end() == itpsm) {
955 errorLog_ <<
"No ParameterSetID for " << psid << std::endl;
958 sout <<
" parameters: ";
964 sout <<
" dependencies: {" << std::endl;
965 std::set<edm::ParentageID> parentageIDs;
966 for(
auto const&
branch : branchIDs) {
969 std::set<edm::ParentageID>
const&
temp = perProductParentage[
branch];
970 parentageIDs.insert(temp.begin(), temp.end());
972 for(
auto const& parentID : parentageIDs) {
974 if(
nullptr != parentage) {
976 sout <<
" " << branchIDToBranchName[
branch] << std::endl;
979 sout <<
" ERROR:parentage info not in registry ParentageID=" << parentID << std::endl;
982 if(parentageIDs.empty()) {
983 sout <<
" no dependencies recorded (event may not contain data from this module)" << std::endl;
985 sout <<
" }" << std::endl;
989 sout <<
" extendedAncestors: {" << std::endl;
990 std::set<edm::BranchID> ancestorBranchIDs;
991 for (
auto const& branchID : allBranchIDsForLabelAndProcess) {
992 addAncestors(branchID, ancestorBranchIDs, sout, perProductParentage);
994 for (
auto const& ancestorBranchID : ancestorBranchIDs) {
995 sout <<
" " << branchIDToBranchName[ancestorBranchID] <<
"\n";
997 sout <<
" }" << std::endl;
1001 sout <<
" extendedDescendants: {" << std::endl;
1002 std::set<edm::BranchID> descendantBranchIDs;
1003 for (
auto const& branchID : allBranchIDsForLabelAndProcess) {
1004 addDescendants(branchID, descendantBranchIDs, sout, parentToChildren);
1006 for (
auto const& descendantBranchID : descendantBranchIDs) {
1007 sout <<
" " << branchIDToBranchName[descendantBranchID] <<
"\n";
1009 sout <<
" }" << std::endl;
1011 bool foundMatch =
true;
1013 for (
auto const& stringToFind :
findMatch_) {
1014 if (sout.str().find(stringToFind) == std::string::npos) {
1025 std::cout <<
"---------Other Modules---------" << std::endl;
1028 std::cout <<
"---------All Modules---------" << std::endl;
1033 std::cout <<
"---------EventSetup---------" << std::endl;
1038 std::cout <<
"---------Top Level PSets---------" << std::endl;
1052 std::set<edm::ParentageID>
const& parentIDs = perProductParentage[branchID];
1053 for (
auto const& parentageID : parentIDs) {
1055 if(
nullptr != parentage) {
1058 if(ancestorBranchIDs.insert(
branch).second) {
1063 sout <<
" ERROR:parentage info not in registry ParentageID=" << parentageID << std::endl;
1072 for (
auto const& childBranchID : parentToChildren[branchID]) {
1073 if (descendantBranchIDs.insert(childBranchID).second) {
1074 addDescendants(childBranchID, descendantBranchIDs, sout, parentToChildren);
1104 using namespace boost::program_options;
1107 descString +=
" [options] <filename>";
1108 descString +=
"\nAllowed options";
1109 options_description desc(descString);
1113 ,
"alphabetially sort EventSetup components")
1115 ,
"print what data each EDProducer is directly dependent upon")
1116 (kExtendedAncestorsCommandOpt
1117 ,
"print what data each EDProducer is dependent upon including indirect dependences")
1119 ,
"print what data depends on the data each EDProducer produces including indirect dependences")
1120 (kExcludeESModulesCommandOpt
1121 ,
"do not print ES module information")
1123 ,
"show all modules (not just those that created data in the file)")
1124 (kShowTopLevelPSetsCommandOpt,
"show all top level PSets")
1126 "show only modules whose information contains the matching string (or all the matching strings, this option can be repeated with different strings)")
1128 ,
"do not print products produced by module")
1129 (kDumpPSetIDCommandOpt, value<std::string>()
1130 ,
"print the parameter set associated with the parameter set ID string (and print nothing else)")
1134 options_description hidden;
1135 hidden.add_options()(
kFileNameOpt, value<std::string>(),
"file name");
1138 options_description cmdline_options;
1139 cmdline_options.add(desc).add(hidden);
1141 positional_options_description
p;
1142 p.add(kFileNameOpt, -1);
1146 store(command_line_parser(argc, argv).
options(cmdline_options).positional(p).
run(), vm);
1148 }
catch(
error const& iException) {
1153 if(vm.count(kHelpOpt)) {
1158 if(vm.count(kSortOpt)) {
1159 HistoryNode::sort_ =
true;
1162 bool showDependencies =
false;
1163 if(vm.count(kDependenciesOpt)) {
1164 showDependencies =
true;
1167 bool extendedAncestors =
false;
1168 if(vm.count(kExtendedAncestorsOpt)) {
1169 extendedAncestors =
true;
1172 bool extendedDescendants =
false;
1173 if(vm.count(kExtendedDescendantsOpt)) {
1174 extendedDescendants =
true;
1177 bool excludeESModules =
false;
1178 if(vm.count(kExcludeESModulesOpt)) {
1179 excludeESModules =
true;
1182 bool showAllModules =
false;
1183 if(vm.count(kShowAllModulesOpt)) {
1184 showAllModules =
true;
1187 bool showTopLevelPSets =
false;
1188 if(vm.count(kShowTopLevelPSetsOpt)) {
1189 showTopLevelPSets=
true;
1193 if(vm.count(kFileNameOpt)) {
1196 }
catch(boost::bad_any_cast
const&
e) {
1201 std::cout <<
"Data file not specified." << std::endl;
1207 if(vm.count(kDumpPSetIDOpt)) {
1210 }
catch(boost::bad_any_cast
const&
e) {
1216 std::vector<std::string> findMatch;
1217 if(vm.count(kFindMatchOpt)) {
1219 findMatch = vm[
kFindMatchOpt].as<std::vector<std::string> >();
1220 }
catch(boost::bad_any_cast
const&
e) {
1226 bool dontPrintProducts =
false;
1227 if(vm.count(kDontPrintProductsOpt)) {
1228 dontPrintProducts=
true;
1234 ProvenanceDumper dumper(fileName, showDependencies, extendedAncestors, extendedDescendants,
1235 excludeESModules, showAllModules, showTopLevelPSets, findMatch, dontPrintProducts, dumpPSetID);
1252 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
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
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()
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