CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
StMeasurementDetSet Class Reference

#include <TkMeasurementDetSet.h>

Public Types

typedef StripDetset::const_iterator new_const_iterator
 
typedef edmNew::DetSet< SiStripClusterStripDetset
 

Public Member Functions

const StMeasurementConditionSetconditions () const
 
void defineStrip (int i, std::pair< unsigned int, unsigned int > range)
 
const StripDetsetdetSet (int i) const
 
bool empty (int i) const
 
int find (unsigned int jd, int i=0) const
 
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle ()
 
const edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle () const
 
unsigned int id (int i) const
 
bool isActive (int i) const
 
int nDet () const
 
std::vector< uint32_t > & rawInactiveStripDetIds ()
 
const std::vector< uint32_t > & rawInactiveStripDetIds () const
 
void resetOnDemandStrips ()
 
void setActiveThisEvent (int i, bool active)
 Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call to 'update' or 'setEmpty'. More...
 
void setEmpty (int i)
 
void setEmpty ()
 
void setUpdated (int i)
 
int size () const
 
 StMeasurementDetSet (const StMeasurementConditionSet &cond)
 
const bool stripDefined (int i) const
 
const bool stripUpdated (int i) const
 
void update (int i, const StripDetset &detSet)
 
void update (int i, int j)
 
 ~StMeasurementDetSet ()
 

Private Member Functions

void getDetSet (int i)
 

Static Private Member Functions

static void incAct ()
 
static void incReady ()
 
static void incSet ()
 
static void incTot (int)
 
static void printStat ()
 
static void zeroStat ()
 

Private Attributes

std::vector< bool > activeThisEvent_
 
const StMeasurementConditionSetconditionSet_
 
std::vector< int > detIndex_
 
std::vector< StripDetsetdetSet_
 
std::vector< bool > empty_
 
edm::Handle< edmNew::DetSetVector< SiStripCluster > > handle_
 
std::vector< bool > ready_
 
std::vector< bool > stripDefined_
 
std::vector< std::pair< unsigned int, unsigned int > > stripRegions_
 
std::vector< bool > stripUpdated_
 
std::vector< uint32_t > theRawInactiveStripDetIds_
 

Friends

class MeasurementTrackerImpl
 

Detailed Description

Definition at line 146 of file TkMeasurementDetSet.h.

Member Typedef Documentation

Definition at line 150 of file TkMeasurementDetSet.h.

Definition at line 149 of file TkMeasurementDetSet.h.

Constructor & Destructor Documentation

StMeasurementDetSet::StMeasurementDetSet ( const StMeasurementConditionSet cond)
inline

Definition at line 153 of file TkMeasurementDetSet.h.

153  :
154  conditionSet_(&cond),
155  empty_(cond.nDet(), true),
156  activeThisEvent_(cond.nDet(), true),
157  detSet_(cond.nDet()),
158  detIndex_(cond.nDet(),-1),
159  ready_(cond.nDet(),true),
161  stripDefined_(0),
162  stripUpdated_(0),
163  stripRegions_(0)
164  {
165  }
std::vector< bool > stripDefined_
std::vector< bool > ready_
const StMeasurementConditionSet * conditionSet_
std::vector< uint32_t > theRawInactiveStripDetIds_
std::vector< bool > empty_
std::vector< StripDetset > detSet_
std::vector< bool > activeThisEvent_
std::vector< std::pair< unsigned int, unsigned int > > stripRegions_
std::vector< int > detIndex_
std::vector< bool > stripUpdated_
StMeasurementDetSet::~StMeasurementDetSet ( )
inline

Definition at line 167 of file TkMeasurementDetSet.h.

167  {
168  printStat();
169  }

Member Function Documentation

const StMeasurementConditionSet& StMeasurementDetSet::conditions ( ) const
inline

Definition at line 171 of file TkMeasurementDetSet.h.

171 { return *conditionSet_; }
const StMeasurementConditionSet * conditionSet_
void StMeasurementDetSet::defineStrip ( int  i,
std::pair< unsigned int, unsigned int >  range 
)
inline

Definition at line 225 of file TkMeasurementDetSet.h.

References mps_fire::i.

225  {
226  stripDefined_[i] = true;
227  stripUpdated_[i] = false;
228  stripRegions_[i] = range;
229  }
std::vector< bool > stripDefined_
std::vector< std::pair< unsigned int, unsigned int > > stripRegions_
std::vector< bool > stripUpdated_
const StripDetset& StMeasurementDetSet::detSet ( int  i) const
inline
bool StMeasurementDetSet::empty ( int  i) const
inline

Definition at line 193 of file TkMeasurementDetSet.h.

References mps_fire::i.

Referenced by TkStripMeasurementDet::isEmpty().

193 { return empty_[i];}
std::vector< bool > empty_
int StMeasurementDetSet::find ( unsigned int  jd,
int  i = 0 
) const
inline

Definition at line 189 of file TkMeasurementDetSet.h.

References mps_fire::i.

Referenced by MeasurementTrackerEventProducer::updateStrips().

189  {
190  return conditions().find(jd,i);
191  }
int find(unsigned int jd, int i=0) const
const StMeasurementConditionSet & conditions() const
void StMeasurementDetSet::getDetSet ( int  i)
inlineprivate

Definition at line 233 of file TkMeasurementDetSet.h.

References mps_fire::i.

233  {
234  if(detIndex_[i]>=0) {
235  detSet_[i].set(*handle_,handle_->item(detIndex_[i]));
236  empty_[i]=false; // better be false already
237  incAct();
238  } else { // we should not be here
239  detSet_[i] = StripDetset();
240  empty_[i]=true;
241  }
242  ready_[i]=false;
243  incSet();
244  }
std::vector< bool > ready_
edmNew::DetSet< SiStripCluster > StripDetset
std::vector< bool > empty_
edm::Handle< edmNew::DetSetVector< SiStripCluster > > handle_
std::vector< StripDetset > detSet_
std::vector< int > detIndex_
edm::Handle<edmNew::DetSetVector<SiStripCluster> >& StMeasurementDetSet::handle ( )
inline
const edm::Handle<edmNew::DetSetVector<SiStripCluster> >& StMeasurementDetSet::handle ( ) const
inline

Definition at line 213 of file TkMeasurementDetSet.h.

213 { return handle_; }
edm::Handle< edmNew::DetSetVector< SiStripCluster > > handle_
unsigned int StMeasurementDetSet::id ( int  i) const
inline

Definition at line 188 of file TkMeasurementDetSet.h.

Referenced by MeasurementTrackerEventProducer::updateStrips().

188 { return conditions().id(i); }
const StMeasurementConditionSet & conditions() const
unsigned int id(int i) const
static void StMeasurementDetSet::incAct ( )
inlinestaticprivate

Definition at line 298 of file TkMeasurementDetSet.h.

298 {}
static void StMeasurementDetSet::incReady ( )
inlinestaticprivate

Definition at line 296 of file TkMeasurementDetSet.h.

296 {}
static void StMeasurementDetSet::incSet ( )
inlinestaticprivate

Definition at line 297 of file TkMeasurementDetSet.h.

297 {}
static void StMeasurementDetSet::incTot ( int  )
inlinestaticprivate

Definition at line 295 of file TkMeasurementDetSet.h.

295 {}
bool StMeasurementDetSet::isActive ( int  i) const
inline

Definition at line 194 of file TkMeasurementDetSet.h.

References mps_fire::i.

Referenced by TkStripMeasurementDet::isActive(), and MeasurementTrackerEventProducer::updateStrips().

const StMeasurementConditionSet & conditions() const
bool isActiveThisPeriod(int i) const
std::vector< bool > activeThisEvent_
int StMeasurementDetSet::nDet ( ) const
inline

Definition at line 187 of file TkMeasurementDetSet.h.

References findQualityFiles::size.

187 { return size();}
static void StMeasurementDetSet::printStat ( )
inlinestaticprivate

Definition at line 299 of file TkMeasurementDetSet.h.

299 {}
std::vector<uint32_t>& StMeasurementDetSet::rawInactiveStripDetIds ( )
inline

Definition at line 219 of file TkMeasurementDetSet.h.

219 { return theRawInactiveStripDetIds_; }
std::vector< uint32_t > theRawInactiveStripDetIds_
const std::vector<uint32_t>& StMeasurementDetSet::rawInactiveStripDetIds ( ) const
inline

Definition at line 220 of file TkMeasurementDetSet.h.

220 { return theRawInactiveStripDetIds_; }
std::vector< uint32_t > theRawInactiveStripDetIds_
void StMeasurementDetSet::resetOnDemandStrips ( )
inline

Definition at line 222 of file TkMeasurementDetSet.h.

References lumiContext::fill.

222 { std::fill(stripDefined_.begin(), stripDefined_.end(), false); std::fill(stripUpdated_.begin(), stripUpdated_.end(), false); }
std::vector< bool > stripDefined_
std::vector< bool > stripUpdated_
void StMeasurementDetSet::setActiveThisEvent ( int  i,
bool  active 
)
inline

Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call to 'update' or 'setEmpty'.

Definition at line 210 of file TkMeasurementDetSet.h.

References mps_fire::i.

Referenced by TkStripMeasurementDet::setActiveThisEvent(), and MeasurementTrackerEventProducer::updateStrips().

210 { activeThisEvent_[i] = active; if (!active) empty_[i] = true; }
std::vector< bool > empty_
std::vector< bool > activeThisEvent_
void StMeasurementDetSet::setEmpty ( int  i)
inline

Definition at line 196 of file TkMeasurementDetSet.h.

References mps_fire::i.

Referenced by TkStripMeasurementDet::setEmpty(), and MeasurementTrackerEventProducer::updateStrips().

196 {empty_[i] = true; activeThisEvent_[i] = true; }
std::vector< bool > empty_
std::vector< bool > activeThisEvent_
void StMeasurementDetSet::setEmpty ( )
inline

Definition at line 199 of file TkMeasurementDetSet.h.

References lumiContext::fill, and findQualityFiles::size.

199  {
200  printStat();
201  std::fill(empty_.begin(),empty_.end(),true);
202  std::fill(ready_.begin(),ready_.end(),true);
203  std::fill(detIndex_.begin(),detIndex_.end(),-1);
204  std::fill(activeThisEvent_.begin(), activeThisEvent_.end(),true);
205  incTot(size());
206  }
std::vector< bool > ready_
std::vector< bool > empty_
static void incTot(int)
std::vector< bool > activeThisEvent_
std::vector< int > detIndex_
void StMeasurementDetSet::setUpdated ( int  i)
inline

Definition at line 197 of file TkMeasurementDetSet.h.

References mps_fire::i.

197 { stripUpdated_[i] = true; }
std::vector< bool > stripUpdated_
int StMeasurementDetSet::size ( void  ) const
inline
const bool StMeasurementDetSet::stripDefined ( int  i) const
inline

Definition at line 223 of file TkMeasurementDetSet.h.

References mps_fire::i.

223 { return stripDefined_[i]; }
std::vector< bool > stripDefined_
const bool StMeasurementDetSet::stripUpdated ( int  i) const
inline

Definition at line 224 of file TkMeasurementDetSet.h.

References mps_fire::i.

224 { return stripUpdated_[i]; }
std::vector< bool > stripUpdated_
void StMeasurementDetSet::update ( int  i,
const StripDetset detSet 
)
inline

Definition at line 174 of file TkMeasurementDetSet.h.

References mps_fire::i.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), 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(), 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(), Vispa.Gui.PortConnection.PointToPointConnection::updateConnection(), and MeasurementTrackerEventProducer::updateStrips().

174  {
175  detSet_[i] = detSet;
176  empty_[i] = false;
177  }
const StripDetset & detSet(int i) const
std::vector< bool > empty_
std::vector< StripDetset > detSet_
void StMeasurementDetSet::update ( int  i,
int  j 
)
inline

Definition at line 179 of file TkMeasurementDetSet.h.

References mps_fire::i.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), 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(), 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().

179  {
180  assert(j>=0); assert(empty_[i]); assert(ready_[i]);
181  detIndex_[i] = j;
182  empty_[i] = false;
183  incReady();
184  }
std::vector< bool > ready_
std::vector< bool > empty_
std::vector< int > detIndex_
static void StMeasurementDetSet::zeroStat ( )
inlinestaticprivate

Definition at line 294 of file TkMeasurementDetSet.h.

294 {}

Friends And Related Function Documentation

friend class MeasurementTrackerImpl
friend

Definition at line 247 of file TkMeasurementDetSet.h.

Member Data Documentation

std::vector<bool> StMeasurementDetSet::activeThisEvent_
private

Definition at line 257 of file TkMeasurementDetSet.h.

const StMeasurementConditionSet* StMeasurementDetSet::conditionSet_
private

Definition at line 249 of file TkMeasurementDetSet.h.

std::vector<int> StMeasurementDetSet::detIndex_
private

Definition at line 261 of file TkMeasurementDetSet.h.

std::vector<StripDetset> StMeasurementDetSet::detSet_
private

Definition at line 260 of file TkMeasurementDetSet.h.

std::vector<bool> StMeasurementDetSet::empty_
private

Definition at line 256 of file TkMeasurementDetSet.h.

edm::Handle<edmNew::DetSetVector<SiStripCluster> > StMeasurementDetSet::handle_
private

Definition at line 253 of file TkMeasurementDetSet.h.

std::vector<bool> StMeasurementDetSet::ready_
private

Definition at line 262 of file TkMeasurementDetSet.h.

std::vector<bool> StMeasurementDetSet::stripDefined_
private

Definition at line 268 of file TkMeasurementDetSet.h.

std::vector<std::pair<unsigned int, unsigned int> > StMeasurementDetSet::stripRegions_
private

Definition at line 269 of file TkMeasurementDetSet.h.

std::vector<bool> StMeasurementDetSet::stripUpdated_
private

Definition at line 268 of file TkMeasurementDetSet.h.

std::vector<uint32_t> StMeasurementDetSet::theRawInactiveStripDetIds_
private

Definition at line 266 of file TkMeasurementDetSet.h.