Skip to content

Commit 5edc5d4

Browse files
committed
Renamed BranchChildren to ProductDependencies
Handled via a using statement.
1 parent 902cf5d commit 5edc5d4

File tree

14 files changed

+59
-36
lines changed

14 files changed

+59
-36
lines changed

DataFormats/Provenance/interface/BranchChildren.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
BranchChildren: Dependency information between branches.
77
88
----------------------------------------------------------------------*/
9+
#if !defined(DataFormats_Provenance_ProductDependencies_h)
10+
#error The name BranchChildren is deprecated, please use ProductDependencies instead.
11+
#endif
912

1013
#include <map>
1114
#include <set>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#if !defined(DataFormats_Provenance_ProductDependencies_h)
2+
#define DataFormats_Provenance_ProductDependencies_h
3+
#include "DataFormats/Provenance/interface/BranchChildren.h"
4+
5+
namespace edm {
6+
using ProductDependencies = BranchChildren;
7+
}
8+
9+
#endif
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#if !defined(DataFormats_Provenance_ProductDependenciesFwd_h)
2+
#define DataFormats_Provenance_ProductDependenciesFwd_h
3+
4+
namespace edm {
5+
class BranchChildren;
6+
using ProductDependencies = BranchChildren;
7+
} // namespace edm
8+
9+
#endif

DataFormats/Provenance/interface/SubProcessParentageHelper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define DataFormats_Provenance_SubProcessParentageHelper_h
33

44
// This class is used to properly fill Parentage in SubProcesses.
5-
// In particular it helps filling the BranchChildren container
5+
// In particular it helps filling the ProductDependencies container
66
// that is used when dropping descendants of products that
77
// have been dropped on input.
88
//

DataFormats/Provenance/src/BranchChildren.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "DataFormats/Provenance/interface/BranchChildren.h"
1+
#include "DataFormats/Provenance/interface/ProductDependencies.h"
22

33
#include "DataFormats/Provenance/interface/ProductDescription.h"
44

DataFormats/Provenance/src/classes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "DataFormats/Provenance/interface/ProductDescription.h"
2-
#include "DataFormats/Provenance/interface/BranchChildren.h"
2+
#include "DataFormats/Provenance/interface/ProductDependencies.h"
33
#include "DataFormats/Provenance/interface/BranchID.h"
44
#include "DataFormats/Provenance/interface/BranchKey.h"
55
#include "DataFormats/Provenance/interface/ElementID.h"

FWCore/Framework/interface/FileBlock.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ FileBlock: Properties of an input file.
88
----------------------------------------------------------------------*/
99

1010
#include "DataFormats/Provenance/interface/FileFormatVersion.h"
11-
#include "DataFormats/Provenance/interface/BranchChildren.h"
11+
#include "DataFormats/Provenance/interface/ProductDependencies.h"
1212
#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h"
1313
#include "FWCore/Utilities/interface/BranchType.h"
1414
class TTree;
@@ -69,7 +69,7 @@ namespace edm {
6969
fileName_(),
7070
branchListIndexesUnchanged_(false),
7171
modifiedIDs_(false),
72-
branchChildren_(new BranchChildren) {}
72+
productDependencies_(new ProductDependencies) {}
7373

7474
FileBlock(FileFormatVersion const& version,
7575
TTree* ev,
@@ -85,7 +85,7 @@ namespace edm {
8585
std::string const& fileName,
8686
bool branchListIndexesUnchanged,
8787
bool modifiedIDs,
88-
std::shared_ptr<BranchChildren const> branchChildren)
88+
std::shared_ptr<ProductDependencies const> productDependencies)
8989
: fileFormatVersion_(version),
9090
tree_(ev),
9191
metaTree_(meta),
@@ -100,7 +100,7 @@ namespace edm {
100100
fileName_(fileName),
101101
branchListIndexesUnchanged_(branchListIndexesUnchanged),
102102
modifiedIDs_(modifiedIDs),
103-
branchChildren_(branchChildren) {}
103+
productDependencies_(productDependencies) {}
104104

105105
~FileBlock() {}
106106

@@ -132,7 +132,7 @@ namespace edm {
132132
bool modifiedIDs() const { return modifiedIDs_; }
133133

134134
void setNotFastClonable(WhyNotFastClonable const& why) { whyNotFastClonable_ |= why; }
135-
BranchChildren const& branchChildren() const { return *branchChildren_; }
135+
ProductDependencies const& productDependencies() const { return *productDependencies_; }
136136
void close();
137137

138138
private:
@@ -151,7 +151,7 @@ namespace edm {
151151
std::string fileName_;
152152
bool branchListIndexesUnchanged_;
153153
bool modifiedIDs_;
154-
std::shared_ptr<BranchChildren const> branchChildren_;
154+
std::shared_ptr<ProductDependencies const> productDependencies_;
155155
};
156156
} // namespace edm
157157
#endif

FWCore/Sources/interface/DaqProvenanceHelper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "oneapi/tbb/concurrent_unordered_map.h"
88

99
#include "DataFormats/Provenance/interface/ProductDescription.h"
10+
#include "DataFormats/Provenance/interface/ProductDependenciesFwd.h"
1011
#include "DataFormats/Provenance/interface/ParentageID.h"
1112
#include "DataFormats/Provenance/interface/ProcessConfiguration.h"
1213
#include "DataFormats/Provenance/interface/ProcessHistoryID.h"
@@ -15,7 +16,6 @@
1516
#include "FWCore/ParameterSet/interface/ParameterSet.h"
1617

1718
namespace edm {
18-
class BranchChildren;
1919
class ProcessHistoryRegistry;
2020

2121
namespace dqh {
@@ -42,7 +42,7 @@ namespace edm {
4242
void fixMetaData(ProcessConfigurationVector& pcv, std::vector<ProcessHistory>& phv);
4343
void fixMetaData(std::vector<BranchID>& branchIDs) const;
4444
void fixMetaData(BranchIDLists const&) const;
45-
void fixMetaData(BranchChildren& branchChildren) const;
45+
void fixMetaData(ProductDependencies& productDependencies) const;
4646
ProcessHistoryID const& mapProcessHistoryID(ProcessHistoryID const& phid);
4747
ParentageID const& mapParentageID(ParentageID const& phid) const;
4848
BranchID const& mapBranchID(BranchID const& branchID) const;

FWCore/Sources/src/DaqProvenanceHelper.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include "FWCore/Sources/interface/DaqProvenanceHelper.h"
66

7-
#include "DataFormats/Provenance/interface/BranchChildren.h"
7+
#include "DataFormats/Provenance/interface/ProductDependencies.h"
88
#include "DataFormats/Provenance/interface/BranchIDList.h"
99
#include "DataFormats/Provenance/interface/ProcessHistory.h"
1010
#include "DataFormats/Provenance/interface/ProcessHistoryRegistry.h"
@@ -165,10 +165,10 @@ namespace edm {
165165
}
166166
}
167167

168-
void DaqProvenanceHelper::fixMetaData(BranchChildren& branchChildren) const {
168+
void DaqProvenanceHelper::fixMetaData(ProductDependencies& productDependencies) const {
169169
typedef std::map<BranchID, std::set<BranchID> > BCMap;
170170
// The const_cast is ugly, but it beats the alternatives.
171-
BCMap& childLookup = const_cast<BCMap&>(branchChildren.childLookup());
171+
BCMap& childLookup = const_cast<BCMap&>(productDependencies.childLookup());
172172
// First fix any old branchID's in the key.
173173
{
174174
BCMap::iterator i = childLookup.find(oldBranchID_);

IOPool/Input/src/RootFile.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ namespace edm {
244244
? eventTree_.tree()->GetBranch(poolNames::eventToProcessBlockIndexesBranchName().c_str())
245245
: nullptr),
246246
history_(),
247-
branchChildren_(new BranchChildren),
247+
productDependencies_(new ProductDependencies),
248248
duplicateChecker_(duplicateChecker),
249249
provenanceAdaptor_(),
250250
provenanceReaderMaker_(),
@@ -381,9 +381,9 @@ namespace edm {
381381
}
382382
}
383383

384-
BranchChildren* branchChildrenBuffer = branchChildren_.get();
384+
ProductDependencies* productDependenciesBuffer = productDependencies_.get();
385385
if (metaDataTree->FindBranch(poolNames::productDependenciesBranchName().c_str()) != nullptr) {
386-
metaDataTree->SetBranchAddress(poolNames::productDependenciesBranchName().c_str(), &branchChildrenBuffer);
386+
metaDataTree->SetBranchAddress(poolNames::productDependenciesBranchName().c_str(), &productDependenciesBuffer);
387387
}
388388

389389
// backward compatibility
@@ -495,7 +495,7 @@ namespace edm {
495495
// Fix up other per file metadata.
496496
daqProvenanceHelper_->fixMetaData(processConfigurations, pHistVector);
497497
daqProvenanceHelper_->fixMetaData(*branchIDLists_);
498-
daqProvenanceHelper_->fixMetaData(*branchChildren_);
498+
daqProvenanceHelper_->fixMetaData(*productDependencies_);
499499
}
500500
}
501501

@@ -797,7 +797,7 @@ namespace edm {
797797
file_,
798798
branchListIndexesUnchanged(),
799799
modifiedIDs(),
800-
branchChildren());
800+
productDependencies());
801801
}
802802

803803
void RootFile::updateFileBlock(FileBlock& fileBlock) {
@@ -1939,7 +1939,7 @@ namespace edm {
19391939
std::set<BranchID>& branchesToDrop,
19401940
std::map<BranchID, BranchID> const& droppedToKeptAlias) const {
19411941
if (dropDescendants) {
1942-
branchChildren_->appendToDescendants(branch, branchesToDrop, droppedToKeptAlias);
1942+
productDependencies_->appendToDescendants(branch, branchesToDrop, droppedToKeptAlias);
19431943
} else {
19441944
branchesToDrop.insert(branch.branchID());
19451945
}

0 commit comments

Comments
 (0)