CMS 3D CMS Logo

MergeableCounter.cc
Go to the documentation of this file.
3 #include <ostream>
4 #include <utility>
5 
6 namespace edm {
7 
9  if (a.value > 0 && value + a.value < a.value) {
10  edm::LogWarning("MergeableCounter|ProductsNotMergeable")
11  << "The merge would lead to an overflow of the counter" << std::endl;
12  return false;
13  }
14  value += a.value;
15  return true;
16  }
17 
19 } // namespace edm
MessageLogger.h
edm
HLT enums.
Definition: AlignableModifier.h:19
MergeableCounter.h
edm::MergeableCounter::value
int value
Definition: MergeableCounter.h:11
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
edm::MergeableCounter::swap
void swap(MergeableCounter &iOther)
Definition: MergeableCounter.cc:18
edm::LogWarning
Definition: MessageLogger.h:141
a
double a
Definition: hdecay.h:119
edm::MergeableCounter
Definition: MergeableCounter.h:6
value
Definition: value.py:1
edm::MergeableCounter::mergeProduct
bool mergeProduct(MergeableCounter const &newThing)
Definition: MergeableCounter.cc:8