CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions | Variables
helper Namespace Reference

Classes

struct  BFieldIsolationAlgorithmSetup
 
class  CandDecayStoreManager
 
class  ClusterStorer
 
struct  CollectionFilter
 
struct  CollectionFilter< C, S, MinNumberSelector >
 
struct  CollectionFilterTrait
 
struct  CollectionFilterTrait< C, AnySelector, N >
 
struct  CollectionSizeFilter
 
struct  CollectionStoreManager
 
struct  GetDetId
 
struct  GsfElectronCollectionStoreManager
 
class  GsfElectronSelectorBase
 
struct  IsolationAlgorithmSetup
 
struct  IsolationAlgorithmSetup< CalIsolationAlgo< T1, C2 > >
 
struct  IteratorToObjectConverter
 
struct  IteratorToObjectConverter< edm::OwnVector< T > >
 
struct  IteratorToObjectConverter< edm::PtrVector< T > >
 
struct  IteratorToObjectConverter< edm::RefToBaseVector< T > >
 
struct  IteratorToObjectConverter< edm::RefVector< C > >
 
struct  MasterCollection
 
struct  MasterCollection< edm::View< T > >
 
struct  MuonCollectionStoreManager
 
class  MuonSelectorBase
 
struct  NullIsolationAlgorithmSetup
 
struct  NullPostProcessor
 
struct  ObjectSelectorBase
 
class  Parser
 
struct  PhotonCollectionStoreManager
 
class  PhotonSelectorBase
 
class  ScannerBase
 
struct  SelectCode
 
struct  SelectedOutputCollectionTrait
 
struct  SelectedOutputCollectionTrait< edm::AssociationVector< edm::RefProd< K >, C > >
 
struct  SelectedOutputCollectionTrait< edm::AssociationVector< edm::RefToBaseProd< T >, C > >
 
struct  SelectedOutputCollectionTrait< edm::RefToBaseVector< T > >
 
struct  SelectedOutputCollectionTrait< edm::RefVector< C > >
 
struct  SelectedOutputCollectionTrait< edm::View< T > >
 
struct  SelectionAdderTrait
 
struct  SelectionAdderTrait< edm::AssociationVector< edm::RefProd< K >, C >, edm::RefVector< K > >
 
struct  SelectionAdderTrait< edm::AssociationVector< edm::RefProd< K >, C >, std::vector< const T * > >
 
struct  SelectionAdderTrait< edm::AssociationVector< edm::RefToBaseProd< T >, C >, edm::RefToBaseVector< T > >
 
struct  SelectionAdderTrait< edm::AssociationVector< edm::RefToBaseProd< T >, C >, std::vector< const T * > >
 
struct  SelectionAdderTrait< edm::RefToBaseVector< T >, edm::RefToBaseVector< T > >
 
struct  SelectionAdderTrait< edm::RefToBaseVector< T >, std::vector< const T * > >
 
struct  SelectionAdderTrait< edm::RefVector< C >, edm::RefVector< C > >
 
struct  SelectionAdderTrait< edm::RefVector< C >, std::vector< const T * > >
 
struct  SelectionAdderTrait< edm::View< T >, edm::PtrVector< T > >
 
struct  SelectionAdderTrait< edm::View< T >, edm::RefToBaseVector< T > >
 
struct  SelectionAdderTrait< InputCollection, edm::RefVector< C > >
 
struct  SelectionAdderTrait< InputCollection, std::vector< const T * > >
 
struct  SelectionCopyAdder
 
struct  SelectionFirstPointerAdder
 
struct  SelectionFirstRefAdder
 
struct  SelectionPointerAdder
 
struct  SelectionPointerDerefAdder
 
struct  SelectionPtrViewAdder
 
struct  SelectionRefAdder
 
struct  SelectionRefViewAdder
 
class  SimpleJetTrackAssociator
 
struct  StoreContainerTrait
 
struct  StoreContainerTrait< edm::AssociationVector< R, C > >
 
struct  StoreContainerTrait< edm::PtrVector< T > >
 
struct  StoreContainerTrait< edm::RefToBaseVector< T > >
 
struct  StoreContainerTrait< edm::RefVector< C > >
 
struct  StoreManagerTrait
 
struct  StoreManagerTrait< reco::CandidateCollection, EdmFilter >
 
struct  StoreManagerTrait< reco::GsfElectronCollection >
 
struct  StoreManagerTrait< reco::MuonCollection >
 
struct  StoreManagerTrait< reco::PhotonCollection >
 
struct  StoreManagerTrait< reco::TrackCollection, edm::stream::EDFilter<> >
 
struct  TrackCollectionStoreManager
 Class to manage copying of RecHits and Clusters from Tracks. More...
 
class  TrackSelectorBase
 

Functions

template<typename RecHitType >
void ClusterStorer::ClusterHitRecord< SiStripRecHit2D::ClusterRef >rekey (const SiStripRecHit2D::ClusterRef &newRef) const
 
def ConfigSectionMap
 
def findEDAnalyzers
 
def findEDFilters
 
def findEDProducers
 
def findModules
 
template<typename T >
std::pair< typename
T::DetSet::const_iterator,
typename
T::DetSet::const_iterator > 
getRange (const T &detset, const DetId &id)
 

Variables

tuple Config = cp.ConfigParser()
 

Detailed Description

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)

Function Documentation

template<typename RecHitType >
void helper::ClusterStorer::ClusterHitRecord< SiStripRecHit2D::ClusterRef >rekey ( const SiStripRecHit2D::ClusterRef newRef) const

Definition at line 160 of file ClusterStorer.cc.

References assert(), OmniClusterRef::key(), SiStripMatchedRecHit2D::monoClusterRef(), TrackerSingleRecHit::omniCluster(), SiStripDetId::stereo(), and SiStripMatchedRecHit2D::stereoClusterRef().

161  {
162  TrackingRecHit &genericHit = (*hits_)[index_];
163  const std::type_info &hit_type = typeid(genericHit);
164 
165  OmniClusterRef * cluRef=0;
166  if (typeid(SiStripRecHit1D) == hit_type) {
167  cluRef = &static_cast<SiStripRecHit1D&>(genericHit).omniCluster();
168  } else if (typeid(SiStripRecHit2D) == hit_type) {
169  cluRef = &static_cast<SiStripRecHit2D&>(genericHit).omniCluster();
170  } else if (typeid(SiStripMatchedRecHit2D) == hit_type) {
171  SiStripMatchedRecHit2D &mhit = static_cast<SiStripMatchedRecHit2D&>(genericHit);
172  cluRef = (SiStripDetId(detid_).stereo() ? &mhit.stereoClusterRef() : &mhit.monoClusterRef());
173  } else if (typeid(ProjectedSiStripRecHit2D) == hit_type) {
174  cluRef = &static_cast<ProjectedSiStripRecHit2D&>(genericHit).originalHit().omniCluster();
175  }
176 
177  assert(cluRef != 0); // to catch missing RecHit types
178  assert(cluRef->key() == ref_.key()); // otherwise something went wrong
179  (*cluRef) = OmniClusterRef(newRef);
180  }
uint32_t stereo() const
Definition: SiStripDetId.h:162
OmniClusterRef const & stereoClusterRef() const
assert(m_qm.get())
OmniClusterRef const & omniCluster() const
OmniClusterRef const & monoClusterRef() const
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
unsigned int key() const
def helper.ConfigSectionMap (   section)

Definition at line 11 of file helper.py.

References Config.options, and reco.print().

11 
12 def ConfigSectionMap(section):
13  dict1 = {}
14  options = Config.options(section)
15  for option in options:
16  try:
17  dict1[option] = Config.get(section, option)
18  if dict1[option] == -1:
19  DebugPrint("skip: %s" % option)
20  except:
21  print("exception on %s!" % option)
22  dict1[option] = None
23  return dict1
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Definition: print.cc:10
tuple options
Definition: Config.py:5
def ConfigSectionMap
Definition: helper.py:11
def helper.findEDAnalyzers (   holder)

Definition at line 26 of file helper.py.

References python.multivaluedict.dict.

26 
27 def findEDAnalyzers(holder):
28  if isinstance(holder, cms.Process):
29  return process.analyzers_()
30  else:
31  return dict( (name, module) for name, module in holder.iteritems() if isinstance(module, cms.EDAnalyzer) )
32 
def findEDAnalyzers
Definition: helper.py:26
def helper.findEDFilters (   holder)

Definition at line 12 of file helper.py.

References python.multivaluedict.dict.

12 
13 def findEDFilters(holder):
14  if isinstance(holder, cms.Process):
15  return process.filters_()
16  else:
17  return dict( (name, module) for name, module in holder.iteritems() if isinstance(module, cms.EDFilter) )
18 
def findEDFilters
Definition: helper.py:12
def helper.findEDProducers (   holder)

Definition at line 19 of file helper.py.

References python.multivaluedict.dict.

19 
20 def findEDProducers(holder):
21  if isinstance(holder, cms.Process):
22  return process.producers_()
23  else:
24  return dict( (name, module) for name, module in holder.iteritems() if isinstance(module, cms.EDProducer) )
25 
def findEDProducers
Definition: helper.py:19
def helper.findModules (   holder)

Definition at line 33 of file helper.py.

References python.multivaluedict.dict.

33 
34 def findModules(holder):
35  if isinstance(holder, cms.Process):
36  modules = dict()
37  modules.upate(process.analyzers_())
38  modules.upate(process.producers_())
39  modules.upate(process.filters_())
40  return modules
41  else:
42  return dict( (name, module) for name, module in holder.iteritems() if isinstance(module, (cms.EDAnalyzer, _cms.EDProducer, _cms.EDFilter)) )
43 
44 
def findModules
Definition: helper.py:33
template<typename T >
std::pair<typename T::DetSet::const_iterator, typename T::DetSet::const_iterator> helper::getRange ( const T detset,
const DetId id 
)

Definition at line 36 of file SiStripRecHitsValid.cc.

References match().

Referenced by SiStripRecHitsValid::analyze(), reco::TaggingVariableList::get(), reco::TaggingVariableList::getList(), and ThirdHitPredictionFromInvParabola::rangeRPhi().

36  {
37  typedef std::pair<typename T::DetSet::const_iterator, typename T::DetSet::const_iterator> return_type;
38  typename T::const_iterator match = detset.find(id);
39  if (match == detset.end()) return return_type();
40  typename T::DetSet hits = *match;
41  return return_type(hits.begin(), hits.end());
42  }
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

Variable Documentation

tuple helper.Config = cp.ConfigParser()

Definition at line 9 of file helper.py.

Referenced by XrdAdaptor::Source.getXrootdSiteFromURL(), PhysicsTools::VarProcessor::ConfIterator.operator<<(), and cond::SQLMonitoringService.reportOnEvent().