27 #include "boost/program_options.hpp" 37 typedef std::map<std::string, std::vector<edm::BranchDescription> >
IdToBranches;
48 typedef std::map<edm::ParameterSetID, edm::ParameterSetBlob>
ParameterSetMap;
59 simpleId_(iSimpleId) {
62 void addChild(HistoryNode
const&
child) {
63 children_.push_back(child);
67 parameterSetID()
const {
68 return config_.parameterSetID();
73 return config_.processName();
78 return children_.size();
83 return &children_.back();
86 typedef std::vector<HistoryNode>::const_iterator const_iterator;
87 typedef std::vector<HistoryNode>::iterator iterator;
89 iterator
begin() {
return children_.begin();}
90 iterator
end() {
return children_.end();}
92 const_iterator
begin()
const {
return children_.begin();}
93 const_iterator
end()
const {
return children_.end();}
95 void print(std::ostream& os)
const {
96 os << config_.processName()
97 <<
" '" << config_.passID() <<
"' '" 98 << config_.releaseVersion() <<
"' [" 100 << config_.parameterSetID() <<
")" 105 void printEventSetupHistory(ParameterSetMap
const& iPSM,
106 std::vector<std::string>
const& iFindMatch,
107 std::ostream& oErrorLog)
const;
108 void printOtherModulesHistory(ParameterSetMap
const& iPSM,
110 std::vector<std::string>
const& iFindMatch,
111 std::ostream& oErrorLog)
const;
112 void printTopLevelPSetsHistory(ParameterSetMap
const& iPSM,
113 std::vector<std::string>
const& iFindMatch,
114 std::ostream& oErrorLog)
const;
117 configurationID()
const {
124 std::vector<HistoryNode> children_;
125 unsigned int simpleId_;
128 std::ostream&
operator<<(std::ostream& os, HistoryNode
const& node) {
132 bool HistoryNode::sort_ =
false;
139 for(
auto const&
process : iHist) {
141 <<
process.processName() <<
" '" 143 <<
process.releaseVersion() <<
"' (" 144 <<
process.parameterSetID() <<
")" 146 indent += indentDelta;
151 void HistoryNode::printHistory(
std::string const& iIndent)
const {
154 for(
auto const& item : *
this) {
156 item.printHistory(indent + indentDelta);
164 std::ostringstream
result;
171 result << iType <<
": " << name <<
" " << iProcessName <<
"\n" 177 void HistoryNode::printEventSetupHistory(ParameterSetMap
const& iPSM,
178 std::vector<std::string>
const& iFindMatch,
179 std::ostream& oErrorLog)
const {
180 for(
auto const& itH : *
this) {
182 ParameterSetMap::const_iterator itFind = iPSM.find(itH.parameterSetID());
183 if(itFind == iPSM.end()){
184 oErrorLog <<
"No ParameterSetID for " << itH.parameterSetID() << std::endl;
187 std::vector<std::string> sourceStrings, moduleStrings;
189 std::vector<std::string> sources = processConfig.
getParameter<std::vector<std::string> >(
"@all_essources");
190 for(
auto& itM : sources) {
195 bool foundMatch =
true;
196 if(!iFindMatch.empty()) {
197 for (
auto const& stringToFind : iFindMatch) {
198 if (retValue.find(stringToFind) == std::string::npos) {
205 sourceStrings.push_back(
std::move(retValue));
209 std::vector<std::string>
modules = processConfig.getParameter<std::vector<std::string> >(
"@all_esmodules");
210 for(
auto& itM : modules) {
215 bool foundMatch =
true;
216 if(!iFindMatch.empty()) {
217 for (
auto const& stringToFind : iFindMatch) {
218 if (retValue.find(stringToFind) == std::string::npos) {
225 moduleStrings.push_back(
std::move(retValue));
229 std::sort(sourceStrings.begin(), sourceStrings.end());
230 std::sort(moduleStrings.begin(), moduleStrings.end());
232 std::copy(sourceStrings.begin(), sourceStrings.end(),
233 std::ostream_iterator<std::string>(
std::cout,
"\n"));
234 std::copy(moduleStrings.begin(), moduleStrings.end(),
235 std::ostream_iterator<std::string>(
std::cout,
"\n"));
238 itH.printEventSetupHistory(iPSM, iFindMatch, oErrorLog);
245 std::ostringstream
result;
249 result <<
"Module: " << label <<
" " << iProcessName <<
"\n" <<
" parameters: ";
254 void HistoryNode::printOtherModulesHistory(ParameterSetMap
const& iPSM,
256 std::vector<std::string>
const& iFindMatch,
257 std::ostream& oErrorLog)
const {
258 for(
auto const& itH : *
this) {
260 ParameterSetMap::const_iterator itFind = iPSM.find(itH.parameterSetID());
261 if(itFind == iPSM.end()){
262 oErrorLog <<
"No ParameterSetID for " << itH.parameterSetID() << std::endl;
265 std::vector<std::string> moduleStrings;
267 std::vector<std::string>
modules = processConfig.getParameter<std::vector<std::string> >(
"@all_modules");
268 for(
auto& itM : modules) {
270 if(iModules.end() == iModules.find(std::make_pair(itH.processName(), itM))) {
275 bool foundMatch =
true;
276 if(!iFindMatch.empty()) {
277 for (
auto const& stringToFind : iFindMatch) {
278 if (retValue.find(stringToFind) == std::string::npos) {
285 moduleStrings.push_back(
std::move(retValue));
290 std::sort(moduleStrings.begin(), moduleStrings.end());
292 std::copy(moduleStrings.begin(), moduleStrings.end(),
293 std::ostream_iterator<std::string>(
std::cout,
"\n"));
295 itH.printOtherModulesHistory(iPSM, iModules, iFindMatch, oErrorLog);
299 static void appendToSet(std::set<std::string>&iSet, std::vector<std::string>
const& iFrom){
300 for(
auto const&
n : iFrom) {
308 std::ostringstream
result;
311 result <<
"PSet: " << iName <<
" " << iProcessName <<
"\n" <<
" parameters: ";
317 void HistoryNode::printTopLevelPSetsHistory(ParameterSetMap
const& iPSM,
318 std::vector<std::string>
const& iFindMatch,
319 std::ostream& oErrorLog)
const {
320 for(
auto const& itH : *
this) {
322 ParameterSetMap::const_iterator itFind = iPSM.find(itH.parameterSetID());
323 if(itFind == iPSM.end()){
324 oErrorLog <<
"No ParameterSetID for " << itH.parameterSetID() << std::endl;
328 std::set<std::string> namesToExclude;
329 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_modules"));
330 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_sources"));
331 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_loopers"));
333 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_esmodules"));
334 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_essources"));
335 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_esprefers"));
336 if (processConfig.existsAs<std::vector<std::string>>(
"all_aliases")) {
337 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_aliases"));
340 std::vector<std::string> allNames{};
341 processConfig.getParameterSetNames(allNames);
343 std::vector<std::string>
results;
344 for(
auto const&
name: allNames){
345 if (
name.empty() ||
'@' ==
name[0] || namesToExclude.find(
name)!=namesToExclude.end()) {
350 bool foundMatch =
true;
351 if(!iFindMatch.empty()) {
352 for (
auto const& stringToFind : iFindMatch) {
353 if (retValue.find(stringToFind) == std::string::npos) {
364 std::sort(results.begin(), results.end());
366 std::copy(results.begin(), results.end(),
367 std::ostream_iterator<std::string>(
std::cout,
"\n"));
369 itH.printTopLevelPSetsHistory(iPSM, iFindMatch, oErrorLog);
375 std::unique_ptr<TFile>
378 std::unique_ptr<edm::SiteLocalConfig> slcptr = std::make_unique<edm::service::SiteLocalConfigService>(
edm::ParameterSet());
379 auto slc = std::make_shared<edm::serviceregistry::ServiceWrapper<edm::SiteLocalConfig> >(
std::move(slcptr));
384 fileNames.push_back(filename);
388 <<
"File " << filename <<
" was not found or could not be opened.\n";
391 std::unique_ptr<TFile>
result(TFile::Open(catalog.
fileNames()[0].c_str()));
394 <<
"File " << fileNames[0] <<
" was not found or could not be opened.\n";
403 std::unique_ptr<TFile>
406 std::unique_ptr<TFile>
result(TFile::Open(filename.c_str()));
410 return makeTFileWithLookup(filename);
418 char const* trackiness = (psetEntry.
isTracked()?
"tracked":
"untracked");
419 os <<
"PSet " << trackiness <<
" = (";
420 prettyPrint(os, psetEntry.
pset(), iIndent + iIndentDelta, iIndentDelta);
426 std::vector<edm::ParameterSet>
const& vps = vpsetEntry.
vpset();
427 os <<
"VPSet " << (vpsetEntry.
isTracked() ?
"tracked" :
"untracked") <<
" = ({" << std::endl;
431 for(
auto const& item : vps) {
432 os << start << newIndent;
439 os << iIndent<<
"})";
447 oStream <<
"{" << std::endl;
448 for(
auto const& item : iPSet.
tbl()) {
450 oStream << newIndent<< item.first <<
": " << item.second << std::endl;
452 for(
auto const& item : iPSet.
psetTable()) {
455 oStream << newIndent << item.first <<
": ";
462 oStream << newIndent << item.first <<
": ";
466 oStream << iIndent<<
"}";
477 bool showDependencies,
478 bool extendedAncestors,
479 bool extendedDescendants,
480 bool excludeESModules,
482 bool showTopLevelPSets,
483 std::vector<std::string>
const& findMatch,
484 bool dontPrintProducts,
492 void printErrors(std::ostream& os);
493 int exitCode()
const;
498 std::set<edm::BranchID>& ancestorBranchIDs,
499 std::ostringstream& sout,
502 void addDescendants(
edm::BranchID const& branchID, std::set<edm::BranchID>& descendantBranchIDs,
503 std::ostringstream& sout,
528 void dumpProcessHistory_();
529 void dumpEventFilteringParameterSets_(TFile *
file);
535 bool showDependencies,
536 bool extendedAncestors,
537 bool extendedDescendants,
538 bool excludeESModules,
539 bool showOtherModules,
540 bool showTopLevelPSets,
541 std::vector<std::string>
const& findMatch,
542 bool dontPrintProducts,
545 inputFile_(makeTFile(filename)),
549 showDependencies_(showDependencies),
550 extendedAncestors_(extendedAncestors),
551 extendedDescendants_(extendedDescendants),
552 excludeESModules_(excludeESModules),
553 showOtherModules_(showOtherModules),
554 productRegistryPresent_(
true),
555 showTopLevelPSets_(showTopLevelPSets),
556 findMatch_(findMatch),
557 dontPrintProducts_(dontPrintProducts),
558 dumpPSetID_(dumpPSetID) {
580 std::cout <<
"No event filtering information is available.\n";
581 std::cout <<
"------------------------------\n";
583 std::cout <<
"Event filtering information for " 585 <<
" processing steps is available.\n" 586 <<
"The ParameterSets will be printed out, " 587 <<
"with the oldest printed first.\n";
598 if(history !=
nullptr) {
603 if(history->GetEntry(0) <= 0) {
604 std::cout <<
"No event filtering information is available; the event history tree has no entries\n";
610 assert (events !=
nullptr);
612 if (eventSelectionsBranch ==
nullptr)
return;
615 eventSelectionsBranch->SetAddress(&pids);
616 if(eventSelectionsBranch->GetEntry(0) <= 0) {
617 std::cout <<
"No event filtering information is available; the event selections branch has no entries\n";
626 std::cout <<
"ParameterSetID: " <<
id <<
'\n';
628 ParameterSetMap::const_iterator
i =
psm_.find(
id);
629 if(i ==
psm_.end()) {
630 std::cout <<
"We are unable to find the corresponding ParameterSet\n";
633 if(
id == empty.
id()) {
634 std::cout <<
"But it would have been empty anyway\n";
644 std::cout <<
" -------------------------\n";
649 std::cout <<
"Processing History:" << std::endl;
650 std::map<edm::ProcessConfigurationID, unsigned int> simpleIDs;
651 for(
auto const& ph :
phv_) {
654 for(
auto const& pc : ph) {
655 if(parent->size() == 0) {
656 unsigned int id = simpleIDs[pc.id()];
659 simpleIDs[pc.id()] =
id;
661 parent->addChild(HistoryNode(pc,
id));
662 parent = parent->lastChildAddress();
665 bool isUnique =
true;
666 for(
auto& child : *parent) {
667 if(child.configurationID() == pc.id()) {
674 simpleIDs[pc.id()] = parent->size() + 1;
675 parent->addChild(HistoryNode(pc, simpleIDs[pc.id()]));
676 parent = parent->lastChildAddress();
688 assert(
nullptr != meta);
697 ParameterSetMap* pPsm = &
psm_;
702 assert(
nullptr != psetTree);
703 typedef std::pair<edm::ParameterSetID, edm::ParameterSetBlob> IdToBlobs;
705 IdToBlobs* pIdToBlob = &idToBlob;
707 for(
long long i = 0;
i != psetTree->GetEntries(); ++
i) {
708 psetTree->GetEntry(
i);
709 psm_.insert(idToBlob);
733 assert(
nullptr != pReg);
736 for(
auto const& item :
psm_) {
738 pset.setID(item.first);
744 for(
auto const& history :
phv_) {
745 for(
auto const&
process : history) {
754 else if(!phm.empty()) {
755 for(
auto const& history : phm) {
756 phv_.push_back(history.second);
757 for(
auto const&
process : history.second) {
770 throw cms::Exception(
"Command Line Argument") <<
"Illegal ParameterSetID string. It should contain 32 hexadecimal characters";
777 std::map<edm::BranchID, std::set<edm::ParentageID> > perProductParentage;
781 if(
nullptr == parentageTree) {
782 std::cerr <<
"ERROR, no Parentage tree available so cannot show dependencies, ancestors, or descendants.\n";
783 std::cerr <<
"Possibly this is not a standard EDM format file. For example, dependency, ancestor, and\n";
784 std::cerr <<
"descendant options to edmProvDump will not work with nanoAOD format files.\n\n";
792 std::vector<edm::ParentageID> orderedParentageIDs;
793 orderedParentageIDs.reserve(parentageTree->GetEntries());
798 parentageTree->GetEntry(
i);
800 orderedParentageIDs.push_back(parentageBuffer.
id());
805 if(
nullptr == eventMetaTree) {
808 if(
nullptr == eventMetaTree) {
816 if(
nullptr!=storedProvBranch) {
817 std::vector<edm::StoredProductProvenance>
info;
818 std::vector<edm::StoredProductProvenance>* pInfo = &
info;
819 storedProvBranch->SetAddress(&pInfo);
820 for(Long64_t
i = 0, numEntries = eventMetaTree->GetEntries();
i <
numEntries; ++
i) {
821 storedProvBranch->GetEntry(
i);
822 for(
auto const& item : info) {
824 perProductParentage[bid].insert(orderedParentageIDs.at(item.parentageIDIndex_));
830 if (
nullptr != productProvBranch) {
831 std::vector<edm::ProductProvenance>
info;
832 std::vector<edm::ProductProvenance>* pInfo = &
info;
833 productProvBranch->SetAddress(&pInfo);
834 for(Long64_t
i = 0, numEntries = eventMetaTree->GetEntries();
i <
numEntries; ++
i) {
835 productProvBranch->GetEntry(
i);
836 for(
auto const& item : info) {
837 perProductParentage[item.branchID()].insert(item.parentageID());
841 std::cerr <<
" ERROR, could not find provenance information so can not show dependencies\n";
851 std::map<edm::BranchID, std::set<edm::BranchID> > parentToChildren;
855 for (
auto const& itParentageSet : perProductParentage) {
857 for (
auto const& itParentageID : itParentageSet.second) {
859 if(
nullptr != parentage) {
861 parentToChildren[
branch].insert(childBranchID);
864 std::cerr <<
" ERROR:parentage info not in registry ParentageID=" << itParentageID << std::endl;
876 std::cout <<
"---------Producers with data in file---------" << std::endl;
884 std::map<edm::BranchID, std::string> branchIDToBranchName;
886 for(
auto const& processConfig :
phc_) {
888 if(
nullptr == processParameterSet || processParameterSet->
empty()) {
892 auto& product = item.second;
893 if(product.processName() != processConfig.processName()) {
901 branchIDToBranchName[product.branchID()] = product.branchName();
908 if(moduleLabel ==
source) {
921 s << moduleParameterSetCopy.
id();
923 s << moduleParameterSet.
id();
925 moduleToIdBranches[std::make_pair(product.processName(), product.moduleLabel())][s.str()].push_back(product);
930 for(
auto const& item : moduleToIdBranches) {
931 std::ostringstream sout;
932 sout <<
"Module: " << item.first.second <<
" " << item.first.first << std::endl;
933 std::set<edm::BranchID> allBranchIDsForLabelAndProcess;
935 for(
auto const& idBranch : idToBranches) {
936 sout <<
" PSet id:" << idBranch.first << std::endl;
938 sout <<
" products: {" << std::endl;
940 std::set<edm::BranchID> branchIDs;
941 for(
auto const&
branch : idBranch.second) {
943 sout <<
" " <<
branch.branchName() << std::endl;
945 branchIDs.insert(
branch.branchID());
946 allBranchIDsForLabelAndProcess.insert(
branch.branchID());
948 sout <<
" }" << std::endl;
950 ParameterSetMap::const_iterator itpsm = psm_.find(psid);
951 if(psm_.end() == itpsm) {
953 errorLog_ <<
"No ParameterSetID for " << psid << std::endl;
956 sout <<
" parameters: ";
962 sout <<
" dependencies: {" << std::endl;
963 std::set<edm::ParentageID> parentageIDs;
964 for(
auto const&
branch : branchIDs) {
967 std::set<edm::ParentageID>
const&
temp = perProductParentage[
branch];
968 parentageIDs.insert(temp.begin(), temp.end());
970 for(
auto const& parentID : parentageIDs) {
972 if(
nullptr != parentage) {
974 sout <<
" " << branchIDToBranchName[
branch] << std::endl;
977 sout <<
" ERROR:parentage info not in registry ParentageID=" << parentID << std::endl;
980 if(parentageIDs.empty()) {
981 sout <<
" no dependencies recorded (event may not contain data from this module)" << std::endl;
983 sout <<
" }" << std::endl;
987 sout <<
" extendedAncestors: {" << std::endl;
988 std::set<edm::BranchID> ancestorBranchIDs;
989 for (
auto const& branchID : allBranchIDsForLabelAndProcess) {
990 addAncestors(branchID, ancestorBranchIDs, sout, perProductParentage);
992 for (
auto const& ancestorBranchID : ancestorBranchIDs) {
993 sout <<
" " << branchIDToBranchName[ancestorBranchID] <<
"\n";
995 sout <<
" }" << std::endl;
999 sout <<
" extendedDescendants: {" << std::endl;
1000 std::set<edm::BranchID> descendantBranchIDs;
1001 for (
auto const& branchID : allBranchIDsForLabelAndProcess) {
1002 addDescendants(branchID, descendantBranchIDs, sout, parentToChildren);
1004 for (
auto const& descendantBranchID : descendantBranchIDs) {
1005 sout <<
" " << branchIDToBranchName[descendantBranchID] <<
"\n";
1007 sout <<
" }" << std::endl;
1009 bool foundMatch =
true;
1011 for (
auto const& stringToFind :
findMatch_) {
1012 if (sout.str().find(stringToFind) == std::string::npos) {
1024 std::cout <<
"---------Other Modules---------" << std::endl;
1027 std::cout <<
"---------All Modules---------" << std::endl;
1032 std::cout <<
"---------EventSetup---------" << std::endl;
1037 std::cout <<
"---------Top Level PSets---------" << std::endl;
1051 std::set<edm::ParentageID>
const& parentIDs = perProductParentage[branchID];
1052 for (
auto const& parentageID : parentIDs) {
1054 if(
nullptr != parentage) {
1057 if(ancestorBranchIDs.insert(
branch).second) {
1062 sout <<
" ERROR:parentage info not in registry ParentageID=" << parentageID << std::endl;
1071 for (
auto const& childBranchID : parentToChildren[branchID]) {
1072 if (descendantBranchIDs.insert(childBranchID).second) {
1073 addDescendants(childBranchID, descendantBranchIDs, sout, parentToChildren);
1103 using namespace boost::program_options;
1106 descString +=
" [options] <filename>";
1107 descString +=
"\nAllowed options";
1108 options_description desc(descString);
1112 ,
"alphabetially sort EventSetup components")
1114 ,
"print what data each EDProducer is directly dependent upon")
1115 (kExtendedAncestorsCommandOpt
1116 ,
"print what data each EDProducer is dependent upon including indirect dependences")
1118 ,
"print what data depends on the data each EDProducer produces including indirect dependences")
1119 (kExcludeESModulesCommandOpt
1120 ,
"do not print ES module information")
1122 ,
"show all modules (not just those that created data in the file)")
1123 (kShowTopLevelPSetsCommandOpt,
"show all top level PSets")
1125 "show only modules whose information contains the matching string (or all the matching strings, this option can be repeated with different strings)")
1127 ,
"do not print products produced by module")
1128 (kDumpPSetIDCommandOpt, value<std::string>()
1129 ,
"print the parameter set associated with the parameter set ID string (and print nothing else)")
1133 options_description hidden;
1134 hidden.add_options()(
kFileNameOpt, value<std::string>(),
"file name");
1137 options_description cmdline_options;
1138 cmdline_options.add(desc).add(hidden);
1140 positional_options_description
p;
1141 p.add(kFileNameOpt, -1);
1145 store(command_line_parser(argc, argv).
options(cmdline_options).positional(p).
run(), vm);
1147 }
catch(
error const& iException) {
1152 if(vm.count(kHelpOpt)) {
1157 if(vm.count(kSortOpt)) {
1158 HistoryNode::sort_ =
true;
1161 bool showDependencies =
false;
1162 if(vm.count(kDependenciesOpt)) {
1163 showDependencies =
true;
1166 bool extendedAncestors =
false;
1167 if(vm.count(kExtendedAncestorsOpt)) {
1168 extendedAncestors =
true;
1171 bool extendedDescendants =
false;
1172 if(vm.count(kExtendedDescendantsOpt)) {
1173 extendedDescendants =
true;
1176 bool excludeESModules =
false;
1177 if(vm.count(kExcludeESModulesOpt)) {
1178 excludeESModules =
true;
1181 bool showAllModules =
false;
1182 if(vm.count(kShowAllModulesOpt)) {
1183 showAllModules =
true;
1186 bool showTopLevelPSets =
false;
1187 if(vm.count(kShowTopLevelPSetsOpt)) {
1188 showTopLevelPSets=
true;
1192 if(vm.count(kFileNameOpt)) {
1195 }
catch(boost::bad_any_cast
const&
e) {
1200 std::cout <<
"Data file not specified." << std::endl;
1206 if(vm.count(kDumpPSetIDOpt)) {
1209 }
catch(boost::bad_any_cast
const&
e) {
1215 std::vector<std::string> findMatch;
1216 if(vm.count(kFindMatchOpt)) {
1218 findMatch = vm[
kFindMatchOpt].as<std::vector<std::string> >();
1219 }
catch(boost::bad_any_cast
const&
e) {
1225 bool dontPrintProducts =
false;
1226 if(vm.count(kDontPrintProductsOpt)) {
1227 dontPrintProducts=
true;
1233 ProvenanceDumper dumper(fileName, showDependencies, extendedAncestors, extendedDescendants,
1234 excludeESModules, showAllModules, showTopLevelPSets, findMatch, dontPrintProducts, dumpPSetID);
1251 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
void setIsMergeable(BranchDescription &)
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