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;
166 if(0 == name.size()) {
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.size() == 0 ||
'@' ==
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,
526 void dumpProcessHistory_();
527 void dumpEventFilteringParameterSets_(TFile *
file);
533 bool showDependencies,
534 bool extendedAncestors,
535 bool extendedDescendants,
536 bool excludeESModules,
537 bool showOtherModules,
538 bool showTopLevelPSets,
539 std::vector<std::string>
const& findMatch,
540 bool dontPrintProducts,
543 inputFile_(makeTFile(filename)),
547 showDependencies_(showDependencies),
548 extendedAncestors_(extendedAncestors),
549 extendedDescendants_(extendedDescendants),
550 excludeESModules_(excludeESModules),
551 showOtherModules_(showOtherModules),
552 showTopLevelPSets_(showTopLevelPSets),
553 findMatch_(findMatch),
554 dontPrintProducts_(dontPrintProducts),
555 dumpPSetID_(dumpPSetID) {
577 std::cout <<
"No event filtering information is available.\n";
578 std::cout <<
"------------------------------\n";
580 std::cout <<
"Event filtering information for " 582 <<
" processing steps is available.\n" 583 <<
"The ParameterSets will be printed out, " 584 <<
"with the oldest printed first.\n";
600 if(history->GetEntry(0) <= 0) {
601 std::cout <<
"No event filtering information is available; the event history tree has no entries\n";
607 assert (events != 0);
609 assert (eventSelectionsBranch != 0);
612 eventSelectionsBranch->SetAddress(&pids);
613 if(eventSelectionsBranch->GetEntry(0) <= 0) {
614 std::cout <<
"No event filtering information is available; the event selections branch has no entries\n";
623 std::cout <<
"ParameterSetID: " <<
id <<
'\n';
625 ParameterSetMap::const_iterator
i =
psm_.find(
id);
626 if(i ==
psm_.end()) {
627 std::cout <<
"We are unable to find the corresponding ParameterSet\n";
630 if(
id == empty.
id()) {
631 std::cout <<
"But it would have been empty anyway\n";
641 std::cout <<
" -------------------------\n";
646 std::cout <<
"Processing History:" << std::endl;
647 if(1 ==
phv_.size()) {
651 std::map<edm::ProcessConfigurationID, unsigned int> simpleIDs;
652 for(
auto const& ph :
phv_) {
655 for(
auto const& pc : ph) {
656 if(parent->size() == 0) {
657 unsigned int id = simpleIDs[pc.id()];
660 simpleIDs[pc.id()] =
id;
662 parent->addChild(HistoryNode(pc,
id));
663 parent = parent->lastChildAddress();
666 bool isUnique =
true;
667 for(
auto& child : *parent) {
668 if(child.configurationID() == pc.id()) {
675 simpleIDs[pc.id()] = parent->size() + 1;
676 parent->addChild(HistoryNode(pc, simpleIDs[pc.id()]));
677 parent = parent->lastChildAddress();
695 ParameterSetMap* pPsm = &
psm_;
700 assert(0 != psetTree);
701 typedef std::pair<edm::ParameterSetID, edm::ParameterSetBlob> IdToBlobs;
703 IdToBlobs* pIdToBlob = &idToBlob;
705 for(
long long i = 0;
i != psetTree->GetEntries(); ++
i) {
706 psetTree->GetEntry(
i);
707 psm_.insert(idToBlob);
731 assert(
nullptr != pReg);
734 for(
auto const& item :
psm_) {
736 pset.setID(item.first);
742 for(
auto const& history :
phv_) {
743 for(
auto const&
process : history) {
752 else if(!phm.empty()) {
753 for(
auto const& history : phm) {
754 phv_.push_back(history.second);
755 for(
auto const&
process : history.second) {
768 throw cms::Exception(
"Command Line Argument") <<
"Illegal ParameterSetID string. It should contain 32 hexadecimal characters";
775 std::map<edm::BranchID, std::set<edm::ParentageID> > perProductParentage;
779 if(
nullptr == parentageTree) {
780 std::cerr <<
"ERROR, no Parentage tree available so can not show dependencies/n";
788 std::vector<edm::ParentageID> orderedParentageIDs;
789 orderedParentageIDs.reserve(parentageTree->GetEntries());
794 parentageTree->GetEntry(
i);
796 orderedParentageIDs.push_back(parentageBuffer.
id());
801 if(0 == eventMetaTree) {
804 if(0 == eventMetaTree) {
812 if(0!=storedProvBranch) {
813 std::vector<edm::StoredProductProvenance>
info;
814 std::vector<edm::StoredProductProvenance>* pInfo = &
info;
815 storedProvBranch->SetAddress(&pInfo);
816 for(Long64_t
i = 0, numEntries = eventMetaTree->GetEntries();
i <
numEntries; ++
i) {
817 storedProvBranch->GetEntry(
i);
818 for(
auto const& item : info) {
820 perProductParentage[bid].insert(orderedParentageIDs.at(item.parentageIDIndex_));
826 if (0 != productProvBranch) {
827 std::vector<edm::ProductProvenance>
info;
828 std::vector<edm::ProductProvenance>* pInfo = &
info;
829 productProvBranch->SetAddress(&pInfo);
830 for(Long64_t
i = 0, numEntries = eventMetaTree->GetEntries();
i <
numEntries; ++
i) {
831 productProvBranch->GetEntry(
i);
832 for(
auto const& item : info) {
833 perProductParentage[item.branchID()].insert(item.parentageID());
837 std::cerr <<
" ERROR, could not find provenance information so can not show dependencies\n";
847 std::map<edm::BranchID, std::set<edm::BranchID> > parentToChildren;
851 for (
auto const& itParentageSet : perProductParentage) {
853 for (
auto const& itParentageID : itParentageSet.second) {
856 for(
auto const& branch : parentage->
parents()) {
857 parentToChildren[branch].insert(childBranchID);
860 std::cerr <<
" ERROR:parentage info not in registry ParentageID=" << itParentageID << std::endl;
870 std::cout <<
"---------Producers with data in file---------" << std::endl;
877 std::map<edm::BranchID, std::string> branchIDToBranchName;
879 for(
auto const& processConfig :
phc_) {
881 if(
nullptr == processParameterSet || processParameterSet->
empty()) {
885 auto& product = item.second;
886 if(product.processName() != processConfig.processName()) {
893 branchIDToBranchName[product.branchID()] = product.branchName();
900 if(moduleLabel ==
source) {
913 s << moduleParameterSetCopy.
id();
915 s << moduleParameterSet.
id();
917 moduleToIdBranches[std::make_pair(product.processName(), product.moduleLabel())][s.str()].push_back(product);
922 for(
auto const& item : moduleToIdBranches) {
923 std::ostringstream sout;
924 sout <<
"Module: " << item.first.second <<
" " << item.first.first << std::endl;
925 std::set<edm::BranchID> allBranchIDsForLabelAndProcess;
927 for(
auto const& idBranch : idToBranches) {
928 sout <<
" PSet id:" << idBranch.first << std::endl;
930 sout <<
" products: {" << std::endl;
932 std::set<edm::BranchID> branchIDs;
933 for(
auto const& branch : idBranch.second) {
935 sout <<
" " << branch.branchName() << std::endl;
937 branchIDs.insert(branch.branchID());
938 allBranchIDsForLabelAndProcess.insert(branch.branchID());
940 sout <<
" }" << std::endl;
942 ParameterSetMap::const_iterator itpsm = psm_.find(psid);
943 if(psm_.end() == itpsm) {
945 errorLog_ <<
"No ParameterSetID for " << psid << std::endl;
948 sout <<
" parameters: ";
954 sout <<
" dependencies: {" << std::endl;
955 std::set<edm::ParentageID> parentageIDs;
956 for(
auto const& branch : branchIDs) {
959 std::set<edm::ParentageID>
const&
temp = perProductParentage[branch];
960 parentageIDs.insert(temp.begin(), temp.end());
962 for(
auto const& parentID : parentageIDs) {
964 if(
nullptr != parentage) {
965 for(
auto const& branch : parentage->
parents()) {
966 sout <<
" " << branchIDToBranchName[branch] << std::endl;
969 sout <<
" ERROR:parentage info not in registry ParentageID=" << parentID << std::endl;
972 if(parentageIDs.empty()) {
973 sout <<
" no dependencies recorded (event may not contain data from this module)" << std::endl;
975 sout <<
" }" << std::endl;
979 sout <<
" extendedAncestors: {" << std::endl;
980 std::set<edm::BranchID> ancestorBranchIDs;
981 for (
auto const& branchID : allBranchIDsForLabelAndProcess) {
982 addAncestors(branchID, ancestorBranchIDs, sout, perProductParentage);
984 for (
auto const& ancestorBranchID : ancestorBranchIDs) {
985 sout <<
" " << branchIDToBranchName[ancestorBranchID] <<
"\n";
987 sout <<
" }" << std::endl;
991 sout <<
" extendedDescendants: {" << std::endl;
992 std::set<edm::BranchID> descendantBranchIDs;
993 for (
auto const& branchID : allBranchIDsForLabelAndProcess) {
994 addDescendants(branchID, descendantBranchIDs, sout, parentToChildren);
996 for (
auto const& descendantBranchID : descendantBranchIDs) {
997 sout <<
" " << branchIDToBranchName[descendantBranchID] <<
"\n";
999 sout <<
" }" << std::endl;
1001 bool foundMatch =
true;
1003 for (
auto const& stringToFind :
findMatch_) {
1004 if (sout.str().find(stringToFind) == std::string::npos) {
1015 std::cout <<
"---------Other Modules---------" << std::endl;
1020 std::cout <<
"---------EventSetup---------" << std::endl;
1025 std::cout <<
"---------Top Level PSets---------" << std::endl;
1039 std::set<edm::ParentageID>
const& parentIDs = perProductParentage[branchID];
1040 for (
auto const& parentageID : parentIDs) {
1042 if(0 != parentage) {
1043 for(
auto const& branch : parentage->
parents()) {
1045 if(ancestorBranchIDs.insert(branch).second) {
1046 addAncestors(branch, ancestorBranchIDs, sout, perProductParentage);
1050 sout <<
" ERROR:parentage info not in registry ParentageID=" << parentageID << std::endl;
1059 for (
auto const& childBranchID : parentToChildren[branchID]) {
1060 if (descendantBranchIDs.insert(childBranchID).second) {
1061 addDescendants(childBranchID, descendantBranchIDs, sout, parentToChildren);
1091 using namespace boost::program_options;
1094 descString +=
" [options] <filename>";
1095 descString +=
"\nAllowed options";
1096 options_description desc(descString);
1100 ,
"alphabetially sort EventSetup components")
1102 ,
"print what data each EDProducer is directly dependent upon")
1103 (kExtendedAncestorsCommandOpt
1104 ,
"print what data each EDProducer is dependent upon including indirect dependences")
1106 ,
"print what data depends on the data each EDProducer produces including indirect dependences")
1107 (kExcludeESModulesCommandOpt
1108 ,
"do not print ES module information")
1110 ,
"show all modules (not just those that created data in the file)")
1111 (kShowTopLevelPSetsCommandOpt,
"show all top level PSets")
1113 "show only modules whose information contains the matching string (or all the matching strings, this option can be repeated with different strings)")
1115 ,
"do not print products produced by module")
1116 (kDumpPSetIDCommandOpt, value<std::string>()
1117 ,
"print the parameter set associated with the parameter set ID string (and print nothing else)")
1121 options_description hidden;
1122 hidden.add_options()(
kFileNameOpt, value<std::string>(),
"file name");
1125 options_description cmdline_options;
1126 cmdline_options.add(desc).add(hidden);
1128 positional_options_description
p;
1129 p.add(kFileNameOpt, -1);
1133 store(command_line_parser(argc, argv).
options(cmdline_options).positional(p).
run(), vm);
1135 }
catch(
error const& iException) {
1140 if(vm.count(kHelpOpt)) {
1145 if(vm.count(kSortOpt)) {
1146 HistoryNode::sort_ =
true;
1149 bool showDependencies =
false;
1150 if(vm.count(kDependenciesOpt)) {
1151 showDependencies =
true;
1154 bool extendedAncestors =
false;
1155 if(vm.count(kExtendedAncestorsOpt)) {
1156 extendedAncestors =
true;
1159 bool extendedDescendants =
false;
1160 if(vm.count(kExtendedDescendantsOpt)) {
1161 extendedDescendants =
true;
1164 bool excludeESModules =
false;
1165 if(vm.count(kExcludeESModulesOpt)) {
1166 excludeESModules =
true;
1169 bool showAllModules =
false;
1170 if(vm.count(kShowAllModulesOpt)) {
1171 showAllModules =
true;
1174 bool showTopLevelPSets =
false;
1175 if(vm.count(kShowTopLevelPSetsOpt)) {
1176 showTopLevelPSets=
true;
1180 if(vm.count(kFileNameOpt)) {
1183 }
catch(boost::bad_any_cast
const&
e) {
1188 std::cout <<
"Data file not specified." << std::endl;
1194 if(vm.count(kDumpPSetIDOpt)) {
1197 }
catch(boost::bad_any_cast
const&
e) {
1203 std::vector<std::string> findMatch;
1204 if(vm.count(kFindMatchOpt)) {
1206 findMatch = vm[
kFindMatchOpt].as<std::vector<std::string> >();
1207 }
catch(boost::bad_any_cast
const&
e) {
1213 bool dontPrintProducts =
false;
1214 if(vm.count(kDontPrintProductsOpt)) {
1215 dontPrintProducts=
true;
1221 ProvenanceDumper dumper(fileName, showDependencies, extendedAncestors, extendedDescendants,
1222 excludeESModules, showAllModules, showTopLevelPSets, findMatch, dontPrintProducts, dumpPSetID);
1239 std::cerr <<
"Unknown exception caught\n";
std::stringstream errorLog_
static char const *const kDontPrintProductsCommandOpt
std::vector< ProcessHistory > ProcessHistoryVector
virtual char const * what() const
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
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_
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