CMS 3D CMS Logo

TkMeasurementDetSet.cc
Go to the documentation of this file.
1 #include "TkMeasurementDetSet.h"
2 
4  activeThisPeriod_.resize(size,true);
5  id_.resize(size);
6  subId_.resize(size);
7  totalStrips_.resize(size);
8 
9  bad128Strip_.resize(size*6);
10  hasAny128StripBad_.resize(size);
11  badStripBlocks_.resize(size);
12 }
13 
14 
16  int offset = nbad128*i;
17  if (idx == -1) {
18  std::fill(bad128Strip_.begin()+offset, bad128Strip_.begin()+offset+6, !good);
19  hasAny128StripBad_[i] = !good;
20  } else {
21  bad128Strip_[offset+idx] = !good;
22  if (good == false) {
23  hasAny128StripBad_[i] = false;
24  } else { // this should not happen, as usually you turn on all fibers
25  // and then turn off the bad ones, and not vice-versa,
26  // so I don't care if it's not optimized
27  hasAny128StripBad_[i] = true;
28  for (int j = 0; i < (totalStrips_[j] >> 7); j++) {
29  if (bad128Strip_[j+offset] == false) {hasAny128StripBad_[i] = false; break;}
30  }
31  }
32  }
33  }
34 
35 
37  activeThisPeriod_.resize(size,true);
38  id_.resize(size);
39 }
40 
42  activeThisPeriod_.resize(size,true);
43  id_.resize(size);
44 }
45 
size
Write out results.
std::vector< std::vector< BadStripBlock > > badStripBlocks_
std::vector< unsigned char > subId_
std::vector< int > totalStrips_
std::vector< bool > hasAny128StripBad_
std::vector< bool > activeThisPeriod_
std::vector< unsigned int > id_
std::vector< bool > bad128Strip_
void set128StripStatus(int i, bool good, int idx=-1)