CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
ApvAnalysisFactory Class Reference

#include <ApvAnalysisFactory.h>

Public Types

typedef std::map< uint32_t,
ApvAnalysisVector
ApvAnalysisMap
 
typedef std::vector
< ApvAnalysis * > 
ApvAnalysisVector
 
typedef std::map< ApvAnalysis
*, uint32_t > 
InverseMap
 
typedef std::map< ApvAnalysis
*, int > 
MapNumberingPosition
 

Public Member Functions

 ApvAnalysisFactory (std::string theAlgorithmType, int theNumCMstripsInGroup, int theMaskCalcFlag, float theMaskNoiseCut, float theMaskDeadCut, float theMaskTruncCut, float theCutToAvoidSignal, int theEventInitNumber, int theEventIterNumber)
 
 ApvAnalysisFactory (const edm::ParameterSet &pset)
 
ApvAnalysisVector getApvAnalysis (const uint32_t nDET_ID)
 
void getCommonMode (uint32_t det_id, ApvAnalysis::PedestalType &tmp)
 
std::vector< float > getCommonMode (uint32_t det_id, int apvNumber)
 
void getCommonModeSlope (uint32_t det_id, ApvAnalysis::PedestalType &tmp)
 
float getCommonModeSlope (uint32_t det_id, int apvNumber)
 
void getMask (uint32_t det_id, TkApvMask::MaskType &tmp)
 
void getNoise (uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
 
void getNoise (uint32_t det_id, ApvAnalysis::PedestalType &noise)
 
void getPedestal (uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &peds)
 
void getPedestal (uint32_t det_id, ApvAnalysis::PedestalType &peds)
 
void getRawNoise (uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
 
void getRawNoise (uint32_t det_id, ApvAnalysis::PedestalType &noise)
 
std::string getStatus (uint32_t det_id)
 
float getStripNoise (uint32_t det_id, int stripNumber)
 
float getStripPedestal (uint32_t det_id, int stripNumber)
 
float getStripRawNoise (uint32_t det_id, int stripNumber)
 
bool instantiateApvs (uint32_t det_id, int numberOfApvs)
 
bool isUpdating (uint32_t detId)
 
void update (uint32_t det_id, const edm::DetSet< SiStripRawDigi > &in)
 
void updatePair (uint32_t det_id, size_t apvPair, const edm::DetSet< SiStripRawDigi > &in)
 
 ~ApvAnalysisFactory ()
 

Private Member Functions

void constructAuxiliaryApvClasses (ApvAnalysis *theApv, uint32_t det_id, int thisApv)
 
void deleteApv (ApvAnalysis *apv)
 

Private Attributes

ApvAnalysisMap apvMap_
 
std::string theAlgorithmType_
 
std::string theCMType_
 
float theCutToAvoidSignal_
 
int theEventInitNumber_
 
int theEventIterNumber_
 
int theMaskCalcFlag_
 
float theMaskDeadCut_
 
float theMaskNoiseCut_
 
float theMaskTruncCut_
 
int theNumCMstripsInGroup_
 
bool useDB_
 

Detailed Description

Definition at line 22 of file ApvAnalysisFactory.h.

Member Typedef Documentation

Definition at line 68 of file ApvAnalysisFactory.h.

Definition at line 24 of file ApvAnalysisFactory.h.

typedef std::map<ApvAnalysis*, uint32_t> ApvAnalysisFactory::InverseMap

Definition at line 70 of file ApvAnalysisFactory.h.

Definition at line 69 of file ApvAnalysisFactory.h.

Constructor & Destructor Documentation

ApvAnalysisFactory::ApvAnalysisFactory ( std::string  theAlgorithmType,
int  theNumCMstripsInGroup,
int  theMaskCalcFlag,
float  theMaskNoiseCut,
float  theMaskDeadCut,
float  theMaskTruncCut,
float  theCutToAvoidSignal,
int  theEventInitNumber,
int  theEventIterNumber 
)
ApvAnalysisFactory::ApvAnalysisFactory ( const edm::ParameterSet pset)

Definition at line 27 of file ApvAnalysisFactory.cc.

References edm::ParameterSet::getParameter().

27  {
28  theCMType_ = pset.getParameter<string>("CMType");
29  useDB_ = pset.getParameter<bool>("useDB");
30 
31  theAlgorithmType_ = pset.getParameter<string>("CalculatorAlgorithm");
32  theNumCMstripsInGroup_ = pset.getParameter<int>("NumCMstripsInGroup");
33  theMaskCalcFlag_ = pset.getParameter<int>("MaskCalculationFlag");
34 
35  theMaskNoiseCut_ = pset.getParameter<double>("MaskNoiseCut");
36  theMaskDeadCut_ = pset.getParameter<double>("MaskDeadCut");
37  theMaskTruncCut_ = pset.getParameter<double>("MaskTruncationCut");
38  theCutToAvoidSignal_ = pset.getParameter<double>("CutToAvoidSignal");
39 
40  theEventInitNumber_ = pset.getParameter<int>("NumberOfEventsForInit");
41  theEventIterNumber_ = pset.getParameter<int>("NumberOfEventsForIteration");
42  apvMap_.clear();
43 }
ApvAnalysisMap apvMap_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::string theAlgorithmType_
ApvAnalysisFactory::~ApvAnalysisFactory ( )

Definition at line 45 of file ApvAnalysisFactory.cc.

45  {
46  ApvAnalysisFactory::ApvAnalysisMap::iterator it = apvMap_.begin();
47  for (; it != apvMap_.end(); it++) {
48  vector<ApvAnalysis*>::iterator myApv = (*it).second.begin();
49  for (; myApv != (*it).second.end(); myApv++)
50  deleteApv(*myApv);
51  }
52  apvMap_.clear();
53 }
ApvAnalysisMap apvMap_
void deleteApv(ApvAnalysis *apv)

Member Function Documentation

void ApvAnalysisFactory::constructAuxiliaryApvClasses ( ApvAnalysis theApv,
uint32_t  det_id,
int  thisApv 
)
private

Definition at line 81 of file ApvAnalysisFactory.cc.

References gather_cfg::cout, TkCommonModeCalculator::setCM(), ApvAnalysis::setCommonModeCalculator(), ApvAnalysis::setMask(), ApvAnalysis::setNoiseCalculator(), ApvAnalysis::setPedestalCalculator(), and TkCommonMode::setTopology().

81  {
82  //----------------------------------------------------------------
83  // Create the ped/noise/CMN calculators, zero suppressors etc.
84  // (Is called by addDetUnitAndConstructApvs()).
85  //
86  // N.B. Don't call this twice for the same APV!
87  //-----------------------------------------------------------------
88  // cout<<"VirtualApvAnalysisFactory::constructAuxiliaryApvClasses"<<endl;
89  TkPedestalCalculator* thePedestal = nullptr;
90  TkNoiseCalculator* theNoise = nullptr;
91  TkApvMask* theMask = nullptr;
92  TkCommonModeCalculator* theCM = nullptr;
93 
94  TkCommonMode* theCommonMode = new TkCommonMode();
96  theCommonMode->setTopology(theTopology);
97 
98  // Create desired algorithms.
99  if (theAlgorithmType_ == "TT6") {
103  theCM = new TT6CommonModeCalculator(theNoise, theMask, theCutToAvoidSignal_);
104  } else if ("TT6NT" == theAlgorithmType_) {
107  thePedestal = new TT6NTPedestalCalculator;
108  theCM = new TT6CommonModeCalculator(theNoise, theMask, theCutToAvoidSignal_);
109  } else if (theAlgorithmType_ == "MIX") {
110  // the mask as to be defined also for SimplePedCalculator
112 
114 
116 
117  if (theCMType_ == "Median") {
118  theCM = new MedianCommonModeCalculator();
119  } else {
120  cout << "Sorry Only Median is available for now, Mean and FastLinear are coming soon" << endl;
121  }
122  }
123 
124  if (theCommonMode)
125  theCM->setCM(theCommonMode);
126  if (thePedestal)
127  theAPV->setPedestalCalculator(*thePedestal);
128  if (theNoise)
129  theAPV->setNoiseCalculator(*theNoise);
130  if (theMask)
131  theAPV->setMask(*theMask);
132  if (theCM)
133  theAPV->setCommonModeCalculator(*theCM);
134 }
virtual void setCM(TkCommonMode *)=0
virtual void setTopology(TkCommonModeTopology *in)
Definition: TkCommonMode.h:18
std::string theAlgorithmType_
tuple cout
Definition: gather_cfg.py:144
void ApvAnalysisFactory::deleteApv ( ApvAnalysis apv)
private

Definition at line 353 of file ApvAnalysisFactory.cc.

References TkCommonModeCalculator::commonMode(), ApvAnalysis::commonModeCalculator(), ApvAnalysis::mask(), ApvAnalysis::noiseCalculator(), ApvAnalysis::pedestalCalculator(), and TkCommonMode::topology().

353  {
354  delete &(apv->pedestalCalculator());
355  delete &(apv->noiseCalculator());
356  delete &(apv->mask());
357  delete &(apv->commonModeCalculator().commonMode()->topology());
358  delete (apv->commonModeCalculator().commonMode());
359  delete &(apv->commonModeCalculator());
360  delete apv;
361 }
TkCommonModeCalculator & commonModeCalculator()
Definition: ApvAnalysis.h:58
virtual TkCommonMode * commonMode()=0
TkPedestalCalculator & pedestalCalculator()
Definition: ApvAnalysis.h:59
virtual TkCommonModeTopology & topology()
Definition: TkCommonMode.h:17
TkApvMask & mask()
Definition: ApvAnalysis.h:61
TkNoiseCalculator & noiseCalculator()
Definition: ApvAnalysis.h:60
std::vector< ApvAnalysis * > ApvAnalysisFactory::getApvAnalysis ( const uint32_t  nDET_ID)

Definition at line 75 of file ApvAnalysisFactory.cc.

Referenced by NoiseTask::book().

75  {
76  ApvAnalysisMap::const_iterator _apvAnalysisIter = apvMap_.find(nDET_ID);
77 
78  return apvMap_.end() != _apvAnalysisIter ? _apvAnalysisIter->second : std::vector<ApvAnalysis*>();
79 }
ApvAnalysisMap apvMap_
void ApvAnalysisFactory::getCommonMode ( uint32_t  det_id,
ApvAnalysis::PedestalType tmp 
)

Definition at line 311 of file ApvAnalysisFactory.cc.

References mps_fire::i.

Referenced by SiStripMonitorPedestals::analyze(), and NoiseTask::update().

311  {
312  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
313  if (apvAnalysisIt != apvMap_.end()) {
314  vector<ApvAnalysis*> theApvs = apvAnalysisIt->second;
315  for (unsigned int i = 0; i < theApvs.size(); i++) {
316  //To be fixed. We return only the first one in the vector.
317  vector<float> tmp_cm = theApvs[i]->commonModeCalculator().commonMode()->returnAsVector();
318  for (unsigned int it = 0; it < tmp_cm.size(); it++)
319  tmp.push_back(tmp_cm[it]);
320  }
321  }
322 }
ApvAnalysisMap apvMap_
tmp
align.sh
Definition: createJobs.py:716
vector< float > ApvAnalysisFactory::getCommonMode ( uint32_t  det_id,
int  apvNumber 
)

Definition at line 300 of file ApvAnalysisFactory.cc.

References createJobs::tmp.

300  {
301  vector<float> tmp;
302  tmp.clear();
303  map<uint32_t, vector<ApvAnalysis*> >::const_iterator theApvs_map = apvMap_.find(detId);
304  if (theApvs_map != apvMap_.end()) {
305  vector<ApvAnalysis*> theApvs = theApvs_map->second;
306 
307  tmp = theApvs[apvNumber]->commonModeCalculator().commonMode()->returnAsVector();
308  }
309  return tmp;
310 }
ApvAnalysisMap apvMap_
tmp
align.sh
Definition: createJobs.py:716
void ApvAnalysisFactory::getCommonModeSlope ( uint32_t  det_id,
ApvAnalysis::PedestalType tmp 
)

Definition at line 375 of file ApvAnalysisFactory.cc.

References mps_fire::i.

Referenced by SiStripMonitorPedestals::analyze().

375  {
376  tmp.clear();
377  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
378  if (apvAnalysisIt != apvMap_.end()) {
379  vector<ApvAnalysis*> theApvs = apvAnalysisIt->second;
380  for (unsigned int i = 0; i < theApvs.size(); i++) {
381  tmp.push_back(theApvs[i]->commonModeCalculator().getCMSlope());
382  }
383  }
384 }
ApvAnalysisMap apvMap_
tmp
align.sh
Definition: createJobs.py:716
float ApvAnalysisFactory::getCommonModeSlope ( uint32_t  det_id,
int  apvNumber 
)

Definition at line 365 of file ApvAnalysisFactory.cc.

References createJobs::tmp.

365  {
366  map<uint32_t, vector<ApvAnalysis*> >::const_iterator theApvs_map = apvMap_.find(detId);
367  float tmp = -100.0;
368  if (theApvs_map != apvMap_.end()) {
369  vector<ApvAnalysis*> theApvs = theApvs_map->second;
370  tmp = theApvs[apvNumber]->commonModeCalculator().getCMSlope();
371  return tmp;
372  }
373  return tmp;
374 }
ApvAnalysisMap apvMap_
tmp
align.sh
Definition: createJobs.py:716
void ApvAnalysisFactory::getMask ( uint32_t  det_id,
TkApvMask::MaskType tmp 
)

Definition at line 324 of file ApvAnalysisFactory.cc.

References mps_fire::i, and cuy::ii.

Referenced by SiStripMonitorPedestals::analyze().

324  {
325  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(det_id);
326  if (apvAnalysisIt != apvMap_.end()) {
327  vector<ApvAnalysis*> theApvs = apvAnalysisIt->second;
328  for (unsigned int i = 0; i < theApvs.size(); i++) {
329  TkApvMask::MaskType theMaskType = (theApvs[i]->mask()).mask();
330  //cout <<"theMaskType size "<<theMaskType.size()<<endl;
331 
332  for (unsigned int ii = 0; ii < theMaskType.size(); ii++) {
333  tmp.push_back(theMaskType[ii]);
334  //cout <<"The Value "<<theMaskType[ii]<<" "<<ii<<endl;
335  }
336  }
337  }
338 }
std::vector< StripMaskType > MaskType
Definition: TkApvMask.h:15
ApvAnalysisMap apvMap_
int ii
Definition: cuy.py:589
tmp
align.sh
Definition: createJobs.py:716
void ApvAnalysisFactory::getNoise ( uint32_t  det_id,
int  apvNumber,
ApvAnalysis::PedestalType noise 
)

Definition at line 230 of file ApvAnalysisFactory.cc.

Referenced by SiStripMonitorPedestals::analyze(), and NoiseTask::update().

230  {
231  //Get the pedestal for a given apv
232  noise.clear();
233  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
234  if (apvAnalysisIt != apvMap_.end()) {
235  vector<ApvAnalysis*> theApvs = apvAnalysisIt->second;
236 
237  noise = theApvs[apvNumber]->noiseCalculator().noise();
238  }
239 }
ApvAnalysisMap apvMap_
__shared__ int noise
void ApvAnalysisFactory::getNoise ( uint32_t  det_id,
ApvAnalysis::PedestalType noise 
)

Definition at line 251 of file ApvAnalysisFactory.cc.

References SplitLinear::begin, dataset::end, and createJobs::tmp.

251  {
252  //Get the pedestal for a given apv
253  peds.clear();
254  map<uint32_t, vector<ApvAnalysis*> >::const_iterator theApvs_map = apvMap_.find(detId);
255  if (theApvs_map != apvMap_.end()) {
256  vector<ApvAnalysis*>::const_iterator theApvs = (theApvs_map->second).begin();
257  for (; theApvs != (theApvs_map->second).end(); theApvs++) {
258  ApvAnalysis::PedestalType tmp = (*theApvs)->noiseCalculator().noise();
259  for (ApvAnalysis::PedestalType::const_iterator pit = tmp.begin(); pit != tmp.end(); pit++)
260  peds.push_back(*pit);
261  }
262  }
263 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:44
ApvAnalysisMap apvMap_
string end
Definition: dataset.py:937
tmp
align.sh
Definition: createJobs.py:716
void ApvAnalysisFactory::getPedestal ( uint32_t  det_id,
int  apvNumber,
ApvAnalysis::PedestalType peds 
)

Definition at line 198 of file ApvAnalysisFactory.cc.

Referenced by SiStripMonitorPedestals::analyze(), PedsOnlyTask::update(), and NoiseTask::update().

198  {
199  //Get the pedestal for a given apv
200  peds.clear();
201  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
202  if (apvAnalysisIt != apvMap_.end()) {
203  vector<ApvAnalysis*> myApvs = apvAnalysisIt->second;
204  peds = myApvs[apvNumber]->pedestalCalculator().pedestal();
205  }
206 }
ApvAnalysisMap apvMap_
void ApvAnalysisFactory::getPedestal ( uint32_t  det_id,
ApvAnalysis::PedestalType peds 
)

Definition at line 208 of file ApvAnalysisFactory.cc.

References createJobs::tmp.

208  {
209  //Get the pedestal for a given apv
210  peds.clear();
211  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
212  if (apvAnalysisIt != apvMap_.end()) {
213  vector<ApvAnalysis*> theApvs = apvAnalysisIt->second;
214  for (vector<ApvAnalysis*>::const_iterator it = theApvs.begin(); it != theApvs.end(); it++) {
215  ApvAnalysis::PedestalType tmp = (*it)->pedestalCalculator().pedestal();
216  for (ApvAnalysis::PedestalType::const_iterator pit = tmp.begin(); pit != tmp.end(); pit++)
217  peds.push_back(*pit);
218  }
219  }
220 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:44
ApvAnalysisMap apvMap_
tmp
align.sh
Definition: createJobs.py:716
void ApvAnalysisFactory::getRawNoise ( uint32_t  det_id,
int  apvNumber,
ApvAnalysis::PedestalType noise 
)

Definition at line 265 of file ApvAnalysisFactory.cc.

Referenced by SiStripMonitorPedestals::analyze(), and PedsOnlyTask::update().

265  {
266  //Get the pedestal for a given apv
267  noise.clear();
268  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
269  if (apvAnalysisIt != apvMap_.end()) {
270  vector<ApvAnalysis*> theApvs = apvAnalysisIt->second;
271 
272  noise = theApvs[apvNumber]->pedestalCalculator().rawNoise();
273  }
274 }
ApvAnalysisMap apvMap_
__shared__ int noise
void ApvAnalysisFactory::getRawNoise ( uint32_t  det_id,
ApvAnalysis::PedestalType noise 
)

Definition at line 286 of file ApvAnalysisFactory.cc.

References SplitLinear::begin, dataset::end, and createJobs::tmp.

286  {
287  //Get the pedestal for a given apv
288  peds.clear();
289  map<uint32_t, vector<ApvAnalysis*> >::const_iterator theApvs_map = apvMap_.find(detId);
290  if (theApvs_map != apvMap_.end()) {
291  vector<ApvAnalysis*>::const_iterator theApvs = (theApvs_map->second).begin();
292  for (; theApvs != (theApvs_map->second).end(); theApvs++) {
293  ApvAnalysis::PedestalType tmp = (*theApvs)->pedestalCalculator().rawNoise();
294  for (ApvAnalysis::PedestalType::const_iterator pit = tmp.begin(); pit != tmp.end(); pit++)
295  peds.push_back(*pit);
296  }
297  }
298 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:44
ApvAnalysisMap apvMap_
string end
Definition: dataset.py:937
tmp
align.sh
Definition: createJobs.py:716
std::string ApvAnalysisFactory::getStatus ( uint32_t  det_id)
float ApvAnalysisFactory::getStripNoise ( uint32_t  det_id,
int  stripNumber 
)

Definition at line 241 of file ApvAnalysisFactory.cc.

References groupFilesInBlocks::temp.

241  {
242  //Get the pedestal for a given apv
244  int apvNumb = int(stripNumber / 128.);
245  int stripN = (stripNumber - apvNumb * 128);
246 
247  getNoise(detId, apvNumb, temp);
248  return temp[stripN];
249 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:44
void getNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
float ApvAnalysisFactory::getStripPedestal ( uint32_t  det_id,
int  stripNumber 
)

Definition at line 221 of file ApvAnalysisFactory.cc.

References groupFilesInBlocks::temp.

221  {
222  //Get the pedestal for a given apv
224  int apvNumb = int(stripNumber / 128.);
225  int stripN = (stripNumber - apvNumb * 128);
226 
227  getPedestal(detId, apvNumb, temp);
228  return temp[stripN];
229 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:44
void getPedestal(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &peds)
float ApvAnalysisFactory::getStripRawNoise ( uint32_t  det_id,
int  stripNumber 
)

Definition at line 276 of file ApvAnalysisFactory.cc.

References groupFilesInBlocks::temp.

276  {
277  //Get the pedestal for a given apv
279  int apvNumb = int(stripNumber / 128.);
280  int stripN = (stripNumber - apvNumb * 128);
281 
282  getRawNoise(detId, apvNumb, temp);
283  return temp[stripN];
284 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:44
void getRawNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
bool ApvAnalysisFactory::instantiateApvs ( uint32_t  det_id,
int  numberOfApvs 
)

Definition at line 57 of file ApvAnalysisFactory.cc.

References gather_cfg::cout, mps_fire::i, and groupFilesInBlocks::temp.

Referenced by PedsOnlyTask::book(), NoiseTask::book(), and SiStripMonitorPedestals::createMEs().

57  {
58  ApvAnalysisFactory::ApvAnalysisMap::iterator CPos = apvMap_.find(detId);
59  if (CPos != apvMap_.end()) {
60  cout << " APVs for Detector Id " << detId << " already created !!!" << endl;
61  ;
62  return false;
63  }
64  vector<ApvAnalysis*> temp;
65  for (int i = 0; i < numberOfApvs; i++) {
67  // constructAuxiliaryApvClasses(apvTmp);
68  constructAuxiliaryApvClasses(apvTmp, detId, i);
69  temp.push_back(apvTmp);
70  }
71  apvMap_.insert(pair<uint32_t, vector<ApvAnalysis*> >(detId, temp));
72  return true;
73 }
ApvAnalysisMap apvMap_
void constructAuxiliaryApvClasses(ApvAnalysis *theApv, uint32_t det_id, int thisApv)
tuple cout
Definition: gather_cfg.py:144
bool ApvAnalysisFactory::isUpdating ( uint32_t  detId)

Definition at line 339 of file ApvAnalysisFactory.cc.

References dataset::end.

339  {
340  bool updating = true;
341  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
342  if (apvAnalysisIt != apvMap_.end()) {
343  for (vector<ApvAnalysis*>::const_iterator apvIt = (apvAnalysisIt->second).begin();
344  apvIt != (apvAnalysisIt->second).end();
345  apvIt++) {
346  if (!((*apvIt)->pedestalCalculator().status()->isUpdating()))
347  updating = false;
348  }
349  }
350  return updating;
351 }
ApvAnalysisMap apvMap_
string end
Definition: dataset.py:937
void ApvAnalysisFactory::update ( uint32_t  det_id,
const edm::DetSet< SiStripRawDigi > &  in 
)

Definition at line 171 of file ApvAnalysisFactory.cc.

References edm::DetSet< T >::data, dataset::end, and mps_fire::i.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), SiStripMonitorPedestals::analyze(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

171  {
172  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
173  if (apvAnalysisIt != apvMap_.end()) {
174  size_t i = 0;
175  for (vector<ApvAnalysis*>::const_iterator apvIt = (apvAnalysisIt->second).begin();
176  apvIt != (apvAnalysisIt->second).end();
177  apvIt++) {
178  edm::DetSet<SiStripRawDigi> tmpRawDigi;
179  //it is missing the detId ...
180  tmpRawDigi.data.reserve(128);
181  size_t startStrip = 128 * i;
182  size_t stopStrip = startStrip + 128;
183 
184  for (size_t istrip = startStrip; istrip < stopStrip; istrip++) {
185  if (in.data.size() <= istrip)
186  tmpRawDigi.data.push_back(SiStripRawDigi(0));
187  else
188  tmpRawDigi.data.push_back(in.data[istrip]); //maybe dangerous
189  }
190 
191  (*apvIt)->newEvent();
192  (*apvIt)->updateCalibration(tmpRawDigi);
193  i++;
194  }
195  }
196 }
ApvAnalysisMap apvMap_
collection_type data
Definition: DetSet.h:80
string end
Definition: dataset.py:937
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
void ApvAnalysisFactory::updatePair ( uint32_t  det_id,
size_t  apvPair,
const edm::DetSet< SiStripRawDigi > &  in 
)

Definition at line 136 of file ApvAnalysisFactory.cc.

References edm::DetSet< T >::data, and dataset::end.

Referenced by PedsOnlyTask::fill(), and NoiseTask::fill().

136  {
137  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
138  if (apvAnalysisIt != apvMap_.end()) {
139  size_t iter = 0;
140 
141  for (vector<ApvAnalysis*>::const_iterator apvIt = (apvAnalysisIt->second).begin();
142  apvIt != (apvAnalysisIt->second).end();
143  apvIt++) {
144  if (iter == pairNumber * 2 || iter == (2 * pairNumber + 1)) {
145  // cout << "ApvAnalysisFactory::updatePair pair number " << pairNumber << endl;
146  // cout << "ApvAnlysis will be updated for the apv # " << iter << endl;
147 
148  edm::DetSet<SiStripRawDigi> tmpRawDigi;
149  tmpRawDigi.data.reserve(128);
150 
151  size_t startStrip = 128 * (iter % 2);
152  size_t stopStrip = startStrip + 128;
153 
154  for (size_t istrip = startStrip; istrip < stopStrip; istrip++) {
155  if (in.data.size() <= istrip)
156  tmpRawDigi.data.push_back(SiStripRawDigi(0));
157  else
158  tmpRawDigi.data.push_back(in.data[istrip]); //maybe dangerous
159  }
160 
161  (*apvIt)->newEvent();
162  (*apvIt)->updateCalibration(tmpRawDigi);
163  }
164 
165  iter++;
166  }
167  }
168 
169 } // void
ApvAnalysisMap apvMap_
collection_type data
Definition: DetSet.h:80
string end
Definition: dataset.py:937
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...

Member Data Documentation

ApvAnalysisMap ApvAnalysisFactory::apvMap_
private

Definition at line 76 of file ApvAnalysisFactory.h.

std::string ApvAnalysisFactory::theAlgorithmType_
private

Definition at line 77 of file ApvAnalysisFactory.h.

std::string ApvAnalysisFactory::theCMType_
private

Definition at line 86 of file ApvAnalysisFactory.h.

float ApvAnalysisFactory::theCutToAvoidSignal_
private

Definition at line 83 of file ApvAnalysisFactory.h.

int ApvAnalysisFactory::theEventInitNumber_
private

Definition at line 84 of file ApvAnalysisFactory.h.

int ApvAnalysisFactory::theEventIterNumber_
private

Definition at line 85 of file ApvAnalysisFactory.h.

int ApvAnalysisFactory::theMaskCalcFlag_
private

Definition at line 79 of file ApvAnalysisFactory.h.

float ApvAnalysisFactory::theMaskDeadCut_
private

Definition at line 81 of file ApvAnalysisFactory.h.

float ApvAnalysisFactory::theMaskNoiseCut_
private

Definition at line 80 of file ApvAnalysisFactory.h.

float ApvAnalysisFactory::theMaskTruncCut_
private

Definition at line 82 of file ApvAnalysisFactory.h.

int ApvAnalysisFactory::theNumCMstripsInGroup_
private

Definition at line 78 of file ApvAnalysisFactory.h.

bool ApvAnalysisFactory::useDB_
private

Definition at line 87 of file ApvAnalysisFactory.h.