24 #include "Cintex/Cintex.h"
29 #include "boost/program_options.hpp"
39 typedef std::map<std::string, std::vector<edm::BranchDescription> >
IdToBranches;
45 typedef std::map<edm::ParameterSetID, edm::ParameterSetBlob>
ParameterSetMap;
56 simpleId_(iSimpleId) {
59 void addChild(HistoryNode
const&
child) {
60 children_.push_back(child);
64 parameterSetID()
const {
65 return config_.parameterSetID();
70 return config_.processName();
75 return children_.size();
80 return &children_.back();
83 typedef std::vector<HistoryNode>::const_iterator const_iterator;
84 typedef std::vector<HistoryNode>::iterator iterator;
86 iterator
begin() {
return children_.begin();}
87 iterator
end() {
return children_.end();}
89 const_iterator
begin()
const {
return children_.begin();}
90 const_iterator
end()
const {
return children_.end();}
92 void print(std::ostream& os)
const {
93 os << config_.processName()
94 <<
" '" << config_.passID() <<
"' '"
95 << config_.releaseVersion() <<
"' ["
97 << config_.parameterSetID() <<
")"
102 void printEventSetupHistory(ParameterSetMap
const& iPSM,
103 std::vector<std::string>
const& iFindMatch,
104 std::ostream& oErrorLog)
const;
105 void printOtherModulesHistory(ParameterSetMap
const& iPSM,
107 std::vector<std::string>
const& iFindMatch,
108 std::ostream& oErrorLog)
const;
109 void printTopLevelPSetsHistory(ParameterSetMap
const& iPSM,
110 std::vector<std::string>
const& iFindMatch,
111 std::ostream& oErrorLog)
const;
114 configurationID()
const {
121 std::vector<HistoryNode> children_;
122 unsigned int simpleId_;
125 std::ostream&
operator<<(std::ostream& os, HistoryNode
const&
node) {
129 bool HistoryNode::sort_ =
false;
140 <<
i->processName() <<
" '"
141 <<
i->passID() <<
"' '"
142 <<
i->releaseVersion() <<
"' ("
143 <<
i->parameterSetID() <<
")"
145 indent += indentDelta;
150 void HistoryNode::printHistory(
std::string const& iIndent)
const {
157 i->printHistory(indent+indentDelta);
165 std::ostringstream
result;
168 if(0 == name.size()) {
172 result << iType <<
": " << name <<
" " << iProcessName <<
"\n"
178 void HistoryNode::printEventSetupHistory(ParameterSetMap
const& iPSM,
179 std::vector<std::string>
const& iFindMatch,
180 std::ostream& oErrorLog)
const {
181 for(const_iterator itH =
begin(),
e =
end();
185 ParameterSetMap::const_iterator itFind = iPSM.find(itH->parameterSetID());
186 if(itFind == iPSM.end()){
187 oErrorLog <<
"No ParameterSetID for " << itH->parameterSetID() << std::endl;
190 std::vector<std::string> sourceStrings, moduleStrings;
192 std::vector<std::string> sources = processConfig.
getParameter<std::vector<std::string> >(
"@all_essources");
193 for(std::vector<std::string>::iterator itM = sources.begin(); itM != sources.end(); ++itM) {
198 bool foundMatch =
true;
199 if(!iFindMatch.empty()) {
200 for (
auto const& stringToFind : iFindMatch) {
201 if (retValue.find(stringToFind) == std::string::npos) {
208 sourceStrings.push_back(std::move(retValue));
212 std::vector<std::string> modules = processConfig.getParameter<std::vector<std::string> >(
"@all_esmodules");
213 for(std::vector<std::string>::iterator itM = modules.begin(); itM != modules.end(); ++itM) {
218 bool foundMatch =
true;
219 if(!iFindMatch.empty()) {
220 for (
auto const& stringToFind : iFindMatch) {
221 if (retValue.find(stringToFind) == std::string::npos) {
228 moduleStrings.push_back(std::move(retValue));
232 std::sort(sourceStrings.begin(), sourceStrings.end());
233 std::sort(moduleStrings.begin(), moduleStrings.end());
235 std::copy(sourceStrings.begin(), sourceStrings.end(),
236 std::ostream_iterator<std::string>(
std::cout,
"\n"));
237 std::copy(moduleStrings.begin(), moduleStrings.end(),
238 std::ostream_iterator<std::string>(
std::cout,
"\n"));
241 itH->printEventSetupHistory(iPSM, iFindMatch, oErrorLog);
248 std::ostringstream
result;
252 result <<
"Module: " << label <<
" " << iProcessName <<
"\n" <<
" parameters: ";
257 void HistoryNode::printOtherModulesHistory(ParameterSetMap
const& iPSM,
259 std::vector<std::string>
const& iFindMatch,
260 std::ostream& oErrorLog)
const {
261 for(const_iterator itH =
begin(),
e =
end();
265 ParameterSetMap::const_iterator itFind = iPSM.find(itH->parameterSetID());
266 if(itFind == iPSM.end()){
267 oErrorLog <<
"No ParameterSetID for " << itH->parameterSetID() << std::endl;
270 std::vector<std::string> moduleStrings;
272 std::vector<std::string> modules = processConfig.
getParameter<std::vector<std::string> >(
"@all_modules");
273 for(std::vector<std::string>::iterator itM = modules.begin(); itM != modules.end(); ++itM) {
275 if(iModules.end() == iModules.find(std::make_pair(itH->processName(), *itM))) {
279 itH->processName()));
280 bool foundMatch =
true;
281 if(!iFindMatch.empty()) {
282 for (
auto const& stringToFind : iFindMatch) {
283 if (retValue.find(stringToFind) == std::string::npos) {
290 moduleStrings.push_back(std::move(retValue));
295 std::sort(moduleStrings.begin(), moduleStrings.end());
297 std::copy(moduleStrings.begin(), moduleStrings.end(),
298 std::ostream_iterator<std::string>(
std::cout,
"\n"));
300 itH->printOtherModulesHistory(iPSM, iModules, iFindMatch, oErrorLog);
304 static void appendToSet(std::set<std::string>&iSet, std::vector<std::string>
const& iFrom){
305 for(
auto const&
n: iFrom){
313 std::ostringstream
result;
316 result <<
"PSet: " << iName <<
" " << iProcessName <<
"\n" <<
" parameters: ";
322 void HistoryNode::printTopLevelPSetsHistory(ParameterSetMap
const& iPSM,
323 std::vector<std::string>
const& iFindMatch,
324 std::ostream& oErrorLog)
const {
325 for(const_iterator itH =
begin(),
e =
end();
329 ParameterSetMap::const_iterator itFind = iPSM.find(itH->parameterSetID());
330 if(itFind == iPSM.end()){
331 oErrorLog <<
"No ParameterSetID for " << itH->parameterSetID() << std::endl;
335 std::set<std::string> namesToExclude;
336 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_modules"));
337 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_sources"));
338 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_loopers"));
340 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_esmodules"));
341 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_essources"));
342 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_esprefers"));
343 if (processConfig.existsAs<std::vector<std::string>>(
"all_aliases")) {
344 appendToSet(namesToExclude,processConfig.getParameter<std::vector<std::string> >(
"@all_aliases"));
347 std::vector<std::string> allNames{};
348 processConfig.getParameterSetNames(allNames);
350 std::vector<std::string>
results;
351 for(
auto const&
name: allNames){
352 if (
name.size() == 0 ||
'@' ==
name[0] || namesToExclude.find(
name)!=namesToExclude.end()) {
357 bool foundMatch =
true;
358 if(!iFindMatch.empty()) {
359 for (
auto const& stringToFind : iFindMatch) {
360 if (retValue.find(stringToFind) == std::string::npos) {
367 results.push_back(std::move(retValue));
371 std::sort(results.begin(), results.end());
373 std::copy(results.begin(), results.end(),
374 std::ostream_iterator<std::string>(
std::cout,
"\n"));
376 itH->printTopLevelPSetsHistory(iPSM, iFindMatch, oErrorLog);
382 std::unique_ptr<TFile>
391 fileNames.push_back(filename);
395 <<
"File " << filename <<
" was not found or could not be opened.\n";
398 std::unique_ptr<TFile>
result(TFile::Open(
catalog.fileNames()[0].c_str()));
401 <<
"File " << fileNames[0] <<
" was not found or could not be opened.\n";
410 std::unique_ptr<TFile>
412 gErrorIgnoreLevel = kFatal;
413 std::unique_ptr<TFile>
result(TFile::Open(filename.c_str()));
414 gErrorIgnoreLevel =
kError;
417 return makeTFileWithLookup(filename);
425 char const* trackiness = (psetEntry.
isTracked()?
"tracked":
"untracked");
426 os <<
"PSet " << trackiness <<
" = (";
427 prettyPrint(os, psetEntry.
pset(), iIndent + iIndentDelta, iIndentDelta);
433 std::vector<edm::ParameterSet>
const& vps = vpsetEntry.
vpset();
434 os <<
"VPSet " << (vpsetEntry.
isTracked() ?
"tracked" :
"untracked") <<
" = ({" << std::endl;
438 for(std::vector<edm::ParameterSet>::const_iterator
i = vps.begin(),
e = vps.end();
i !=
e; ++
i) {
439 os << start << newIndent;
446 os << iIndent<<
"})";
454 oStream <<
"{" << std::endl;
455 for(edm::ParameterSet::table::const_iterator
i = iPSet.
tbl().begin(),
e = iPSet.
tbl().end();
i !=
e; ++
i) {
457 oStream << newIndent<<
i->first <<
": " <<
i->second << std::endl;
459 for(edm::ParameterSet::psettable::const_iterator
i = iPSet.
psetTable().begin(),
e = iPSet.
psetTable().end();
i !=
e; ++
i) {
462 oStream << newIndent <<
i->first <<
": ";
466 for(edm::ParameterSet::vpsettable::const_iterator
i = iPSet.
vpsetTable().begin(),
e = iPSet.
vpsetTable().end();
i !=
e; ++
i) {
469 oStream << newIndent <<
i->first <<
": ";
473 oStream << iIndent<<
"}";
484 bool showDependencies,
485 bool extendedAncestors,
486 bool extendedDescendants,
487 bool excludeESModules,
489 bool showTopLevelPSets,
490 std::vector<std::string>
const& findMatch,
491 bool dontPrintProducts);
504 std::set<edm::BranchID>& ancestorBranchIDs,
505 std::ostringstream& sout,
509 std::ostringstream& sout,
539 bool showDependencies,
540 bool extendedAncestors,
541 bool extendedDescendants,
542 bool excludeESModules,
543 bool showOtherModules,
544 bool showTopLevelPSets,
545 std::vector<std::string>
const& findMatch,
546 bool dontPrintProducts) :
548 inputFile_(makeTFile(filename)),
552 showDependencies_(showDependencies),
553 extendedAncestors_(extendedAncestors),
554 extendedDescendants_(extendedDescendants),
555 excludeESModules_(excludeESModules),
556 showOtherModules_(showOtherModules),
557 showTopLevelPSets_(showTopLevelPSets),
558 findMatch_(findMatch),
559 dontPrintProducts_(dontPrintProducts) {
581 std::cout <<
"No event filtering information is available.\n";
582 std::cout <<
"------------------------------\n";
584 std::cout <<
"Event filtering information for "
586 <<
" processing steps is available.\n"
587 <<
"The ParameterSets will be printed out, "
588 <<
"with the oldest printed first.\n";
604 if(history->GetEntry(0) <= 0) {
605 std::cout <<
"No event filtering information is available; the event history tree has no entries\n";
611 assert (events != 0);
613 assert (eventSelectionsBranch != 0);
616 eventSelectionsBranch->SetAddress(&pids);
617 if(eventSelectionsBranch->GetEntry(0) <= 0) {
618 std::cout <<
"No event filtering information is available; the event selections branch has no entries\n";
627 std::cout <<
"ParameterSetID: " <<
id <<
'\n';
629 ParameterSetMap::const_iterator
i =
psm_.find(
id);
630 if(i ==
psm_.end()) {
631 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 if(1 ==
phv_.size()) {
654 std::map<edm::ProcessConfigurationID, unsigned int> simpleIDs;
655 for(edm::ProcessHistoryVector::const_iterator it =
phv_.begin(), itEnd =
phv_.end();
663 if(parent->size() == 0) {
664 unsigned int id = simpleIDs[itH->id()];
667 simpleIDs[itH->id()] = id;
669 parent->addChild(HistoryNode(*itH,
id));
670 parent = parent->lastChildAddress();
673 bool isUnique =
true;
674 for(HistoryNode::iterator itChild = parent->begin(), itChildEnd = parent->end();
675 itChild != itChildEnd;
677 if(itChild->configurationID() == itH->id()) {
679 parent = &(*itChild);
684 simpleIDs[itH->id()] = parent->size() + 1;
685 parent->addChild(HistoryNode(*itH, simpleIDs[itH->id()]));
686 parent = parent->lastChildAddress();
704 ParameterSetMap* pPsm = &
psm_;
709 assert(0 != psetTree);
710 typedef std::pair<edm::ParameterSetID, edm::ParameterSetBlob> IdToBlobs;
712 IdToBlobs* pIdToBlob = &idToBlob;
714 for(
long long i = 0;
i != psetTree->GetEntries(); ++
i) {
715 psetTree->GetEntry(
i);
716 psm_.insert(idToBlob);
747 for(ParameterSetMap::const_iterator
i =
psm_.begin(), iEnd =
psm_.end();
i != iEnd; ++
i) {
756 for(edm::ProcessHistoryMap::const_iterator
i = phm.begin(),
e = phm.end();
i !=
e; ++
i) {
757 phv_.push_back(
i->second);
758 for(edm::ProcessConfigurationVector::const_iterator
j =
i->second.begin(),
f =
i->second.end();
j !=
f; ++
j) {
769 std::map<edm::BranchID, std::set<edm::ParentageID> > perProductParentage;
773 if(0 == parentageTree) {
774 std::cerr <<
"ERROR, no Parentage tree available so can not show dependencies/n";
782 std::vector<edm::ParentageID> orderedParentageIDs;
783 orderedParentageIDs.reserve(parentageTree->GetEntries());
788 parentageTree->GetEntry(
i);
790 orderedParentageIDs.push_back(parentageBuffer.
id());
795 if(0 == eventMetaTree) {
798 if(0 == eventMetaTree) {
806 if(0!=storedProvBranch) {
807 std::vector<edm::StoredProductProvenance>
info;
808 std::vector<edm::StoredProductProvenance>* pInfo = &
info;
809 storedProvBranch->SetAddress(&pInfo);
810 for(Long64_t
i = 0, numEntries = eventMetaTree->GetEntries();
i <
numEntries; ++
i) {
811 storedProvBranch->GetEntry(
i);
812 for(std::vector<edm::StoredProductProvenance>::const_iterator it = info.begin(), itEnd = info.end();
815 perProductParentage[bid].insert(orderedParentageIDs[it->parentageIDIndex_]);
821 if (0 != productProvBranch) {
822 std::vector<edm::ProductProvenance>
info;
823 std::vector<edm::ProductProvenance>* pInfo = &
info;
824 productProvBranch->SetAddress(&pInfo);
825 for(Long64_t
i = 0, numEntries = eventMetaTree->GetEntries();
i <
numEntries; ++
i) {
826 productProvBranch->GetEntry(
i);
827 for(std::vector<edm::ProductProvenance>::const_iterator it = info.begin(), itEnd = info.end();
829 perProductParentage[it->branchID()].insert(it->parentageID());
833 std::cerr <<
" ERROR, could not find provenance information so can not show dependencies\n";
843 std::map<edm::BranchID, std::set<edm::BranchID> > parentToChildren;
847 for (
auto const& itParentageSet : perProductParentage) {
849 for (
auto const& itParentageID : itParentageSet.second) {
852 for(std::vector<edm::BranchID>::const_iterator itBranch = parentage->
parents().begin(), itEndBranch = parentage->
parents().end();
853 itBranch != itEndBranch;
855 parentToChildren[*itBranch].insert(childBranchID);
858 std::cerr <<
" ERROR:parentage info not in registry ParentageID=" << itParentageID << std::endl;
868 std::cout <<
"---------Producers with data in file---------" << std::endl;
875 std::map<edm::BranchID, std::string> branchIDToBranchName;
877 for(edm::ProductRegistry::ProductList::const_iterator it =
885 branchIDToBranchName[it->second.branchID()] = it->second.branchName();
891 for(std::map<edm::ProcessConfigurationID, edm::ParameterSetID>::const_iterator
892 itId = it->second.parameterSetIDs().begin(),
893 itIdEnd = it->second.parameterSetIDs().end();
899 moduleToIdBranches[std::make_pair(it->second.processName(), it->second.moduleLabel())][s.str()].push_back(it->second);
904 for(ModuleToIdBranches::const_iterator it = moduleToIdBranches.begin(),
905 itEnd = moduleToIdBranches.end();
908 std::ostringstream sout;
909 sout <<
"Module: " << it->first.second <<
" " << it->first.first << std::endl;
910 std::set<edm::BranchID> allBranchIDsForLabelAndProcess;
912 for(IdToBranches::const_iterator itIdBranch = idToBranches.begin(),
913 itIdBranchEnd = idToBranches.end();
914 itIdBranch != itIdBranchEnd;
916 sout <<
" PSet id:" << itIdBranch->first << std::endl;
918 sout <<
" products: {" << std::endl;
920 std::set<edm::BranchID> branchIDs;
921 for(std::vector<edm::BranchDescription>::const_iterator itBranch = itIdBranch->second.begin(),
922 itBranchEnd = itIdBranch->second.end();
923 itBranch != itBranchEnd;
926 sout <<
" " << itBranch->branchName() << std::endl;
928 branchIDs.insert(itBranch->branchID());
929 allBranchIDsForLabelAndProcess.insert(itBranch->branchID());
931 sout <<
" }" << std::endl;
933 ParameterSetMap::const_iterator itpsm =
psm_.find(psid);
934 if(
psm_.end() == itpsm) {
936 errorLog_ <<
"No ParameterSetID for " << psid << std::endl;
939 sout <<
" parameters: ";
945 sout <<
" dependencies: {" << std::endl;
946 std::set<edm::ParentageID> parentageIDs;
947 for(std::set<edm::BranchID>::const_iterator itBranch = branchIDs.begin(), itBranchEnd = branchIDs.end();
948 itBranch != itBranchEnd;
952 std::set<edm::ParentageID>
const&
temp = perProductParentage[*itBranch];
953 parentageIDs.insert(temp.begin(), temp.end());
955 for(std::set<edm::ParentageID>::const_iterator itParentID = parentageIDs.begin(), itEndParentID = parentageIDs.end();
956 itParentID != itEndParentID;
960 for(std::vector<edm::BranchID>::const_iterator itBranch = parentage->
parents().begin(), itEndBranch = parentage->
parents().end();
961 itBranch != itEndBranch;
963 sout <<
" " << branchIDToBranchName[*itBranch] << std::endl;
966 sout <<
" ERROR:parentage info not in registry ParentageID=" << *itParentID << std::endl;
969 if(parentageIDs.empty()) {
970 sout <<
" no dependencies recorded (event may not contain data from this module)" << std::endl;
972 sout <<
" }" << std::endl;
976 sout <<
" extendedAncestors: {" << std::endl;
977 std::set<edm::BranchID> ancestorBranchIDs;
978 for (
auto const& branchID : allBranchIDsForLabelAndProcess) {
979 addAncestors(branchID, ancestorBranchIDs, sout, perProductParentage);
981 for (
auto const& ancestorBranchID : ancestorBranchIDs) {
982 sout <<
" " << branchIDToBranchName[ancestorBranchID] <<
"\n";
984 sout <<
" }" << std::endl;
988 sout <<
" extendedDescendants: {" << std::endl;
989 std::set<edm::BranchID> descendantBranchIDs;
990 for (
auto const& branchID : allBranchIDsForLabelAndProcess) {
991 addDescendants(branchID, descendantBranchIDs, sout, parentToChildren);
993 for (
auto const& descendantBranchID : descendantBranchIDs) {
994 sout <<
" " << branchIDToBranchName[descendantBranchID] <<
"\n";
996 sout <<
" }" << std::endl;
998 bool foundMatch =
true;
1000 for (
auto const& stringToFind :
findMatch_) {
1001 if (sout.str().find(stringToFind) == std::string::npos) {
1012 std::cout <<
"---------Other Modules---------" << std::endl;
1017 std::cout <<
"---------EventSetup---------" << std::endl;
1022 std::cout <<
"---------Top Level PSets---------" << std::endl;
1036 std::set<edm::ParentageID>
const& parentIDs = perProductParentage[branchID];
1037 for (
auto const& parentageID : parentIDs) {
1039 if(0 != parentage) {
1040 for(std::vector<edm::BranchID>::const_iterator itBranch = parentage->
parents().begin(), itEndBranch = parentage->
parents().end();
1041 itBranch != itEndBranch;
1044 if (ancestorBranchIDs.insert(*itBranch).second) {
1045 addAncestors(*itBranch, ancestorBranchIDs, sout, perProductParentage);
1049 sout <<
" ERROR:parentage info not in registry ParentageID=" << parentageID << std::endl;
1058 for (
auto const& childBranchID : parentToChildren[branchID]) {
1059 if (descendantBranchIDs.insert(childBranchID).second) {
1060 addDescendants(childBranchID, descendantBranchIDs, sout, parentToChildren);
1089 using namespace boost::program_options;
1092 descString +=
" [options] <filename>";
1093 descString +=
"\nAllowed options";
1094 options_description desc(descString);
1098 ,
"alphabetially sort EventSetup components")
1100 ,
"print what data each EDProducer is directly dependent upon")
1101 (kExtendedAncestorsCommandOpt
1102 ,
"print what data each EDProducer is dependent upon including indirect dependences")
1104 ,
"print what data depends on the data each EDProducer produces including indirect dependences")
1105 (kExcludeESModulesCommandOpt
1106 ,
"do not print ES module information")
1108 ,
"show all modules (not just those that created data in the file)")
1109 (kShowTopLevelPSetsCommandOpt,
"show all top level PSets")
1111 "show only modules whose information contains the matching string (or all the matching strings, this option can be repeated with different strings)")
1113 ,
"do not print products produced by module")
1117 options_description hidden;
1118 hidden.add_options()(
kFileNameOpt, value<std::string>(),
"file name");
1121 options_description cmdline_options;
1122 cmdline_options.add(desc).add(hidden);
1124 positional_options_description
p;
1125 p.add(kFileNameOpt, -1);
1129 store(command_line_parser(argc, argv).
options(cmdline_options).positional(
p).
run(), vm);
1131 }
catch(
error const& iException) {
1136 if(vm.count(kHelpOpt)) {
1141 if(vm.count(kSortOpt)) {
1142 HistoryNode::sort_ =
true;
1145 bool showDependencies =
false;
1146 if(vm.count(kDependenciesOpt)) {
1147 showDependencies =
true;
1150 bool extendedAncestors =
false;
1151 if(vm.count(kExtendedAncestorsOpt)) {
1152 extendedAncestors =
true;
1155 bool extendedDescendants =
false;
1156 if(vm.count(kExtendedDescendantsOpt)) {
1157 extendedDescendants =
true;
1160 bool excludeESModules =
false;
1161 if(vm.count(kExcludeESModulesOpt)) {
1162 excludeESModules =
true;
1165 bool showAllModules =
false;
1166 if(vm.count(kShowAllModulesOpt)) {
1167 showAllModules =
true;
1170 bool showTopLevelPSets =
false;
1171 if(vm.count(kShowTopLevelPSetsOpt)) {
1172 showTopLevelPSets=
true;
1176 if(vm.count(kFileNameOpt)) {
1179 }
catch(boost::bad_any_cast
const&
e) {
1184 std::cout <<
"Data file not specified." << std::endl;
1189 std::vector<std::string> findMatch;
1190 if(vm.count(kFindMatchOpt)) {
1192 findMatch = vm[
kFindMatchOpt].as<std::vector<std::string> >();
1193 }
catch(boost::bad_any_cast
const&
e) {
1199 bool dontPrintProducts =
false;
1200 if(vm.count(kDontPrintProductsOpt)) {
1201 dontPrintProducts=
true;
1205 gErrorIgnoreLevel =
kError;
1208 ROOT::Cintex::Cintex::Enable();
1211 excludeESModules, showAllModules, showTopLevelPSets, findMatch, dontPrintProducts);
1228 std::cerr <<
"Unknown exception caught\n";
std::stringstream errorLog_
static char const *const kDontPrintProductsCommandOpt
collection_type::const_iterator const_iterator
virtual char const * what() const
T getParameter(std::string const &) const
const_iterator begin() const
std::string const & idToParameterSetBlobsBranchName()
std::string const & BranchTypeToMetaDataTreeName(BranchType const &branchType)
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)
tuple start
Check for commandline option errors.
static char const *const kDependenciesOpt
std::string const & parentageTreeName()
static char const *const kFindMatchCommandOpt
static char const *const kShowTopLevelPSetsCommandOpt
ParameterSetID id() const
static ThreadSafeRegistry * instance()
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)
bool getMapped(key_type const &k, value_type &result) const
static char const *const kHelpOpt
HistoryNode historyGraph_
ProcessHistoryRegistry::collection_type ProcessHistoryMap
static char const *const kDontPrintProductsOpt
std::string const & eventSelectionsBranchName()
std::ostream & operator<<(std::ostream &out, const ALILine &li)
void dumpEventFilteringParameterSets_(TFile *file)
bool insertMapped(value_type const &v)
edm::ProcessHistoryVector phv_
void fillProductRegistryTransients(std::vector< ProcessConfiguration > const &pcVec, ProductRegistry const &preg, bool okToRegister=false)
static ServiceToken createContaining(std::auto_ptr< T > iService)
create a service token that holds the service defined by iService
static char const *const kDependenciesCommandOpt
std::vector< EventSelectionID > EventSelectionIDVector
static char const *const kHelpCommandOpt
std::string const & parameterSetsTreeName()
void setID(ParameterSetID const &id) const
static char const *const kShowTopLevelPSetsOpt
int main(int argc, char **argv)
ProcessConfigurationRegistry::vector_type ProcessConfigurationVector
std::vector< BranchID > const & parents() const
ProductList const & productList() const
static char const *const kShowAllModulesCommandOpt
ParameterSet const & pset() const
static char const *const kExcludeESModulesCommandOpt
std::string const & processHistoryMapBranchName()
static char const *const kSortOpt
bool extendedDescendants_
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)
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)
ProcessHistoryRegistry::vector_type ProcessHistoryVector
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
std::vector< ParameterSet > const & vpset() const
ProvenanceDumper & operator=(ProvenanceDumper const &)=delete
std::string const & metaDataTreeName()
std::string const & BranchTypeToProductTreeName(BranchType const &branchType)
std::unique_ptr< TFile > inputFile_
static char const *const kExtendedAncestorsCommandOpt
std::string const & parameterSetMapBranchName()
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
void dumpProcessHistory_()
edm::ProcessConfigurationVector phc_
psettable const & psetTable() const
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
ParameterSet const & getParameterSet(std::string const &) const
static char const *const kShowAllModulesOpt
std::string const & parentageBranchName()
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
std::string const & processConfigurationBranchName()
const_iterator end() const
vpsettable const & vpsetTable() const
static char const *const kFileNameCommandOpt
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
tuple size
Write out results.
std::string const & moduleDescriptionMapBranchName()
static std::string topLevelPSet(std::string const &iName, edm::ParameterSet const &iProcessConfig, std::string const &iProcessName)
static char const *const kExtendedDescendantsCommandOpt
void printErrors(std::ostream &os)
static char const *const kFindMatchOpt