CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< SiStripCluster
StripDetset
 

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 137 of file TkMeasurementDetSet.h.

Member Typedef Documentation

Definition at line 141 of file TkMeasurementDetSet.h.

Definition at line 140 of file TkMeasurementDetSet.h.

Constructor & Destructor Documentation

StMeasurementDetSet::StMeasurementDetSet ( const StMeasurementConditionSet cond)
inline

Definition at line 144 of file TkMeasurementDetSet.h.

144  :
145  conditionSet_(&cond),
146  empty_(cond.nDet(), true),
147  activeThisEvent_(cond.nDet(), true),
148  detSet_(cond.nDet()),
149  detIndex_(cond.nDet(),-1),
150  ready_(cond.nDet(),true),
152  stripDefined_(0),
153  stripUpdated_(0),
154  stripRegions_(0)
155  {
156  }
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 158 of file TkMeasurementDetSet.h.

References printStat().

158  {
159  printStat();
160  }

Member Function Documentation

const StMeasurementConditionSet& StMeasurementDetSet::conditions ( ) const
inline

Definition at line 162 of file TkMeasurementDetSet.h.

References conditionSet_.

Referenced by find(), id(), isActive(), and size().

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

Definition at line 216 of file TkMeasurementDetSet.h.

References i, stripDefined_, stripRegions_, and stripUpdated_.

216  {
217  stripDefined_[i] = true;
218  stripUpdated_[i] = false;
219  stripRegions_[i] = range;
220  }
int i
Definition: DBlmapReader.cc:9
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 184 of file TkMeasurementDetSet.h.

References empty_, and i.

Referenced by TkStripMeasurementDet::isEmpty().

184 { return empty_[i];}
int i
Definition: DBlmapReader.cc:9
std::vector< bool > empty_
int StMeasurementDetSet::find ( unsigned int  jd,
int  i = 0 
) const
inline

Definition at line 180 of file TkMeasurementDetSet.h.

References conditions(), StMeasurementConditionSet::find(), and i.

Referenced by MeasurementTrackerEventProducer::updateStrips().

180  {
181  return conditions().find(jd,i);
182  }
int find(unsigned int jd, int i=0) const
int i
Definition: DBlmapReader.cc:9
const StMeasurementConditionSet & conditions() const
void StMeasurementDetSet::getDetSet ( int  i)
inlineprivate

Definition at line 224 of file TkMeasurementDetSet.h.

References detIndex_, detSet_, empty_, handle_, i, incAct(), incSet(), edmNew::DetSetVector< T >::item(), and ready_.

Referenced by detSet().

224  {
225  if(detIndex_[i]>=0) {
226  detSet_[i].set(*handle_,handle_->item(detIndex_[i]));
227  empty_[i]=false; // better be false already
228  incAct();
229  } else { // we should not be here
230  detSet_[i] = StripDetset();
231  empty_[i]=true;
232  }
233  ready_[i]=false;
234  incSet();
235  }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > ready_
edmNew::DetSet< SiStripCluster > StripDetset
Item const & item(size_t cell) const
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 204 of file TkMeasurementDetSet.h.

References handle_.

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

Definition at line 179 of file TkMeasurementDetSet.h.

References conditions(), and StMeasurementConditionSet::id().

Referenced by MeasurementTrackerEventProducer::updateStrips().

179 { return conditions().id(i); }
int i
Definition: DBlmapReader.cc:9
const StMeasurementConditionSet & conditions() const
unsigned int id(int i) const
static void StMeasurementDetSet::incAct ( )
inlinestaticprivate

Definition at line 289 of file TkMeasurementDetSet.h.

Referenced by getDetSet().

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

Definition at line 287 of file TkMeasurementDetSet.h.

Referenced by update().

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

Definition at line 288 of file TkMeasurementDetSet.h.

Referenced by getDetSet().

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

Definition at line 286 of file TkMeasurementDetSet.h.

Referenced by setEmpty().

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

Definition at line 185 of file TkMeasurementDetSet.h.

References activeThisEvent_, conditions(), i, and StMeasurementConditionSet::isActiveThisPeriod().

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

int i
Definition: DBlmapReader.cc:9
const StMeasurementConditionSet & conditions() const
bool isActiveThisPeriod(int i) const
std::vector< bool > activeThisEvent_
int StMeasurementDetSet::nDet ( ) const
inline

Definition at line 178 of file TkMeasurementDetSet.h.

References size().

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

Definition at line 290 of file TkMeasurementDetSet.h.

Referenced by setEmpty(), and ~StMeasurementDetSet().

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

Definition at line 210 of file TkMeasurementDetSet.h.

References theRawInactiveStripDetIds_.

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

Definition at line 211 of file TkMeasurementDetSet.h.

References theRawInactiveStripDetIds_.

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

Definition at line 213 of file TkMeasurementDetSet.h.

References lumiContext::fill, stripDefined_, and stripUpdated_.

213 { std::fill(stripDefined_.begin(), stripDefined_.end(), false); std::fill(stripUpdated_.begin(), stripUpdated_.end(), false); }
string fill
Definition: lumiContext.py:319
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 201 of file TkMeasurementDetSet.h.

References activeThisEvent_, empty_, and i.

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

201 { activeThisEvent_[i] = active; if (!active) empty_[i] = true; }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > empty_
std::vector< bool > activeThisEvent_
void StMeasurementDetSet::setEmpty ( int  i)
inline

Definition at line 187 of file TkMeasurementDetSet.h.

References activeThisEvent_, empty_, and i.

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

187 {empty_[i] = true; activeThisEvent_[i] = true; }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > empty_
std::vector< bool > activeThisEvent_
void StMeasurementDetSet::setEmpty ( )
inline

Definition at line 190 of file TkMeasurementDetSet.h.

References activeThisEvent_, detIndex_, empty_, lumiContext::fill, incTot(), printStat(), ready_, and size().

190  {
191  printStat();
192  std::fill(empty_.begin(),empty_.end(),true);
193  std::fill(ready_.begin(),ready_.end(),true);
194  std::fill(detIndex_.begin(),detIndex_.end(),-1);
195  std::fill(activeThisEvent_.begin(), activeThisEvent_.end(),true);
196  incTot(size());
197  }
string fill
Definition: lumiContext.py:319
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 188 of file TkMeasurementDetSet.h.

References i, and stripUpdated_.

188 { stripUpdated_[i] = true; }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > stripUpdated_
int StMeasurementDetSet::size ( void  ) const
inline

Definition at line 177 of file TkMeasurementDetSet.h.

References conditions(), and StMeasurementConditionSet::nDet().

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

177 { return conditions().nDet(); }
const StMeasurementConditionSet & conditions() const
const bool StMeasurementDetSet::stripDefined ( int  i) const
inline

Definition at line 214 of file TkMeasurementDetSet.h.

References i, and stripDefined_.

214 { return stripDefined_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > stripDefined_
const bool StMeasurementDetSet::stripUpdated ( int  i) const
inline

Definition at line 215 of file TkMeasurementDetSet.h.

References i, and stripUpdated_.

215 { return stripUpdated_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > stripUpdated_
void StMeasurementDetSet::update ( int  i,
const StripDetset detSet 
)
inline

Definition at line 165 of file TkMeasurementDetSet.h.

References detSet(), detSet_, empty_, and i.

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

165  {
166  detSet_[i] = detSet;
167  empty_[i] = false;
168  }
int i
Definition: DBlmapReader.cc:9
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 170 of file TkMeasurementDetSet.h.

References detIndex_, empty_, i, incReady(), j, and ready_.

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

170  {
171  assert(j>=0); assert(empty_[i]); assert(ready_[i]);
172  detIndex_[i] = j;
173  empty_[i] = false;
174  incReady();
175  }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > ready_
int j
Definition: DBlmapReader.cc:9
std::vector< bool > empty_
std::vector< int > detIndex_
static void StMeasurementDetSet::zeroStat ( )
inlinestaticprivate

Definition at line 285 of file TkMeasurementDetSet.h.

285 {}

Friends And Related Function Documentation

friend class MeasurementTrackerImpl
friend

Definition at line 238 of file TkMeasurementDetSet.h.

Member Data Documentation

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

Definition at line 248 of file TkMeasurementDetSet.h.

Referenced by isActive(), setActiveThisEvent(), and setEmpty().

const StMeasurementConditionSet* StMeasurementDetSet::conditionSet_
private

Definition at line 240 of file TkMeasurementDetSet.h.

Referenced by conditions().

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

Definition at line 252 of file TkMeasurementDetSet.h.

Referenced by getDetSet(), setEmpty(), and update().

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

Definition at line 251 of file TkMeasurementDetSet.h.

Referenced by detSet(), getDetSet(), and update().

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

Definition at line 247 of file TkMeasurementDetSet.h.

Referenced by empty(), getDetSet(), setActiveThisEvent(), setEmpty(), and update().

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

Definition at line 244 of file TkMeasurementDetSet.h.

Referenced by getDetSet(), and handle().

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

Definition at line 253 of file TkMeasurementDetSet.h.

Referenced by detSet(), getDetSet(), setEmpty(), and update().

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

Definition at line 259 of file TkMeasurementDetSet.h.

Referenced by defineStrip(), resetOnDemandStrips(), and stripDefined().

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

Definition at line 260 of file TkMeasurementDetSet.h.

Referenced by defineStrip().

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

Definition at line 259 of file TkMeasurementDetSet.h.

Referenced by defineStrip(), resetOnDemandStrips(), setUpdated(), and stripUpdated().

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

Definition at line 257 of file TkMeasurementDetSet.h.

Referenced by rawInactiveStripDetIds().