10 #include "TDictAttributeMap.h"
32 availableOnlyAtEndTransition_(
false),
33 isMergeable_(
false) {}
61 bool availableOnlyAtEndTransition,
62 std::set<std::string>
const&
aliases)
63 : branchType_(branchType),
65 processName_(processName),
67 fullClassName_(className),
68 friendlyClassName_(friendlyClassName),
69 productInstanceName_(productInstanceName),
70 branchAliases_(aliases),
85 : branchType_(aliasForBranch.branchType()),
89 fullClassName_(aliasForBranch.
className()),
90 friendlyClassName_(aliasForBranch.friendlyClassName()),
91 productInstanceName_(productInstanceAlias),
92 branchAliases_(aliasForBranch.branchAliases()),
93 aliasForBranchID_(aliasForBranch.branchID()),
111 char const underscore(
'_');
117 <<
"' contains an underscore ('_'), which is illegal in the name of a product.\n";
128 <<
"' contains an underscore ('_'), which is illegal in a product instance name.\n";
131 if (
processName_.find(underscore) != std::string::npos) {
134 <<
"' contains an underscore ('_'), which is illegal in a process name.\n";
141 brName += underscore;
143 brName += underscore;
145 brName += underscore;
193 if (wp && wp->HasKey(
"persistent") && !strcmp(wp->GetPropertyAsString(
"persistent"),
"false")) {
202 char const underscore(
'_');
203 if (
moduleLabel_.find(underscore) != std::string::npos) {
206 <<
"' contains an underscore ('_'), which is illegal in a module label.\n";
210 if (wp && wp->HasKey(
"splitLevel")) {
211 setSplitLevel(strtol(wp->GetPropertyAsString(
"splitLevel"),
nullptr, 0));
214 <<
" is specified for class " <<
wrappedName() <<
".'\n";
218 if (wp && wp->HasKey(
"basketSize")) {
219 setBasketSize(strtol(wp->GetPropertyAsString(
"basketSize"),
nullptr, 0));
222 <<
" is specified for class " <<
wrappedName() <<
"'.\n";
238 <<
") differs from aliasForBranch (" << aliasForBranch.
branchType()
239 <<
").\nPlease report this error to the FWCore developers";
243 "aliasForBranch.\nPlease report this error to the FWCore developers";
247 <<
"BranchDescription::setSwitchAliasForBranch: unwrapped type info (" <<
unwrappedTypeID().
name()
249 <<
").\nPlease report this error to the FWCore developers";
258 os <<
"Branch Type = " <<
branchType() << std::endl;
259 os <<
"Process Name = " <<
processName() << std::endl;
260 os <<
"ModuleLabel = " <<
moduleLabel() << std::endl;
261 os <<
"Branch ID = " <<
branchID() <<
'\n';
269 e <<
"Problem using an incomplete BranchDescription\n"
270 << txt <<
"\nPlease report this error to the FWCore developers";
352 std::ostringstream differences;
354 differences <<
"Branch name '" << b.
branchName() <<
"' does not match '" << a.
branchName() <<
"'.\n";
363 differences <<
" in file '" << fileName <<
"', but a(n) '" << a.
branchType()
364 <<
"' branch in previous files.\n";
367 differences <<
"Branch '" << b.
branchName() <<
"' has a branch ID of '" << b.
branchID() <<
"'\n";
368 differences <<
" in file '" << fileName <<
"', but '" << a.
branchID() <<
"' in previous files.\n";
372 differences <<
" in file '" << fileName <<
"', but '" << a.
fullClassName() <<
"' in previous files.\n";
375 differences <<
"Branch '" << a.
branchName() <<
"' was dropped in the first input file but is present in '"
376 << fileName <<
"'.\n";
378 return differences.str();
bool operator<(DetSet< T > const &x, DetSet< T > const &y)
constexpr bool operator==(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
std::string const & branchName() const
BranchType const & branchType() const
static int const invalidSplitLevel
static int const invalidBasketSize
void setOnDemand(bool isOnDemand)
std::string const & processName() const
void write(std::ostream &os) const
void setWrappedType(TypeWithDict const &type)
static TypeWithDict byName(std::string const &name)
BranchID switchAliasForBranchID_
void setTransient(bool isTransient)
TClass * getClass() const
BranchID aliasForBranchID_
void throwIfInvalid_() const
std::string friendlyName(std::string const &iFullName)
std::string const & moduleLabel() const
std::string const & productInstanceName() const
bool combinable(BranchDescription const &a, BranchDescription const &b)
std::string fullClassName_
void initFromDictionary()
TypeID unwrappedTypeID() const
void setWrappedName(std::string const &name)
void setSplitLevel(int level)
std::string productInstanceName_
std::string const & friendlyClassName() const
BranchID const & branchID() const
TypeWithDict const & unwrappedType() const
void setDropped(bool isDropped)
void updateFriendlyClassName()
std::type_info const & typeInfo() const
std::string const & moduleName() const
void throwExceptionWithText(char const *txt)
std::string const & fullClassName() const
bool availableOnlyAtEndTransition_
ParameterSetID const & parameterSetID() const
std::string wrappedClassName(std::string const &iFullName)
void addContext(std::string const &context)
std::set< std::string > const & branchAliases() const
std::string moduleName(StableProvenance const &provenance, ProcessHistory const &history)
std::set< std::string > branchAliases_
std::string friendlyClassName_
BranchID const & originalBranchID() const
ParameterSetID parameterSetID_
bool availableOnlyAtEndTransition() const
void setUnwrappedType(TypeWithDict const &type)
void setBasketSize(int size)
void setProduced(bool isProduced)
void setSwitchAliasForBranch(BranchDescription const &aliasForBranch)
const char * name() const
std::string const & wrappedName() const
tuple size
Write out results.
std::string className(const T &t)
TypeWithDict const & wrappedType() const
void setID(std::string const &branchName)
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)
void merge(BranchDescription const &other)