CMS 3D CMS Logo

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, ApvAnalysisVectorApvAnalysisMap
 
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 25 of file ApvAnalysisFactory.h.

Member Typedef Documentation

Definition at line 73 of file ApvAnalysisFactory.h.

Definition at line 28 of file ApvAnalysisFactory.h.

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

Definition at line 75 of file ApvAnalysisFactory.h.

Definition at line 74 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 26 of file ApvAnalysisFactory.cc.

References edm::ParameterSet::getParameter().

26  {
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 
44 
45 }
T getParameter(std::string const &) const
ApvAnalysisMap apvMap_
std::string theAlgorithmType_
ApvAnalysisFactory::~ApvAnalysisFactory ( )

Definition at line 47 of file ApvAnalysisFactory.cc.

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

Member Function Documentation

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

Definition at line 87 of file ApvAnalysisFactory.cc.

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

90 {
91  //----------------------------------------------------------------
92  // Create the ped/noise/CMN calculators, zero suppressors etc.
93  // (Is called by addDetUnitAndConstructApvs()).
94  //
95  // N.B. Don't call this twice for the same APV!
96  //-----------------------------------------------------------------
97  // cout<<"VirtualApvAnalysisFactory::constructAuxiliaryApvClasses"<<endl;
98  TkPedestalCalculator* thePedestal =nullptr;
99  TkNoiseCalculator* theNoise=nullptr;
100  TkApvMask* theMask=nullptr;
101  TkCommonModeCalculator* theCM=nullptr;
102 
103  TkCommonMode* theCommonMode = new TkCommonMode();
105  theCommonMode->setTopology(theTopology);
106 
107  // Create desired algorithms.
108  if( theAlgorithmType_ == "TT6") {
112  theCM = new TT6CommonModeCalculator (theNoise, theMask, theCutToAvoidSignal_);
113  } else if( "TT6NT" == theAlgorithmType_) {
114  theMask = new TT6ApvMask( theMaskCalcFlag_,
118  theNoise = new TT6NoiseCalculator( theEventInitNumber_,
121  thePedestal = new TT6NTPedestalCalculator;
122  theCM = new TT6CommonModeCalculator( theNoise,
123  theMask,
125  } else if (theAlgorithmType_ == "MIX") {
126  // the mask as to be defined also for SimplePedCalculator
128 
130 
132 
133  if (theCMType_ == "Median"){
134  theCM = new MedianCommonModeCalculator ();
135  } else {
136  cout << "Sorry Only Median is available for now, Mean and FastLinear are coming soon" << endl;
137  }
138  }
139 
140 
141  if(theCommonMode)
142  theCM->setCM(theCommonMode);
143  if(thePedestal)
144  theAPV->setPedestalCalculator(*thePedestal);
145  if(theNoise)
146  theAPV->setNoiseCalculator(*theNoise);
147  if(theMask)
148  theAPV->setMask(*theMask);
149  if(theCM)
150  theAPV->setCommonModeCalculator(*theCM);
151 
152 
153 
154 }
virtual void setCM(TkCommonMode *)=0
virtual void setTopology(TkCommonModeTopology *in)
Definition: TkCommonMode.h:18
std::string theAlgorithmType_
void ApvAnalysisFactory::deleteApv ( ApvAnalysis apv)
private

Definition at line 421 of file ApvAnalysisFactory.cc.

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

421  {
422  delete &(apv->pedestalCalculator());
423  delete &(apv->noiseCalculator());
424  delete &(apv->mask());
425  delete &(apv->commonModeCalculator().commonMode()->topology());
426  delete (apv->commonModeCalculator().commonMode());
427  delete &(apv->commonModeCalculator());
428  delete apv;
429 
430 }
TkCommonModeCalculator & commonModeCalculator()
Definition: ApvAnalysis.h:62
virtual TkCommonMode * commonMode()=0
TkPedestalCalculator & pedestalCalculator()
Definition: ApvAnalysis.h:63
virtual TkCommonModeTopology & topology()
Definition: TkCommonMode.h:17
TkApvMask & mask()
Definition: ApvAnalysis.h:65
TkNoiseCalculator & noiseCalculator()
Definition: ApvAnalysis.h:64
std::vector< ApvAnalysis * > ApvAnalysisFactory::getApvAnalysis ( const uint32_t  nDET_ID)

Definition at line 80 of file ApvAnalysisFactory.cc.

Referenced by NoiseTask::book().

81 {
82  ApvAnalysisMap::const_iterator _apvAnalysisIter = apvMap_.find( nDET_ID);
83 
84  return apvMap_.end() != _apvAnalysisIter ? _apvAnalysisIter->second : std::vector<ApvAnalysis *>();
85 }
ApvAnalysisMap apvMap_
void ApvAnalysisFactory::getCommonMode ( uint32_t  det_id,
ApvAnalysis::PedestalType tmp 
)

Definition at line 369 of file ApvAnalysisFactory.cc.

References mps_fire::i.

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

370 {
371 
372  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
373  if(apvAnalysisIt != apvMap_.end())
374  {
375  vector<ApvAnalysis* > theApvs = apvAnalysisIt->second;
376  for( unsigned int i=0; i< theApvs.size(); i++)
377  {
378  //To be fixed. We return only the first one in the vector.
379  vector<float> tmp_cm = theApvs[i]->commonModeCalculator().commonMode()->returnAsVector();
380  for( unsigned int it = 0; it < tmp_cm.size(); it++)
381  tmp.push_back( tmp_cm[it]);
382  }
383  }
384 }
ApvAnalysisMap apvMap_
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
vector< float > ApvAnalysisFactory::getCommonMode ( uint32_t  det_id,
int  apvNumber 
)

Definition at line 356 of file ApvAnalysisFactory.cc.

References tmp.

357 {
358  vector<float> tmp;
359  tmp.clear();
360  map<uint32_t, vector<ApvAnalysis* > >::const_iterator theApvs_map = apvMap_.find(detId);
361  if(theApvs_map != apvMap_.end())
362  {
363  vector<ApvAnalysis* > theApvs = theApvs_map->second;
364 
365  tmp = theApvs[apvNumber]->commonModeCalculator().commonMode()->returnAsVector();
366  }
367  return tmp;
368 }
ApvAnalysisMap apvMap_
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void ApvAnalysisFactory::getCommonModeSlope ( uint32_t  det_id,
ApvAnalysis::PedestalType tmp 
)

Definition at line 444 of file ApvAnalysisFactory.cc.

References mps_fire::i.

Referenced by SiStripMonitorPedestals::analyze().

445 {
446  tmp.clear();
447  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
448  if(apvAnalysisIt != apvMap_.end()) {
449  vector<ApvAnalysis* > theApvs = apvAnalysisIt->second;
450  for( unsigned int i=0; i< theApvs.size(); i++) {
451  tmp.push_back(theApvs[i]->commonModeCalculator().getCMSlope());
452  }
453  }
454 }
ApvAnalysisMap apvMap_
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
float ApvAnalysisFactory::getCommonModeSlope ( uint32_t  det_id,
int  apvNumber 
)

Definition at line 434 of file ApvAnalysisFactory.cc.

References tmp.

434  {
435  map<uint32_t, vector<ApvAnalysis* > >::const_iterator theApvs_map = apvMap_.find(detId);
436  float tmp = -100.0;
437  if(theApvs_map != apvMap_.end()) {
438  vector<ApvAnalysis* > theApvs = theApvs_map->second;
439  tmp = theApvs[apvNumber]->commonModeCalculator().getCMSlope();
440  return tmp;
441  }
442  return tmp;
443 }
ApvAnalysisMap apvMap_
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void ApvAnalysisFactory::getMask ( uint32_t  det_id,
TkApvMask::MaskType tmp 
)

Definition at line 386 of file ApvAnalysisFactory.cc.

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

Referenced by SiStripMonitorPedestals::analyze().

387 {
388 
389  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(det_id);
390  if(apvAnalysisIt != apvMap_.end()) {
391  vector<ApvAnalysis* > theApvs = apvAnalysisIt->second;
392  for( unsigned int i=0; i< theApvs.size(); i++)
393  {
394  TkApvMask::MaskType theMaskType = ( theApvs[i]->mask()).mask();
395  //cout <<"theMaskType size "<<theMaskType.size()<<endl;
396 
397  for( unsigned int ii=0;ii<theMaskType.size();ii++)
398  {
399  tmp.push_back(theMaskType[ii]);
400  //cout <<"The Value "<<theMaskType[ii]<<" "<<ii<<endl;
401  }
402  }
403  }
404 }
std::vector< StripMaskType > MaskType
Definition: TkApvMask.h:17
ApvAnalysisMap apvMap_
ii
Definition: cuy.py:588
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void ApvAnalysisFactory::getNoise ( uint32_t  det_id,
int  apvNumber,
ApvAnalysis::PedestalType noise 
)

Definition at line 269 of file ApvAnalysisFactory.cc.

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

270 {
271  //Get the pedestal for a given apv
272  noise.clear();
273  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
274  if(apvAnalysisIt != apvMap_.end())
275  {
276  vector<ApvAnalysis* > theApvs = apvAnalysisIt->second;
277 
278  noise = theApvs[apvNumber]->noiseCalculator().noise();
279  }
280 }
ApvAnalysisMap apvMap_
void ApvAnalysisFactory::getNoise ( uint32_t  det_id,
ApvAnalysis::PedestalType noise 
)

Definition at line 294 of file ApvAnalysisFactory.cc.

References begin, end, and tmp.

295 {
296  //Get the pedestal for a given apv
297  peds.clear();
298  map<uint32_t, vector<ApvAnalysis* > >::const_iterator theApvs_map = apvMap_.find(detId);
299  if(theApvs_map != apvMap_.end())
300  {
301  vector<ApvAnalysis*>::const_iterator theApvs = (theApvs_map->second).begin();
302  for(; theApvs != (theApvs_map->second).end();theApvs++)
303  {
304  ApvAnalysis::PedestalType tmp = (*theApvs)->noiseCalculator().noise();
305  for(ApvAnalysis::PedestalType::const_iterator pit =tmp.begin(); pit!=tmp.end(); pit++)
306  peds.push_back(*pit);
307  }
308  }
309 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:48
ApvAnalysisMap apvMap_
#define end
Definition: vmac.h:39
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
#define begin
Definition: vmac.h:32
void ApvAnalysisFactory::getPedestal ( uint32_t  det_id,
int  apvNumber,
ApvAnalysis::PedestalType peds 
)

Definition at line 229 of file ApvAnalysisFactory.cc.

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

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

Definition at line 242 of file ApvAnalysisFactory.cc.

References tmp.

243 {
244  //Get the pedestal for a given apv
245  peds.clear();
246  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
247  if(apvAnalysisIt != apvMap_.end())
248  {
249  vector<ApvAnalysis* > theApvs = apvAnalysisIt->second;
250  for(vector<ApvAnalysis*>::const_iterator it = theApvs.begin(); it != theApvs.end();it++)
251  {
252  ApvAnalysis::PedestalType tmp = (*it)->pedestalCalculator().pedestal();
253  for(ApvAnalysis::PedestalType::const_iterator pit =tmp.begin(); pit!=tmp.end(); pit++)
254  peds.push_back(*pit);
255  }
256  }
257 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:48
ApvAnalysisMap apvMap_
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void ApvAnalysisFactory::getRawNoise ( uint32_t  det_id,
int  apvNumber,
ApvAnalysis::PedestalType noise 
)

Definition at line 312 of file ApvAnalysisFactory.cc.

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

313 {
314  //Get the pedestal for a given apv
315  noise.clear();
316  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
317  if(apvAnalysisIt != apvMap_.end())
318  {
319  vector<ApvAnalysis* > theApvs = apvAnalysisIt->second;
320 
321  noise = theApvs[apvNumber]->pedestalCalculator().rawNoise();
322  }
323 }
ApvAnalysisMap apvMap_
void ApvAnalysisFactory::getRawNoise ( uint32_t  det_id,
ApvAnalysis::PedestalType noise 
)

Definition at line 337 of file ApvAnalysisFactory.cc.

References begin, end, and tmp.

338 {
339  //Get the pedestal for a given apv
340  peds.clear();
341  map<uint32_t, vector<ApvAnalysis* > >::const_iterator theApvs_map = apvMap_.find(detId);
342  if(theApvs_map != apvMap_.end())
343  {
344  vector<ApvAnalysis*>::const_iterator theApvs = (theApvs_map->second).begin();
345  for(; theApvs != (theApvs_map->second).end();theApvs++)
346  {
347  ApvAnalysis::PedestalType tmp = (*theApvs)->pedestalCalculator().rawNoise();
348  for(ApvAnalysis::PedestalType::const_iterator pit =tmp.begin(); pit!=tmp.end(); pit++)
349  peds.push_back(*pit);
350  }
351  }
352 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:48
ApvAnalysisMap apvMap_
#define end
Definition: vmac.h:39
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
#define begin
Definition: vmac.h:32
std::string ApvAnalysisFactory::getStatus ( uint32_t  det_id)
float ApvAnalysisFactory::getStripNoise ( uint32_t  det_id,
int  stripNumber 
)

Definition at line 282 of file ApvAnalysisFactory.cc.

References createfilelist::int, and groupFilesInBlocks::temp.

283 {
284  //Get the pedestal for a given apv
286  int apvNumb = int(stripNumber / 128.);
287  int stripN = (stripNumber - apvNumb*128);
288 
289  getNoise(detId, apvNumb, temp);
290  return temp[stripN];
291 
292 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:48
void getNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
float ApvAnalysisFactory::getStripPedestal ( uint32_t  det_id,
int  stripNumber 
)

Definition at line 258 of file ApvAnalysisFactory.cc.

References createfilelist::int, and groupFilesInBlocks::temp.

259 {
260  //Get the pedestal for a given apv
262  int apvNumb = int(stripNumber / 128.);
263  int stripN = (stripNumber - apvNumb*128);
264 
265  getPedestal(detId, apvNumb, temp);
266  return temp[stripN];
267 
268 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:48
void getPedestal(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &peds)
float ApvAnalysisFactory::getStripRawNoise ( uint32_t  det_id,
int  stripNumber 
)

Definition at line 325 of file ApvAnalysisFactory.cc.

References createfilelist::int, and groupFilesInBlocks::temp.

326 {
327  //Get the pedestal for a given apv
329  int apvNumb = int(stripNumber / 128.);
330  int stripN = (stripNumber - apvNumb*128);
331 
332  getRawNoise(detId, apvNumb, temp);
333  return temp[stripN];
334 
335 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:48
void getRawNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
bool ApvAnalysisFactory::instantiateApvs ( uint32_t  det_id,
int  numberOfApvs 
)

Definition at line 60 of file ApvAnalysisFactory.cc.

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

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

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

Definition at line 405 of file ApvAnalysisFactory.cc.

References end.

406 {
407  bool updating = true;
408  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
409  if(apvAnalysisIt != apvMap_.end())
410  {
411  for(vector<ApvAnalysis*>::const_iterator apvIt = (apvAnalysisIt->second).begin(); apvIt != (apvAnalysisIt->second).end(); apvIt++)
412  {
413  if(!( (*apvIt)->pedestalCalculator().status()->isUpdating() ))
414  updating = false;
415  }
416  }
417  return updating;
418 
419 }
ApvAnalysisMap apvMap_
#define end
Definition: vmac.h:39
void ApvAnalysisFactory::update ( uint32_t  det_id,
const edm::DetSet< SiStripRawDigi > &  in 
)

Definition at line 199 of file ApvAnalysisFactory.cc.

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

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), SiStripMonitorPedestals::analyze(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

200 {
201  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
202  if(apvAnalysisIt != apvMap_.end())
203  {
204  size_t i=0;
205  for(vector<ApvAnalysis*>::const_iterator apvIt = (apvAnalysisIt->second).begin(); apvIt != (apvAnalysisIt->second).end(); apvIt++)
206  {
207  edm::DetSet<SiStripRawDigi> tmpRawDigi;
208  //it is missing the detId ...
209  tmpRawDigi.data.reserve(128);
210  size_t startStrip = 128*i;
211  size_t stopStrip = startStrip + 128;
212 
213  for( size_t istrip = startStrip; istrip < stopStrip;istrip++)
214  {
215  if( in.data.size() <= istrip) tmpRawDigi.data.push_back(0);
216  else tmpRawDigi.data.push_back(in.data[istrip]); //maybe dangerous
217  }
218 
219  (*apvIt)->newEvent();
220  (*apvIt)->updateCalibration(tmpRawDigi);
221  i++;
222  }
223  }
224 
225 }
ApvAnalysisMap apvMap_
#define end
Definition: vmac.h:39
collection_type data
Definition: DetSet.h:78
void ApvAnalysisFactory::updatePair ( uint32_t  det_id,
size_t  apvPair,
const edm::DetSet< SiStripRawDigi > &  in 
)

Definition at line 157 of file ApvAnalysisFactory.cc.

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

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

158 {
159  map<uint32_t, vector<ApvAnalysis*> >::const_iterator apvAnalysisIt = apvMap_.find(detId);
160  if(apvAnalysisIt != apvMap_.end())
161  {
162  size_t iter=0;
163 
164  for(vector<ApvAnalysis*>::const_iterator apvIt = (apvAnalysisIt->second).begin(); apvIt != (apvAnalysisIt->second).end(); apvIt++)
165  {
166 
167  if (iter==pairNumber*2 || iter==(2*pairNumber+1)){
168 
169  // cout << "ApvAnalysisFactory::updatePair pair number " << pairNumber << endl;
170  // cout << "ApvAnlysis will be updated for the apv # " << iter << endl;
171 
172  edm::DetSet<SiStripRawDigi> tmpRawDigi;
173  tmpRawDigi.data.reserve(128);
174 
175  size_t startStrip = 128*(iter%2);
176  size_t stopStrip = startStrip + 128;
177 
178  for( size_t istrip = startStrip; istrip < stopStrip;istrip++)
179  {
180  if(in.data.size() <= istrip) tmpRawDigi.data.push_back( 0);
181  else tmpRawDigi.data.push_back(in.data[istrip]); //maybe dangerous
182  }
183 
184  (*apvIt)->newEvent();
185  (*apvIt)->updateCalibration(tmpRawDigi);
186 
187  }
188 
189  iter++;
190  }
191  }
192 
193 }// void
ApvAnalysisMap apvMap_
#define end
Definition: vmac.h:39
collection_type data
Definition: DetSet.h:78

Member Data Documentation

ApvAnalysisMap ApvAnalysisFactory::apvMap_
private

Definition at line 81 of file ApvAnalysisFactory.h.

std::string ApvAnalysisFactory::theAlgorithmType_
private

Definition at line 82 of file ApvAnalysisFactory.h.

std::string ApvAnalysisFactory::theCMType_
private

Definition at line 91 of file ApvAnalysisFactory.h.

float ApvAnalysisFactory::theCutToAvoidSignal_
private

Definition at line 88 of file ApvAnalysisFactory.h.

int ApvAnalysisFactory::theEventInitNumber_
private

Definition at line 89 of file ApvAnalysisFactory.h.

int ApvAnalysisFactory::theEventIterNumber_
private

Definition at line 90 of file ApvAnalysisFactory.h.

int ApvAnalysisFactory::theMaskCalcFlag_
private

Definition at line 84 of file ApvAnalysisFactory.h.

float ApvAnalysisFactory::theMaskDeadCut_
private

Definition at line 86 of file ApvAnalysisFactory.h.

float ApvAnalysisFactory::theMaskNoiseCut_
private

Definition at line 85 of file ApvAnalysisFactory.h.

float ApvAnalysisFactory::theMaskTruncCut_
private

Definition at line 87 of file ApvAnalysisFactory.h.

int ApvAnalysisFactory::theNumCMstripsInGroup_
private

Definition at line 83 of file ApvAnalysisFactory.h.

bool ApvAnalysisFactory::useDB_
private

Definition at line 92 of file ApvAnalysisFactory.h.