CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalBadCrystalsCount.h
Go to the documentation of this file.
3 
4 template <class Item>
5 void getBarrelErrorSummary(typename std::vector<Item> vItems, long unsigned int& errorCount) {
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 }
13 
14 template <class Item>
15 void getEndCapErrorSummary(typename std::vector<Item> vItems,
16  long unsigned int& errorCountEE1,
17  long unsigned int& errorCountEE2,
18  long unsigned int& totalEE1,
19  long unsigned int& totalEE2) {
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
void getEndCapErrorSummary(typename std::vector< Item > vItems, long unsigned int &errorCountEE1, long unsigned int &errorCountEE2, long unsigned int &totalEE1, long unsigned int &totalEE2)
void getBarrelErrorSummary(typename std::vector< Item > vItems, long unsigned int &errorCount)