Helper functions to extract the dictionary with - all EDFilters - all EDProducers - all EDAnalyzers - all modules either from a dictionary (either a cms.Process.__dict__ or from the locals() inside a _cff.py fragment)
void helper::ClusterStorer::ClusterHitRecord< SiStripRecHit2D::ClusterRef >rekey | ( | const SiStripRecHit2D::ClusterRef & | newRef | ) | const |
Definition at line 160 of file ClusterStorer.cc.
References OmniClusterRef::key(), and SiStripDetId::stereo().
{ TrackingRecHit &genericHit = (*hits_)[index_]; const std::type_info &hit_type = typeid(genericHit); OmniClusterRef * cluRef=0; if (typeid(SiStripRecHit1D) == hit_type) { cluRef = &static_cast<SiStripRecHit1D&>(genericHit).omniCluster(); } else if (typeid(SiStripRecHit2D) == hit_type) { cluRef = &static_cast<SiStripRecHit2D&>(genericHit).omniCluster(); } else if (typeid(SiStripMatchedRecHit2D) == hit_type) { SiStripMatchedRecHit2D &mhit = static_cast<SiStripMatchedRecHit2D&>(genericHit); cluRef = (SiStripDetId(detid_).stereo() ? &mhit.stereoClusterRef() : &mhit.monoClusterRef()); } else if (typeid(ProjectedSiStripRecHit2D) == hit_type) { cluRef = &static_cast<ProjectedSiStripRecHit2D&>(genericHit).originalHit().omniCluster(); } assert(cluRef != 0); // to catch missing RecHit types assert(cluRef->key() == ref_.key()); // otherwise something went wrong (*cluRef) = OmniClusterRef(newRef); }
def helper::findEDAnalyzers | ( | holder | ) |
def helper::findEDFilters | ( | holder | ) |
def helper::findEDProducers | ( | holder | ) |
def helper::findModules | ( | holder | ) |
Definition at line 33 of file helper.py.
00034 : 00035 if isinstance(holder, cms.Process): 00036 modules = dict() 00037 modules.upate(process.analyzers_()) 00038 modules.upate(process.producers_()) 00039 modules.upate(process.filters_()) 00040 return modules 00041 else: 00042 return dict( (name, module) for name, module in holder.iteritems() if isinstance(module, (cms.EDAnalyzer, _cms.EDProducer, _cms.EDFilter)) ) 00043 00044
std::pair<typename T::DetSet::const_iterator, typename T::DetSet::const_iterator> helper::getRange | ( | const T & | detset, |
const DetId & | id | ||
) |
Definition at line 38 of file SiStripRecHitsValid.cc.
References match().
Referenced by SiStripRecHitsValid::analyze(), reco::TaggingVariableList::get(), and reco::TaggingVariableList::getList().