CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
edm::MergeableCounter Struct Reference

#include <MergeableCounter.h>

Public Member Functions

bool mergeProduct (MergeableCounter const &newThing)
 
 ~MergeableCounter ()
 

Public Attributes

int value
 

Detailed Description

Definition at line 6 of file MergeableCounter.h.

Constructor & Destructor Documentation

edm::MergeableCounter::~MergeableCounter ( )
inline

Definition at line 7 of file MergeableCounter.h.

References mergeProduct().

7 {}

Member Function Documentation

bool edm::MergeableCounter::mergeProduct ( MergeableCounter const &  newThing)

Definition at line 8 of file MergeableCounter.cc.

References value.

Referenced by ~MergeableCounter().

9  {
10  if (a.value > 0 && value+a.value < a.value){
11  edm::LogWarning("MergeableCounter|ProductsNotMergeable")
12  << "The merge would lead to an overflow of the counter" << std::endl;
13  return false;
14  }
15  value += a.value;
16  return true;
17  }
Definition: value.py:1
double a
Definition: hdecay.h:121

Member Data Documentation

int edm::MergeableCounter::value