CMS 3D CMS Logo

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();
8  iItems != vItems.end(); ++iItems){
9 
10  stcode=iItems->getStatusCode();
11  if(stcode!=0)
12  errorCount ++;
13 
14  }
15 }
16 
17 template <class Item>
18 void getEndCapErrorSummary(typename std::vector<Item> vItems,long unsigned int & errorCountEE1,
19  long unsigned int & errorCountEE2,long unsigned int & totalEE1,long unsigned int & totalEE2){
20 
21  unsigned int stcode = 0;
22  EEDetId endcapId;
23  long unsigned int count=0;
24 
25  for(typename std::vector<Item>::const_iterator iItems = vItems.begin();
26  iItems != vItems.end(); ++iItems){
27 
28  stcode=iItems->getStatusCode();
29  if(stcode!=0){
30  endcapId = EEDetId::detIdFromDenseIndex(count);
31  if(endcapId.zside() == -1) errorCountEE1++;
32  if(endcapId.zside() == +1) errorCountEE2++;
33  }
34 
35  if(endcapId.zside() == -1) totalEE1++;
36  if(endcapId.zside() == +1) totalEE2++;
37  count++;
38  }
39 
40 
41 }
static EEDetId detIdFromDenseIndex(uint32_t din)
Definition: EEDetId.h:220
int zside() const
Definition: EEDetId.h:70
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)