Main Page
Namespaces
Classes
Package Documentation
src
DataFormats
Common
src
MergeableCounter.cc
Go to the documentation of this file.
1
#include "
DataFormats/Common/interface/MergeableCounter.h
"
2
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
3
#include <ostream>
4
#include <utility>
5
6
namespace
edm
7
{
8
9
bool
MergeableCounter::mergeProduct
(
MergeableCounter
const
&
a
)
10
{
11
if
(a.
value
> 0 &&
value
+a.
value
< a.
value
){
12
edm::LogWarning
(
"MergeableCounter|ProductsNotMergeable"
)
13
<<
"The merge would lead to an overflow of the counter"
<< std::endl;
14
return
false
;
15
}
16
value
+= a.
value
;
17
return
true
;
18
}
19
20
void
MergeableCounter::swap
(
MergeableCounter
& iOther) {
21
std::swap
(
value
, iOther.
value
);
22
}
23
}
MessageLogger.h
edm::MergeableCounter::mergeProduct
bool mergeProduct(MergeableCounter const &newThing)
Definition:
MergeableCounter.cc:9
edm::LogWarning
Definition:
MessageLogger.h:141
edm::MergeableCounter
Definition:
MergeableCounter.h:6
edm::MergeableCounter::swap
void swap(MergeableCounter &iOther)
Definition:
MergeableCounter.cc:20
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition:
DataFrameContainer.h:236
value
Definition:
value.py:1
edm::MergeableCounter::value
int value
Definition:
MergeableCounter.h:11
MergeableCounter.h
edm
HLT enums.
Definition:
AlignableModifier.h:17
a
double a
Definition:
hdecay.h:121
Generated for CMSSW Reference Manual by
1.8.11