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 ()
 
void setEmpty (int i)
 
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 138 of file TkMeasurementDetSet.h.

Member Typedef Documentation

◆ new_const_iterator

Definition at line 141 of file TkMeasurementDetSet.h.

◆ StripDetset

Definition at line 140 of file TkMeasurementDetSet.h.

Constructor & Destructor Documentation

◆ StMeasurementDetSet()

StMeasurementDetSet::StMeasurementDetSet ( const StMeasurementConditionSet cond)
inline

Definition at line 143 of file TkMeasurementDetSet.h.

144  : conditionSet_(&cond),
145  empty_(cond.nDet(), true),
146  activeThisEvent_(cond.nDet(), true),
147  detSet_(cond.nDet()),
148  detIndex_(cond.nDet(), -1),
149  ready_(cond.nDet(), true),
151  stripDefined_(0),
152  stripUpdated_(0),
153  stripRegions_(0) {}

◆ ~StMeasurementDetSet()

StMeasurementDetSet::~StMeasurementDetSet ( )
inline

Definition at line 155 of file TkMeasurementDetSet.h.

155 { printStat(); }

References printStat().

Member Function Documentation

◆ conditions()

const StMeasurementConditionSet& StMeasurementDetSet::conditions ( ) const
inline

Definition at line 157 of file TkMeasurementDetSet.h.

157 { return *conditionSet_; }

References conditionSet_.

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

◆ defineStrip()

void StMeasurementDetSet::defineStrip ( int  i,
std::pair< unsigned int, unsigned int >  range 
)
inline

Definition at line 223 of file TkMeasurementDetSet.h.

223  {
224  stripDefined_[i] = true;
225  stripUpdated_[i] = false;
226  stripRegions_[i] = range;
227  }

References mps_fire::i, FastTimerService_cff::range, stripDefined_, stripRegions_, and stripUpdated_.

◆ detSet()

const StripDetset& StMeasurementDetSet::detSet ( int  i) const
inline

Definition at line 207 of file TkMeasurementDetSet.h.

207  {
208  if (ready_[i])
209  const_cast<StMeasurementDetSet*>(this)->getDetSet(i);
210  return detSet_[i];
211  }

References detSet_, mps_fire::i, and ready_.

Referenced by TkStripMeasurementDet::detSet(), TkStripMeasurementDet::theSet(), and update().

◆ empty()

bool StMeasurementDetSet::empty ( int  i) const
inline

Definition at line 178 of file TkMeasurementDetSet.h.

178 { return empty_[i]; }

References empty_, and mps_fire::i.

Referenced by TkStripMeasurementDet::isEmpty().

◆ find()

int StMeasurementDetSet::find ( unsigned int  jd,
int  i = 0 
) const
inline

Definition at line 176 of file TkMeasurementDetSet.h.

176 { return conditions().find(jd, i); }

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

Referenced by MeasurementTrackerEventProducer::updateStrips().

◆ getDetSet()

void StMeasurementDetSet::getDetSet ( int  i)
inlineprivate

Definition at line 230 of file TkMeasurementDetSet.h.

230  {
231  if (detIndex_[i] >= 0) {
232  detSet_[i].set(*handle_, handle_->item(detIndex_[i]));
233  empty_[i] = false; // better be false already
234  incAct();
235  } else { // we should not be here
236  detSet_[i] = StripDetset();
237  empty_[i] = true;
238  }
239  ready_[i] = false;
240  incSet();
241  }

References detIndex_, detSet_, empty_, handle_, mps_fire::i, incAct(), incSet(), and ready_.

◆ handle() [1/2]

edm::Handle<edmNew::DetSetVector<SiStripCluster> >& StMeasurementDetSet::handle ( )
inline

◆ handle() [2/2]

const edm::Handle<edmNew::DetSetVector<SiStripCluster> >& StMeasurementDetSet::handle ( ) const
inline

Definition at line 205 of file TkMeasurementDetSet.h.

205 { return handle_; }

References handle_.

◆ id()

unsigned int StMeasurementDetSet::id ( int  i) const
inline

◆ incAct()

static void StMeasurementDetSet::incAct ( )
inlinestaticprivate

Definition at line 290 of file TkMeasurementDetSet.h.

290 {}

Referenced by getDetSet().

◆ incReady()

static void StMeasurementDetSet::incReady ( )
inlinestaticprivate

Definition at line 288 of file TkMeasurementDetSet.h.

288 {}

Referenced by update().

◆ incSet()

static void StMeasurementDetSet::incSet ( )
inlinestaticprivate

Definition at line 289 of file TkMeasurementDetSet.h.

289 {}

Referenced by getDetSet().

◆ incTot()

static void StMeasurementDetSet::incTot ( int  )
inlinestaticprivate

Definition at line 287 of file TkMeasurementDetSet.h.

287 {}

Referenced by setEmpty().

◆ isActive()

bool StMeasurementDetSet::isActive ( int  i) const
inline

◆ nDet()

int StMeasurementDetSet::nDet ( ) const
inline

Definition at line 174 of file TkMeasurementDetSet.h.

174 { return size(); }

References size().

◆ printStat()

static void StMeasurementDetSet::printStat ( )
inlinestaticprivate

Definition at line 291 of file TkMeasurementDetSet.h.

291 {}

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

◆ rawInactiveStripDetIds() [1/2]

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

Definition at line 214 of file TkMeasurementDetSet.h.

214 { return theRawInactiveStripDetIds_; }

References theRawInactiveStripDetIds_.

◆ rawInactiveStripDetIds() [2/2]

const std::vector<uint32_t>& StMeasurementDetSet::rawInactiveStripDetIds ( ) const
inline

Definition at line 215 of file TkMeasurementDetSet.h.

215 { return theRawInactiveStripDetIds_; }

References theRawInactiveStripDetIds_.

◆ resetOnDemandStrips()

void StMeasurementDetSet::resetOnDemandStrips ( )
inline

Definition at line 217 of file TkMeasurementDetSet.h.

217  {
218  std::fill(stripDefined_.begin(), stripDefined_.end(), false);
219  std::fill(stripUpdated_.begin(), stripUpdated_.end(), false);
220  }

References ntuplemaker::fill, stripDefined_, and stripUpdated_.

◆ setActiveThisEvent()

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

198  {
199  activeThisEvent_[i] = active;
200  if (!active)
201  empty_[i] = true;
202  }

References activeThisEvent_, empty_, and mps_fire::i.

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

◆ setEmpty() [1/2]

void StMeasurementDetSet::setEmpty ( )
inline

Definition at line 187 of file TkMeasurementDetSet.h.

187  {
188  printStat();
189  std::fill(empty_.begin(), empty_.end(), true);
190  std::fill(ready_.begin(), ready_.end(), true);
191  std::fill(detIndex_.begin(), detIndex_.end(), -1);
192  std::fill(activeThisEvent_.begin(), activeThisEvent_.end(), true);
193  incTot(size());
194  }

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

◆ setEmpty() [2/2]

void StMeasurementDetSet::setEmpty ( int  i)
inline

Definition at line 181 of file TkMeasurementDetSet.h.

181  {
182  empty_[i] = true;
183  activeThisEvent_[i] = true;
184  }

References activeThisEvent_, empty_, and mps_fire::i.

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

◆ setUpdated()

void StMeasurementDetSet::setUpdated ( int  i)
inline

Definition at line 185 of file TkMeasurementDetSet.h.

185 { stripUpdated_[i] = true; }

References mps_fire::i, and stripUpdated_.

◆ size()

int StMeasurementDetSet::size ( void  ) const
inline

◆ stripDefined()

const bool StMeasurementDetSet::stripDefined ( int  i) const
inline

Definition at line 221 of file TkMeasurementDetSet.h.

221 { return stripDefined_[i]; }

References mps_fire::i, and stripDefined_.

◆ stripUpdated()

const bool StMeasurementDetSet::stripUpdated ( int  i) const
inline

Definition at line 222 of file TkMeasurementDetSet.h.

222 { return stripUpdated_[i]; }

References mps_fire::i, and stripUpdated_.

◆ update() [1/2]

void StMeasurementDetSet::update ( int  i,
const StripDetset detSet 
)
inline

◆ update() [2/2]

void StMeasurementDetSet::update ( int  i,
int  j 
)
inline

◆ zeroStat()

static void StMeasurementDetSet::zeroStat ( )
inlinestaticprivate

Definition at line 286 of file TkMeasurementDetSet.h.

286 {}

Friends And Related Function Documentation

◆ MeasurementTrackerImpl

friend class MeasurementTrackerImpl
friend

Definition at line 243 of file TkMeasurementDetSet.h.

Member Data Documentation

◆ activeThisEvent_

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

Definition at line 251 of file TkMeasurementDetSet.h.

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

◆ conditionSet_

const StMeasurementConditionSet* StMeasurementDetSet::conditionSet_
private

Definition at line 245 of file TkMeasurementDetSet.h.

Referenced by conditions().

◆ detIndex_

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

Definition at line 255 of file TkMeasurementDetSet.h.

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

◆ detSet_

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

Definition at line 254 of file TkMeasurementDetSet.h.

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

◆ empty_

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

Definition at line 250 of file TkMeasurementDetSet.h.

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

◆ handle_

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

Definition at line 248 of file TkMeasurementDetSet.h.

Referenced by getDetSet(), and handle().

◆ ready_

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

Definition at line 256 of file TkMeasurementDetSet.h.

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

◆ stripDefined_

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

Definition at line 261 of file TkMeasurementDetSet.h.

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

◆ stripRegions_

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

Definition at line 262 of file TkMeasurementDetSet.h.

Referenced by defineStrip().

◆ stripUpdated_

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

Definition at line 261 of file TkMeasurementDetSet.h.

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

◆ theRawInactiveStripDetIds_

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

Definition at line 259 of file TkMeasurementDetSet.h.

Referenced by rawInactiveStripDetIds().

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
StMeasurementDetSet::stripRegions_
std::vector< std::pair< unsigned int, unsigned int > > stripRegions_
Definition: TkMeasurementDetSet.h:262
mps_fire.i
i
Definition: mps_fire.py:355
StMeasurementDetSet::size
int size() const
Definition: TkMeasurementDetSet.h:173
StMeasurementConditionSet::id
unsigned int id(int i) const
Definition: TkMeasurementDetSet.h:70
StMeasurementDetSet::empty_
std::vector< bool > empty_
Definition: TkMeasurementDetSet.h:250
StMeasurementDetSet::incSet
static void incSet()
Definition: TkMeasurementDetSet.h:289
cms::cuda::assert
assert(be >=bs)
StMeasurementConditionSet::find
int find(unsigned int jd, int i=0) const
Definition: TkMeasurementDetSet.h:73
StMeasurementDetSet::conditionSet_
const StMeasurementConditionSet * conditionSet_
Definition: TkMeasurementDetSet.h:245
StMeasurementDetSet::detSet_
std::vector< StripDetset > detSet_
Definition: TkMeasurementDetSet.h:254
StMeasurementDetSet::incAct
static void incAct()
Definition: TkMeasurementDetSet.h:290
StMeasurementDetSet::printStat
static void printStat()
Definition: TkMeasurementDetSet.h:291
StMeasurementDetSet::handle_
edm::Handle< edmNew::DetSetVector< SiStripCluster > > handle_
Definition: TkMeasurementDetSet.h:248
StMeasurementDetSet::incTot
static void incTot(int)
Definition: TkMeasurementDetSet.h:287
cond
Definition: plugin.cc:23
StMeasurementDetSet::stripDefined_
std::vector< bool > stripDefined_
Definition: TkMeasurementDetSet.h:261
ntuplemaker.fill
fill
Definition: ntuplemaker.py:304
StMeasurementDetSet::activeThisEvent_
std::vector< bool > activeThisEvent_
Definition: TkMeasurementDetSet.h:251
StMeasurementDetSet::detIndex_
std::vector< int > detIndex_
Definition: TkMeasurementDetSet.h:255
StMeasurementDetSet::stripUpdated_
std::vector< bool > stripUpdated_
Definition: TkMeasurementDetSet.h:261
StMeasurementDetSet::theRawInactiveStripDetIds_
std::vector< uint32_t > theRawInactiveStripDetIds_
Definition: TkMeasurementDetSet.h:259
StMeasurementConditionSet::isActiveThisPeriod
bool isActiveThisPeriod(int i) const
Definition: TkMeasurementDetSet.h:75
StMeasurementDetSet::StripDetset
edmNew::DetSet< SiStripCluster > StripDetset
Definition: TkMeasurementDetSet.h:140
StMeasurementDetSet::ready_
std::vector< bool > ready_
Definition: TkMeasurementDetSet.h:256
StMeasurementDetSet::conditions
const StMeasurementConditionSet & conditions() const
Definition: TkMeasurementDetSet.h:157
StMeasurementDetSet::incReady
static void incReady()
Definition: TkMeasurementDetSet.h:288
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
StMeasurementConditionSet::nDet
int nDet() const
Definition: TkMeasurementDetSet.h:69
StMeasurementDetSet::detSet
const StripDetset & detSet(int i) const
Definition: TkMeasurementDetSet.h:207