Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

HepMcParticleLink Class Reference

a link optimized in size for a GenParticle in a McEventCollection More...

#include <HepMcParticleLink.h>

List of all members.

Public Types

typedef unsigned int index_type
typedef unsigned int index_type

Public Member Functions

const HepMC::GenParticle * cptr () const
const HepMC::GenParticle * cptr () const
bool isValid () const
bool isValid () const
indexing accessors (e.g. for writing)
int barcode () const
index_type eventIndex () const
indexing accessors (e.g. for writing)
int barcode () const
index_type eventIndex () const
structors
 HepMcParticleLink (const HepMC::GenParticle *part, const HepMC::GenEvent *pevt)
 HepMcParticleLink (const HepMcParticleLink &rhs)
 HepMcParticleLink (const HepMC::GenParticle *p, index_type eventIndex=0)
 HepMcParticleLink (index_type barCode, index_type eventIndex=0)
 HepMcParticleLink ()
structors
 HepMcParticleLink (const HepMC::GenParticle *part, const HepMC::GenEvent *pevt)
 HepMcParticleLink (const HepMcParticleLink &rhs)
 HepMcParticleLink (const HepMC::GenParticle *p, index_type eventIndex=0)
 HepMcParticleLink (index_type barCode, index_type eventIndex=0)
 HepMcParticleLink ()
pointer interface
const HepMC::GenParticle & operator * () const
 
Exceptions:
std::runtime_error when the element is not found

 operator const HepMC::GenParticle * () const
bool operator! () const
const HepMC::GenParticle * operator-> () const
pointer interface
const HepMC::GenParticle & operator * () const
 
Exceptions:
std::runtime_error when the element is not found

 operator const HepMC::GenParticle * () const
bool operator! () const
const HepMC::GenParticle * operator-> () const

Private Attributes

ExtendedBarCode m_extBarcode
HepMC::GenParticle * m_particle
HepMC::GenParticle * m_particle


Detailed Description

a link optimized in size for a GenParticle in a McEventCollection

See also:
McEventCollection, GenEvent, ElementLink
Author:
Paolo Calafiura
Id
HepMcParticleLink.h,v 1.1.1.1 2004/09/28 06:40:36 liwd Exp


Member Typedef Documentation

typedef unsigned int HepMcParticleLink::index_type
 

typedef unsigned int HepMcParticleLink::index_type
 


Constructor & Destructor Documentation

HepMcParticleLink::HepMcParticleLink  )  [inline]
 

00023 : m_particle(0), m_extBarcode() {}

HepMcParticleLink::HepMcParticleLink index_type  barCode,
index_type  eventIndex = 0
[inline]
 

00024                                                                    :
00025     m_particle(0), m_extBarcode(barCode, eventIndex) {}
  HepMcParticleLink(const HepMC::GenParticle* p, index_type eventIndex = 0);

HepMcParticleLink::HepMcParticleLink const HepMC::GenParticle *  p,
index_type  eventIndex = 0
 

00009                                                             :
00010     m_particle(const_cast<HepMC::GenParticle*>(part)), 
00011     m_extBarcode((0 != part) ? part->barcode() : 0, eventIndex) {
00012   assert(part);
00013 }

HepMcParticleLink::HepMcParticleLink const HepMcParticleLink rhs  )  [inline]
 

00027                                                   : 
00028     m_particle(rhs.m_particle),
00029     m_extBarcode(rhs.m_extBarcode) {}

HepMcParticleLink::HepMcParticleLink const HepMC::GenParticle *  part,
const HepMC::GenEvent *  pevt
 

HepMcParticleLink::HepMcParticleLink  )  [inline]
 

00023 : m_particle(0), m_extBarcode() {}

HepMcParticleLink::HepMcParticleLink index_type  barCode,
index_type  eventIndex = 0
[inline]
 

00024                                                                    :
00025     m_particle(0), m_extBarcode(barCode, eventIndex) {}
  HepMcParticleLink(const HepMC::GenParticle* p, index_type eventIndex = 0);

HepMcParticleLink::HepMcParticleLink const HepMC::GenParticle *  p,
index_type  eventIndex = 0
 

HepMcParticleLink::HepMcParticleLink const HepMcParticleLink rhs  )  [inline]
 

00027                                                   : 
00028     m_particle(rhs.m_particle),
00029     m_extBarcode(rhs.m_extBarcode) {}

HepMcParticleLink::HepMcParticleLink const HepMC::GenParticle *  part,
const HepMC::GenEvent *  pevt
 


Member Function Documentation

int HepMcParticleLink::barcode  )  const [inline]
 

00045 { return m_extBarcode.barcode(); }

int HepMcParticleLink::barcode  )  const [inline]
 

00045 { return m_extBarcode.barcode(); }

const HepMC::GenParticle* HepMcParticleLink::cptr  )  const
 

const HepMC::GenParticle * HepMcParticleLink::cptr  )  const
 

00015                                                       {
00016   if (!m_particle) {
00017     const McEventCollection* pEvtColl;
00018     if ((StoreGate::instance().retrieve(pEvtColl)).isSuccess()) { //FIXME SLOW
00019       m_particle = pEvtColl->at(eventIndex())->barcode_to_particle(barcode());
00020     }
00021   }
00022   return m_particle;
00023 }

index_type HepMcParticleLink::eventIndex  )  const [inline]
 

00046 { return m_extBarcode.eventIndex(); }

index_type HepMcParticleLink::eventIndex  )  const [inline]
 

00046 { return m_extBarcode.eventIndex(); }

bool HepMcParticleLink::isValid  )  const [inline]
 

00049 { return (0 != cptr()); }

bool HepMcParticleLink::isValid  )  const [inline]
 

00049 { return (0 != cptr()); }

const HepMC::GenParticle& HepMcParticleLink::operator * void   )  const [inline]
 

Exceptions:
std::runtime_error when the element is not found

00037 { return *cptr(); }//FIXME

const HepMC::GenParticle& HepMcParticleLink::operator * void   )  const [inline]
 

Exceptions:
std::runtime_error when the element is not found

00037 { return *cptr(); }//FIXME

HepMcParticleLink::operator const HepMC::GenParticle *  )  const [inline]
 

00039 { return cptr(); }

HepMcParticleLink::operator const HepMC::GenParticle *  )  const [inline]
 

00039 { return cptr(); }

bool HepMcParticleLink::operator!  )  const [inline]
 

00040 {return !isValid();}

bool HepMcParticleLink::operator!  )  const [inline]
 

00040 {return !isValid();}

const HepMC::GenParticle* HepMcParticleLink::operator->  )  const [inline]
 

00038 { return cptr(); }

const HepMC::GenParticle* HepMcParticleLink::operator->  )  const [inline]
 

00038 { return cptr(); }


Member Data Documentation

ExtendedBarCode HepMcParticleLink::m_extBarcode [private]
 

HepMC::GenParticle* HepMcParticleLink::m_particle [mutable, private]
 

HepMC::GenParticle* HepMcParticleLink::m_particle [mutable, private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:17:01 2011 for BOSS6.5.5 by  doxygen 1.3.9.1