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 17 of file DQMStoreStats.cc.

References i, and query::result.

Referenced by DQMStoreStats::calcstats().

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