CMS 3D CMS Logo

Functions
DQMStoreStats.cc File Reference
#include "DQMStoreStats.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/MessageLogger/interface/JobReport.h"

Go to the source code of this file.

Functions

template<class T >
static unsigned int getEmptyMetric (T *array, int lenx, int leny, int lenz)
 

Function Documentation

◆ getEmptyMetric()

template<class T >
static unsigned int getEmptyMetric ( T array,
int  lenx,
int  leny,
int  lenz 
)
static

Definition at line 17 of file DQMStoreStats.cc.

17  {
18  // len{x,y,z} MUST include under/overflow bins.
19  unsigned int len = lenx + leny + lenz;
20  unsigned int result = 0;
21  // start from 1 to exclude underflow bin. The comparison is accurate
22  // since it takes properly into account under/overflow bins, for all
23  // kind of histograms.
24  for (unsigned int i = 1; i < len; ++i) {
25  // get rid of under/overflow bins for x,y,z axis, to have a correct statistics.
26  if (i % (lenx - 1) == 0)
27  continue;
28  if (i % lenx == 0)
29  continue;
30  if (i % (lenx + leny - 1) == 0)
31  continue;
32  if (i % (lenx + leny) == 0)
33  continue;
34  if (i % (lenx + leny + lenz - 1) == 0)
35  continue;
36 
37  if (array[i] == 0)
38  result += 1;
39  }
40 
41  return result;
42 }

References mps_check::array, mps_fire::i, and mps_fire::result.

Referenced by DQMStoreStats::calcstats().

mps_fire.i
i
Definition: mps_fire.py:428
mps_check.array
array
Definition: mps_check.py:216
mps_fire.result
result
Definition: mps_fire.py:311