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 | Static Public Member Functions | Private Member Functions | Private Attributes
edm::DetSetVector< T > Class Template Reference

#include <DetSetVector.h>

Inheritance diagram for edm::DetSetVector< T >:

Public Types

typedef std::vector< detsetcollection_type
 
typedef
collection_type::const_iterator 
const_iterator
 
typedef detset const & const_reference
 
typedef DetSet< Tdetset
 
typedef collection_type::iterator iterator
 
typedef detsetreference
 
typedef collection_type::size_type size_type
 
typedef detset value_type
 

Public Member Functions

iterator begin ()
 Return an iterator to the first DetSet. More...
 
const_iterator begin () const
 
 DetSetVector ()
 Create an empty DetSetVector. More...
 
 DetSetVector (std::vector< DetSet< T > > &input, bool alreadySorted=false)
 
bool empty () const
 Return true if we contain no DetSets. More...
 
iterator end ()
 Return the off-the-end iterator. More...
 
const_iterator end () const
 
void fillView (ProductID const &id, std::vector< void const * > &pointers, FillViewHelperVector &helpers) const
 
iterator find (det_id_type id)
 
const_iterator find (det_id_type id) const
 
reference find_or_insert (det_id_type id)
 
void getIds (std::vector< det_id_type > &result) const
 
void insert (detset const &s)
 Insert the given DetSet. More...
 
DetSetVectoroperator= (DetSetVector const &other)
 
reference operator[] (det_id_type i)
 
const_reference operator[] (det_id_type i) const
 
void post_insert ()
 
void reserve (size_t s)
 
size_type size () const
 Return the number of contained DetSets. More...
 
void swap (DetSetVector &other)
 

Static Public Member Functions

static short Class_Version ()
 

Private Member Functions

void _sort ()
 Sort the DetSet in order of increasing DetId. More...
 
 BOOST_CLASS_REQUIRE (T, boost, LessThanComparableConcept)
 

Private Attributes

edm::BoolCache _alreadySorted
 
collection_type _sets
 

Detailed Description

template<class T>
class edm::DetSetVector< T >

Definition at line 60 of file DetSetVector.h.

Member Typedef Documentation

template<class T>
typedef std::vector<detset> edm::DetSetVector< T >::collection_type

Definition at line 98 of file DetSetVector.h.

template<class T>
typedef collection_type::const_iterator edm::DetSetVector< T >::const_iterator

Definition at line 104 of file DetSetVector.h.

template<class T>
typedef detset const& edm::DetSetVector< T >::const_reference

Definition at line 101 of file DetSetVector.h.

template<class T>
typedef DetSet<T> edm::DetSetVector< T >::detset

Definition at line 96 of file DetSetVector.h.

template<class T>
typedef collection_type::iterator edm::DetSetVector< T >::iterator

Definition at line 103 of file DetSetVector.h.

template<class T>
typedef detset& edm::DetSetVector< T >::reference

Definition at line 100 of file DetSetVector.h.

template<class T>
typedef collection_type::size_type edm::DetSetVector< T >::size_type

Definition at line 105 of file DetSetVector.h.

template<class T>
typedef detset edm::DetSetVector< T >::value_type

Definition at line 97 of file DetSetVector.h.

Constructor & Destructor Documentation

template<class T >
edm::DetSetVector< T >::DetSetVector ( )
inline

Create an empty DetSetVector.

Compiler-generated copy c'tor, d'tor and assignment are correct.

Definition at line 201 of file DetSetVector.h.

template<class T>
edm::DetSetVector< T >::DetSetVector ( std::vector< DetSet< T > > &  input,
bool  alreadySorted = false 
)
inlineexplicit

Create a DetSetVector by copying swapping in the given vector, and then sorting the contents. N.B.: Swapping in the vector destructively modifies the input. Using swap here allows us to avoid copying the data. N.B. 2: if you set alreadySorted to true, data must be sorted, (the vector<DetSet<T>> must be ordered by detid, and each DetSet must be ordered according to the natural "strict weak ordering" of Ts. You must not modify the contents after this DSV after creation, or you might get an undefined behavior / a core dump. (there are some checks to assure alreadySorted is resetted if you try to modify the DSV, but you should not count on them)

Definition at line 207 of file DetSetVector.h.

Member Function Documentation

template<class T >
void edm::DetSetVector< T >::_sort ( )
inlineprivate

Sort the DetSet in order of increasing DetId.

Definition at line 403 of file DetSetVector.h.

template<class T >
DetSetVector< T >::iterator edm::DetSetVector< T >::begin ( void  )
inline
template<class T >
DetSetVector< T >::const_iterator edm::DetSetVector< T >::begin ( void  ) const
inline

Definition at line 354 of file DetSetVector.h.

template<class T>
edm::DetSetVector< T >::BOOST_CLASS_REQUIRE ( T  ,
boost  ,
LessThanComparableConcept   
)
private

DetSetVector requires that T objects can be compared with operator<.

template<class T>
static short edm::DetSetVector< T >::Class_Version ( )
inlinestatic

Definition at line 188 of file DetSetVector.h.

template<class T >
bool edm::DetSetVector< T >::empty ( ) const
inline

Return true if we contain no DetSets.

Definition at line 276 of file DetSetVector.h.

template<class T >
DetSetVector< T >::iterator edm::DetSetVector< T >::end ( void  )
inline
template<class T >
DetSetVector< T >::const_iterator edm::DetSetVector< T >::end ( void  ) const
inline

Definition at line 369 of file DetSetVector.h.

template<class T >
void edm::DetSetVector< T >::fillView ( ProductID const &  id,
std::vector< void const * > &  pointers,
FillViewHelperVector helpers 
) const

Definition at line 408 of file DetSetVector.h.

template<class T >
DetSetVector< T >::iterator edm::DetSetVector< T >::find ( det_id_type  id)
inline

Return an iterator to the DetSet with the given id, or end() if there is no such DetSet.

Definition at line 290 of file DetSetVector.h.

Referenced by CSCHitAssociator::associateCSCHitId(), CSCHitAssociator::associateHitId(), and GEMHitAssociator::associateRecHit().

template<class T >
DetSetVector< T >::const_iterator edm::DetSetVector< T >::find ( det_id_type  id) const
inline

Definition at line 310 of file DetSetVector.h.

template<class T >
DetSetVector< T >::reference edm::DetSetVector< T >::find_or_insert ( det_id_type  id)
inline

Find the DetSet with the given DetId, and return a reference to it. If there is none, create one with the right DetId, and an empty vector, and return a reference to the new one.

Definition at line 254 of file DetSetVector.h.

Referenced by TotemRPUVPattern::addHit(), CTPPSDiamondRecHitProducerAlgorithm::build(), TotemRPRecHitProducer::produce(), TotemRPLocalTrackFitter::produce(), and TotemRPClusterProducer::run().

template<class T >
void edm::DetSetVector< T >::getIds ( std::vector< det_id_type > &  result) const
inline

Push all the id for each DetSet stored in this DetSetVector into the given vector 'result'.

Definition at line 377 of file DetSetVector.h.

template<class T >
void edm::DetSetVector< T >::insert ( detset const &  s)
inline

Insert the given DetSet.

Definition at line 235 of file DetSetVector.h.

Referenced by SiStripProcessedRawDigiProducer::common_process(), and RPCDigitizer::doAction().

template<class T>
DetSetVector& edm::DetSetVector< T >::operator= ( DetSetVector< T > const &  other)
template<class T >
DetSetVector< T >::reference edm::DetSetVector< T >::operator[] ( det_id_type  i)
inline

Return a reference to the DetSet with the given detector ID. If there is no such DetSet, we throw an edm::Exception. DO NOT MODIFY THE id DATA MEMBER OF THE REFERENCED DetSet!

Definition at line 323 of file DetSetVector.h.

template<class T >
DetSetVector< T >::const_reference edm::DetSetVector< T >::operator[] ( det_id_type  i) const
inline

Definition at line 335 of file DetSetVector.h.

template<class T >
void edm::DetSetVector< T >::post_insert ( )
inline

This function will be called by the edm::Event after the DetSetVector has been inserted into the Event.

Definition at line 387 of file DetSetVector.h.

template<class T>
void edm::DetSetVector< T >::reserve ( size_t  s)
inline

Definition at line 150 of file DetSetVector.h.

template<class T >
DetSetVector< T >::size_type edm::DetSetVector< T >::size ( void  ) const
inline

Return the number of contained DetSets.

Definition at line 283 of file DetSetVector.h.

template<class T>
void edm::DetSetVector< T >::swap ( DetSetVector< T > &  other)

Member Data Documentation

template<class T>
edm::BoolCache edm::DetSetVector< T >::_alreadySorted
private

Definition at line 192 of file DetSetVector.h.

template<class T>
collection_type edm::DetSetVector< T >::_sets
private

Definition at line 191 of file DetSetVector.h.