CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
DQMStoreStats.cc File Reference
#include "DQMServices/Components/src/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

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

Definition at line 20 of file DQMStoreStats.cc.

References i, and query::result.

Referenced by DQMStoreStats::calcstats().

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