650 assert(0 != psetTree);
651 typedef std::pair<edm::ParameterSetID, edm::ParameterSetBlob> IdToBlobs;
653 IdToBlobs* pIdToBlob = &idToBlob;
655 for(
long long i = 0;
i != psetTree->GetEntries(); ++
i) {
656 psetTree->GetEntry(
i);
657 psm_.insert(idToBlob);
688 for(ParameterSetMap::const_iterator
i =
psm_.begin(), iEnd =
psm_.end();
i != iEnd; ++
i) {
697 for(edm::ProcessHistoryMap::const_iterator
i = phm.begin(),
e = phm.end();
i !=
e; ++
i) {
698 phv_.push_back(
i->second);
699 for(edm::ProcessConfigurationVector::const_iterator
j =
i->second.begin(),
f =
i->second.end();
j !=
f; ++
j) {
710 std::map<edm::BranchID, std::set<edm::ParentageID> > perProductParentage;
714 if(0 == parentageTree) {
715 std::cerr <<
"no Parentage tree available so can not show dependencies/n";
721 std::vector<edm::ParentageID> orderedParentageIDs;
722 orderedParentageIDs.reserve(parentageTree->GetEntries());
727 parentageTree->GetEntry(
i);
729 orderedParentageIDs.push_back(parentageBuffer.
id());
734 if(0 == eventMetaTree) {
737 if(0 == eventMetaTree) {
743 if(0!=storedProvBranch) {
744 std::vector<edm::StoredProductProvenance>
info;
745 std::vector<edm::StoredProductProvenance>* pInfo = &
info;
746 storedProvBranch->SetAddress(&pInfo);
747 for(Long64_t
i = 0, numEntries = eventMetaTree->GetEntries();
i <
numEntries; ++
i) {
748 storedProvBranch->GetEntry(
i);
749 for(std::vector<edm::StoredProductProvenance>::const_iterator it = info.begin(), itEnd = info.end();
752 perProductParentage[bid].insert(orderedParentageIDs[it->parentageIDIndex_]);
758 if (0 != productProvBranch) {
759 std::vector<edm::ProductProvenance>
info;
760 std::vector<edm::ProductProvenance>* pInfo = &
info;
761 productProvBranch->SetAddress(&pInfo);
762 for(Long64_t
i = 0, numEntries = eventMetaTree->GetEntries();
i <
numEntries; ++
i) {
763 productProvBranch->GetEntry(
i);
764 for(std::vector<edm::ProductProvenance>::const_iterator it = info.begin(), itEnd = info.end();
766 perProductParentage[it->branchID()].insert(it->parentageID());
770 std::cerr <<
" could not find provenance information so can not show dependencies\n";
783 std::cout <<
"---------Producers with data in file---------" << std::endl;
790 std::map<edm::BranchID, std::string> branchIDToBranchName;
792 for(edm::ProductRegistry::ProductList::const_iterator it =
800 branchIDToBranchName[it->second.branchID()] = it->second.branchName();
806 for(std::map<edm::ProcessConfigurationID, edm::ParameterSetID>::const_iterator
807 itId = it->second.parameterSetIDs().begin(),
808 itIdEnd = it->second.parameterSetIDs().end();
814 moduleToIdBranches[std::make_pair(it->second.processName(), it->second.moduleLabel())][s.str()].push_back(it->second);
818 for(ModuleToIdBranches::const_iterator it = moduleToIdBranches.begin(),
819 itEnd = moduleToIdBranches.end();
822 std::ostringstream sout;
823 sout <<
"Module: " << it->first.second <<
" " << it->first.first << std::endl;
825 for(IdToBranches::const_iterator itIdBranch = idToBranches.begin(),
826 itIdBranchEnd = idToBranches.end();
827 itIdBranch != itIdBranchEnd;
829 sout <<
" PSet id:" << itIdBranch->first << std::endl;
830 sout <<
" products: {" << std::endl;
831 std::set<edm::BranchID> branchIDs;
832 for(std::vector<edm::BranchDescription>::const_iterator itBranch = itIdBranch->second.begin(),
833 itBranchEnd = itIdBranch->second.end();
834 itBranch != itBranchEnd;
836 sout <<
" " << itBranch->branchName() << std::endl;
837 branchIDs.insert(itBranch->branchID());
839 sout <<
" }" << std::endl;
841 ParameterSetMap::const_iterator itpsm =
psm_.find(psid);
842 if(
psm_.end() == itpsm) {
844 errorLog_ <<
"No ParameterSetID for " << psid << std::endl;
847 sout <<
" parameters: ";
854 sout <<
" dependencies: {" << std::endl;
855 std::set<edm::ParentageID> parentageIDs;
856 for(std::set<edm::BranchID>::const_iterator itBranch = branchIDs.begin(), itBranchEnd = branchIDs.end();
857 itBranch != itBranchEnd;
859 std::set<edm::ParentageID>
const&
temp = perProductParentage[*itBranch];
860 parentageIDs.insert(temp.begin(), temp.end());
862 for(std::set<edm::ParentageID>::const_iterator itParentID = parentageIDs.begin(), itEndParentID = parentageIDs.end();
863 itParentID != itEndParentID;
867 for(std::vector<edm::BranchID>::const_iterator itBranch = parentage->
parents().begin(), itEndBranch = parentage->
parents().end();
868 itBranch != itEndBranch;
870 sout <<
" " << branchIDToBranchName[*itBranch] << std::endl;
873 sout <<
" ERROR:parentage info not in registry ParentageID=" << *itParentID << std::endl;
876 if(parentageIDs.empty()) {
877 sout <<
" no dependencies recorded (event may not contain data from this module)" << std::endl;
879 sout <<
" }" << std::endl;
887 std::cout <<
"---------Other Modules---------" << std::endl;
892 std::cout <<
"---------EventSetup---------" << std::endl;
897 std::cout <<
"---------Top Level PSets---------" << std::endl;
std::stringstream errorLog_
std::string const & idToParameterSetBlobsBranchName()
std::string const & BranchTypeToMetaDataTreeName(BranchType const &branchType)
std::string const & parentageTreeName()
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
static ThreadSafeRegistry * instance()
edm::ProductRegistry reg_
bool getMapped(key_type const &k, value_type &result) const
HistoryNode historyGraph_
ProcessHistoryRegistry::collection_type ProcessHistoryMap
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)
std::string const & parameterSetsTreeName()
void setID(ParameterSetID const &id) const
ProcessConfigurationRegistry::vector_type ProcessConfigurationVector
std::vector< BranchID > const & parents() const
ProductList const & productList() const
std::string const & processHistoryMapBranchName()
std::map< std::pair< std::string, std::string >, IdToBranches > ModuleToIdBranches
Long64_t numEntries(TFile *hdl, std::string const &trname)
ProcessHistoryRegistry::vector_type ProcessHistoryVector
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
std::string const & metaDataTreeName()
std::string const & BranchTypeToProductTreeName(BranchType const &branchType)
std::unique_ptr< TFile > inputFile_
std::string const & parameterSetMapBranchName()
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_
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
std::string const & parentageBranchName()
std::map< ParameterSetID, ParameterSetBlob > ParameterSetMap
std::string const & productDescriptionBranchName()
std::string const & processConfigurationBranchName()
author Stefano ARGIRO author Bill Tanenbaum
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
std::string const & moduleDescriptionMapBranchName()