CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
TriggerDiff Struct Reference

Public Member Functions

unsigned int total () const
 
 TriggerDiff ()
 

Static Public Member Functions

static std::string format (unsigned int value, char sign='+')
 

Public Attributes

unsigned int count
 
unsigned int gained
 
unsigned int internal
 
unsigned int lost
 

Detailed Description

Definition at line 385 of file hltDiff.cc.

Constructor & Destructor Documentation

◆ TriggerDiff()

TriggerDiff::TriggerDiff ( )
inline

Definition at line 386 of file hltDiff.cc.

386 : count(0), gained(0), lost(0), internal(0) {}

Member Function Documentation

◆ format()

static std::string TriggerDiff::format ( unsigned int  value,
char  sign = '+' 
)
inlinestatic

Definition at line 393 of file hltDiff.cc.

393  {
394  if (value == 0)
395  return std::string("-");
396 
397  char buffer[12]; // sign, 10 digits, null
398  memset(buffer, 0, 12);
399 
400  unsigned int digit = 10;
401  while (value > 0) {
402  buffer[digit] = value % 10 + 48;
403  value /= 10;
404  --digit;
405  }
406  buffer[digit] = sign;
407 
408  return std::string(buffer + digit);
409  }

References edmScanValgrind::buffer, Validation_hcalonly_cfi::sign, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by operator<<().

◆ total()

unsigned int TriggerDiff::total ( ) const
inline

Definition at line 411 of file hltDiff.cc.

411 { return this->gained + this->lost + this->internal; }

Member Data Documentation

◆ count

unsigned int TriggerDiff::count

◆ gained

unsigned int TriggerDiff::gained

Definition at line 389 of file hltDiff.cc.

◆ internal

unsigned int TriggerDiff::internal

Definition at line 391 of file hltDiff.cc.

◆ lost

unsigned int TriggerDiff::lost

Definition at line 390 of file hltDiff.cc.

TriggerDiff::count
unsigned int count
Definition: hltDiff.cc:388
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
TriggerDiff::gained
unsigned int gained
Definition: hltDiff.cc:389
edmScanValgrind.buffer
buffer
Definition: edmScanValgrind.py:171
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
value
Definition: value.py:1
TriggerDiff::lost
unsigned int lost
Definition: hltDiff.cc:390