CMS 3D CMS Logo

Public Types | Public Member Functions | Public Attributes | Static Private Attributes

OmniClusterRef Class Reference

#include <OmniClusterRef.h>

List of all members.

Public Types

typedef edm::Ref
< edmNew::DetSetVector
< SiPixelCluster >
, SiPixelCluster
ClusterPixelRef
typedef edm::Ref
< edm::LazyGetter
< SiStripCluster >
, SiStripCluster,
edm::FindValue< SiStripCluster > > 
ClusterRegionalRef
typedef edm::Ref
< edmNew::DetSetVector
< SiStripCluster >
, SiStripCluster
ClusterStripRef

Public Member Functions

ClusterPixelRef cluster_pixel () const
ClusterRegionalRef cluster_regional () const
ClusterStripRef cluster_strip () const
edm::ProductID id () const
unsigned int index () const
bool isNonRegionalStrip () const
bool isPixel () const
bool isRegional () const
bool isStrip () const
bool isValid () const
unsigned int key () const
 OmniClusterRef (ClusterStripRef const &ref)
 OmniClusterRef (ClusterRegionalRef const &ref)
 OmniClusterRef ()
 OmniClusterRef (ClusterPixelRef const &ref)
bool operator< (OmniClusterRef const &lh) const
bool operator== (OmniClusterRef const &lh) const
unsigned int rawIndex () const
SiStripCluster const & stripCluster () const

Public Attributes

edm::RefCoreWithIndex me

Static Private Attributes

static const unsigned int kInvalid = 0x80000000
static const unsigned int kIsRegional = 0x60000000
static const unsigned int kIsStrip = 0x20000000

Detailed Description

Definition at line 12 of file OmniClusterRef.h.


Member Typedef Documentation

Definition at line 19 of file OmniClusterRef.h.

Definition at line 21 of file OmniClusterRef.h.

Definition at line 20 of file OmniClusterRef.h.


Constructor & Destructor Documentation

OmniClusterRef::OmniClusterRef ( ) [inline]

Definition at line 23 of file OmniClusterRef.h.

OmniClusterRef::OmniClusterRef ( ClusterPixelRef const &  ref) [inline, explicit]

Definition at line 24 of file OmniClusterRef.h.

: me(ref.refCore(), (ref.isNonnull() ? ref.key() : kInvalid) ){}
OmniClusterRef::OmniClusterRef ( ClusterStripRef const &  ref) [inline, explicit]

Definition at line 25 of file OmniClusterRef.h.

: me(ref.refCore(), (ref.isNonnull() ? ref.key() | kIsStrip : kInvalid) ){}
OmniClusterRef::OmniClusterRef ( ClusterRegionalRef const &  ref) [inline, explicit]

Definition at line 26 of file OmniClusterRef.h.

: me(ref.refCore(), (ref.isNonnull() ? ref.key() | kIsRegional : kInvalid)){}

Member Function Documentation

ClusterPixelRef OmniClusterRef::cluster_pixel ( ) const [inline]
ClusterRegionalRef OmniClusterRef::cluster_regional ( ) const [inline]
ClusterStripRef OmniClusterRef::cluster_strip ( ) const [inline]
edm::ProductID OmniClusterRef::id ( void  ) const [inline]
unsigned int OmniClusterRef::index ( ) const [inline]

Definition at line 61 of file OmniClusterRef.h.

References kIsRegional, and rawIndex().

Referenced by cluster_pixel(), cluster_regional(), cluster_strip(), key(), and stripCluster().

{ return rawIndex() & (~kIsRegional);}
bool OmniClusterRef::isNonRegionalStrip ( ) const [inline]

Definition at line 68 of file OmniClusterRef.h.

References kIsRegional, kIsStrip, and rawIndex().

Referenced by cluster_strip().

{return (rawIndex() & kIsRegional)==kIsStrip;}
bool OmniClusterRef::isPixel ( ) const [inline]

Definition at line 65 of file OmniClusterRef.h.

References isStrip().

Referenced by cluster_pixel().

{ return !isStrip(); } //NOTE: non-valid will also show up as a pixel
bool OmniClusterRef::isRegional ( ) const [inline]

Definition at line 67 of file OmniClusterRef.h.

References kIsRegional, and rawIndex().

Referenced by cluster_regional(), and stripCluster().

{ return (rawIndex() & kIsRegional)==kIsRegional; }
bool OmniClusterRef::isStrip ( ) const [inline]

Definition at line 66 of file OmniClusterRef.h.

References kIsStrip, and rawIndex().

Referenced by isPixel().

{ return rawIndex() & kIsStrip; }
bool OmniClusterRef::isValid ( void  ) const [inline]

Definition at line 64 of file OmniClusterRef.h.

References kInvalid, and rawIndex().

Referenced by cluster_pixel().

{ return !(rawIndex() & kInvalid); }
unsigned int OmniClusterRef::key ( ) const [inline]
bool OmniClusterRef::operator< ( OmniClusterRef const &  lh) const [inline]

Definition at line 49 of file OmniClusterRef.h.

References rawIndex().

                                                  { 
    return rawIndex() < lh.rawIndex(); // in principle this is enough!
  }
bool OmniClusterRef::operator== ( OmniClusterRef const &  lh) const [inline]

Definition at line 45 of file OmniClusterRef.h.

References rawIndex().

                                                   { 
    return rawIndex() == lh.rawIndex(); // in principle this is enough!
  }
unsigned int OmniClusterRef::rawIndex ( ) const [inline]

Definition at line 59 of file OmniClusterRef.h.

References edm::RefCoreWithIndex::index(), and me.

Referenced by index(), isNonRegionalStrip(), isRegional(), isStrip(), isValid(), operator<(), and operator==().

{ return me.index();}
SiStripCluster const& OmniClusterRef::stripCluster ( ) const [inline]

Member Data Documentation

const unsigned int OmniClusterRef::kInvalid = 0x80000000 [static, private]

Definition at line 14 of file OmniClusterRef.h.

Referenced by isValid().

const unsigned int OmniClusterRef::kIsRegional = 0x60000000 [static, private]

Definition at line 16 of file OmniClusterRef.h.

Referenced by index(), isNonRegionalStrip(), and isRegional().

const unsigned int OmniClusterRef::kIsStrip = 0x20000000 [static, private]

Definition at line 15 of file OmniClusterRef.h.

Referenced by isNonRegionalStrip(), and isStrip().