CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
EcalBadCrystalsCount.h File Reference
#include "DataFormats/EcalDetId/interface/EBDetId.h"
#include "DataFormats/EcalDetId/interface/EEDetId.h"

Go to the source code of this file.

Functions

template<class Item >
void getBarrelErrorSummary (typename std::vector< Item > vItems, long unsigned int &errorCount)
 
template<class Item >
void getEndCapErrorSummary (typename std::vector< Item > vItems, long unsigned int &errorCountEE1, long unsigned int &errorCountEE2, long unsigned int &totalEE1, long unsigned int &totalEE2)
 

Function Documentation

template<class Item >
void getBarrelErrorSummary ( typename std::vector< Item >  vItems,
long unsigned int &  errorCount 
)

Definition at line 5 of file EcalBadCrystalsCount.h.

5  {
6  unsigned int stcode = 0;
7  for (typename std::vector<Item>::const_iterator iItems = vItems.begin(); iItems != vItems.end(); ++iItems) {
8  stcode = iItems->getStatusCode();
9  if (stcode != 0)
10  errorCount++;
11  }
12 }
template<class Item >
void getEndCapErrorSummary ( typename std::vector< Item >  vItems,
long unsigned int &  errorCountEE1,
long unsigned int &  errorCountEE2,
long unsigned int &  totalEE1,
long unsigned int &  totalEE2 
)

Definition at line 15 of file EcalBadCrystalsCount.h.

References submitPVResolutionJobs::count, EEDetId::detIdFromDenseIndex(), and EEDetId::zside().

19  {
20  unsigned int stcode = 0;
21  EEDetId endcapId;
22  long unsigned int count = 0;
23 
24  for (typename std::vector<Item>::const_iterator iItems = vItems.begin(); iItems != vItems.end(); ++iItems) {
25  stcode = iItems->getStatusCode();
26  if (stcode != 0) {
27  endcapId = EEDetId::detIdFromDenseIndex(count);
28  if (endcapId.zside() == -1)
29  errorCountEE1++;
30  if (endcapId.zside() == +1)
31  errorCountEE2++;
32  }
33 
34  if (endcapId.zside() == -1)
35  totalEE1++;
36  if (endcapId.zside() == +1)
37  totalEE2++;
38  count++;
39  }
40 }
static EEDetId detIdFromDenseIndex(uint32_t din)
Definition: EEDetId.h:220
int zside() const
Definition: EEDetId.h:71