CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
StorageAccount::Counter Struct Reference

#include <StorageAccount.h>

Public Member Functions

 Counter ()
 
 Counter (Counter const &iOther)
 

Static Public Member Functions

static void addTo (std::atomic< double > &iAtomic, double iToAdd)
 

Public Attributes

std::atomic< uint64_t > amount
 
std::atomic< double > amount_square
 
std::atomic< uint64_t > attempts
 
std::atomic< uint64_t > successes
 
std::atomic< double > timeMax
 
std::atomic< double > timeMin
 
std::atomic< double > timeTotal
 
std::atomic< int64_t > vector_count
 
std::atomic< int64_t > vector_square
 

Detailed Description

Definition at line 39 of file StorageAccount.h.

Constructor & Destructor Documentation

StorageAccount::Counter::Counter ( )
inline

Definition at line 40 of file StorageAccount.h.

References summarizeEdmComparisonLogfiles::successes, HLT_2018_cff::timeMax, and HLT_2018_cff::timeMin.

41  : attempts{0},
42  successes{0},
43  amount{0},
44  amount_square{0.},
45  vector_count{0},
46  vector_square{0},
47  timeTotal{0.},
48  timeMin{0.},
49  timeMax{0.} {}
std::atomic< double > timeMax
std::atomic< uint64_t > attempts
std::atomic< int64_t > vector_square
std::atomic< int64_t > vector_count
std::atomic< double > timeMin
std::atomic< uint64_t > successes
std::atomic< double > amount_square
std::atomic< uint64_t > amount
std::atomic< double > timeTotal
StorageAccount::Counter::Counter ( Counter const &  iOther)
inline

Definition at line 55 of file StorageAccount.h.

References attempts, summarizeEdmComparisonLogfiles::successes, HLT_2018_cff::timeMax, and HLT_2018_cff::timeMin.

56  : attempts{iOther.attempts.load()},
57  successes{iOther.successes.load()},
58  amount{iOther.amount.load()},
59  amount_square{iOther.amount_square.load()},
60  vector_count{iOther.vector_count.load()},
61  vector_square{iOther.vector_square.load()},
62  timeTotal{iOther.timeTotal.load()},
63  timeMin{iOther.timeMin.load()},
64  timeMax{iOther.timeMax.load()} {}
std::atomic< double > timeMax
std::atomic< uint64_t > attempts
std::atomic< int64_t > vector_square
std::atomic< int64_t > vector_count
std::atomic< double > timeMin
std::atomic< uint64_t > successes
std::atomic< double > amount_square
std::atomic< uint64_t > amount
std::atomic< double > timeTotal

Member Function Documentation

static void StorageAccount::Counter::addTo ( std::atomic< double > &  iAtomic,
double  iToAdd 
)
inlinestatic

Definition at line 84 of file StorageAccount.h.

Referenced by StorageAccount::Stamp::tick().

84  {
85  double oldValue = iAtomic.load();
86  double newValue = oldValue + iToAdd;
87  while (not iAtomic.compare_exchange_weak(oldValue, newValue)) {
88  newValue = oldValue + iToAdd;
89  }
90  }

Member Data Documentation

std::atomic<uint64_t> StorageAccount::Counter::amount

Definition at line 74 of file StorageAccount.h.

Referenced by StorageAccount::Stamp::tick().

std::atomic<double> StorageAccount::Counter::amount_square

Definition at line 77 of file StorageAccount.h.

Referenced by StorageAccount::Stamp::tick().

std::atomic<uint64_t> StorageAccount::Counter::attempts

Definition at line 72 of file StorageAccount.h.

Referenced by Counter(), and StorageAccount::Stamp::Stamp().

std::atomic<uint64_t> StorageAccount::Counter::successes

Definition at line 73 of file StorageAccount.h.

Referenced by StorageAccount::Stamp::tick().

std::atomic<double> StorageAccount::Counter::timeMax

Definition at line 82 of file StorageAccount.h.

Referenced by StorageAccount::Stamp::tick().

std::atomic<double> StorageAccount::Counter::timeMin

Definition at line 81 of file StorageAccount.h.

Referenced by StorageAccount::Stamp::tick().

std::atomic<double> StorageAccount::Counter::timeTotal

Definition at line 80 of file StorageAccount.h.

Referenced by StorageAccount::Stamp::tick().

std::atomic<int64_t> StorageAccount::Counter::vector_count

Definition at line 78 of file StorageAccount.h.

Referenced by StorageAccount::Stamp::tick().

std::atomic<int64_t> StorageAccount::Counter::vector_square

Definition at line 79 of file StorageAccount.h.

Referenced by StorageAccount::Stamp::tick().