CMS 3D CMS Logo

Public Member Functions | Public Attributes

edm::MergeableCounter Struct Reference

#include <MergeableCounter.h>

List of all members.

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.

{}

Member Function Documentation

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

Definition at line 7 of file MergeableCounter.cc.

References value.

  {
    if (a.value > 0 && value+a.value < a.value){
      edm::LogWarning("MergeableCounter|ProductsNotMergeable")
        << "The merge would lead to an overflow of the counter" << std::endl;
      return false;
    }
    value += a.value;
    return true;
  }

Member Data Documentation

Definition at line 9 of file MergeableCounter.h.

Referenced by mergeProduct().