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

CDDecayListStorageHelper Class Reference

#include <CDDecayListStorageHelper.h>

List of all members.

Public Member Functions

 CDDecayListStorageHelper ()
 CDDecayListStorageHelper ()

Protected Member Functions

virtual DABoolean compare (const CDDecayList *iNewData, const CDDecayList &iOldData) const
virtual DABoolean compare (const CDDecayList *iNewData, const CDDecayList &iOldData) const
CDDecayListdeliverV1 (SMSourceStream &iSource)
CDDecayListdeliverV1 (SMSourceStream &iSource)
virtual const CDDecayListgetDefault () const
virtual const CDDecayListgetDefault () const
virtual void implementStore (SMSinkStream &iSink, const CDDecayList &iData)
virtual void implementStore (SMSinkStream &iSink, const CDDecayList &iData)

Private Member Functions

 CDDecayListStorageHelper (const CDDecayListStorageHelper &)
 CDDecayListStorageHelper (const CDDecayListStorageHelper &)
const CDDecayListStorageHelperoperator= (const CDDecayListStorageHelper &)
const CDDecayListStorageHelperoperator= (const CDDecayListStorageHelper &)
void registerVersion (CDDecayList *(CDDecayListStorageHelper::*iMethod)(SMSourceStream &))
void registerVersion (CDDecayList *(CDDecayListStorageHelper::*iMethod)(SMSourceStream &))


Constructor & Destructor Documentation

CDDecayListStorageHelper::CDDecayListStorageHelper  ) 
 

00126 {
00127    //registration of the different versions
00128    // NOTE: version number is determined by the order in which the
00129    // methods are registered
00130    registerVersion( &CDDecayListStorageHelper::deliverV1 );
00131 }

CDDecayListStorageHelper::CDDecayListStorageHelper const CDDecayListStorageHelper  )  [private]
 

CDDecayListStorageHelper::CDDecayListStorageHelper  ) 
 

CDDecayListStorageHelper::CDDecayListStorageHelper const CDDecayListStorageHelper  )  [private]
 


Member Function Documentation

virtual DABoolean CDDecayListStorageHelper::compare const CDDecayList iNewData,
const CDDecayList iOldData
const [protected, virtual]
 

DABoolean CDDecayListStorageHelper::compare const CDDecayList iNewData,
const CDDecayList iOldData
const [protected, virtual]
 

00310 {
00311    //write a comparison operation if operator== doesn't exist for CDDecayList
00312    return (iNewData->size() == iOldData.size() ) ;
00313 }

CDDecayList* CDDecayListStorageHelper::deliverV1 SMSourceStream &  iSource  )  [protected]
 

CDDecayList * CDDecayListStorageHelper::deliverV1 SMSourceStream &  iSource  )  [protected]
 

00272 {
00273    auto_ptr<FillableCDDecayList> returnValue(new FillableCDDecayList);
00274 
00275    UInt8 label;
00276    iSource 
00277       >> label;
00278    conjugation::Label aLabel = static_cast<conjugation::Label>(label);
00279    returnValue->setLabel(aLabel);
00280 
00281    FillableCDDecayListInsertIterator 
00282       itPrimary(*returnValue, aLabel); 
00283    FillableCDDecayListInsertIterator 
00284       itSecondary(*returnValue, otherLabel(aLabel)); 
00285 
00286    iSource 
00287       >> sm_make_contents( itPrimary)
00288       >> sm_make_contents( itSecondary)
00289          ;
00290    
00291    return returnValue.release();
00292 }

virtual const CDDecayList& CDDecayListStorageHelper::getDefault  )  const [protected, virtual]
 

const CDDecayList & CDDecayListStorageHelper::getDefault  )  const [protected, virtual]
 

00299 {
00300    //give constructor unique values to allow test of store and deliver 
00301    // functions
00302    static const CDDecayList temp;
00303    return temp;
00304 }

virtual void CDDecayListStorageHelper::implementStore SMSinkStream &  iSink,
const CDDecayList iData
[protected, virtual]
 

void CDDecayListStorageHelper::implementStore SMSinkStream &  iSink,
const CDDecayList iData
[protected, virtual]
 

00197 {
00198 // NOTE: Any change (adding/removing variable OR packing info) to this routine
00199 //    MUST be accompanied by registering a new version deliver routine in
00200 //    this class's constructor.  
00201 //    If only the packing info is changes, you can register the same deliver
00202 //    routine a second time.
00203 
00204    iSink 
00205       << sm_field("label", static_cast<UInt8>( iData.label() ) )
00206       << sm_field("primary", sm_contents(
00207          DCLabeledParticleAdapterItr(iData.partial_particle_begin()),
00208          DCLabeledParticleAdapterItr(iData.partial_particle_end() ) ) );
00209    if(iData.isSelfConjugate() ) {
00210       //Store an empty list for the secondary since it is the same
00211       // as the primary list when we have a self conjugating list
00212       iSink
00213          << sm_field("secondary", sm_contents(
00214             DCLabeledParticleAdapterItr(iData.partial_particle_end()),
00215             DCLabeledParticleAdapterItr(iData.partial_particle_end() ) ) )
00216       ;
00217    } else {
00218       
00219       CDDecayList conjugate( iData.bar() );
00220       
00221       iSink
00222          << sm_field("secondary", sm_contents(
00223             DCLabeledParticleAdapterItr(conjugate.partial_particle_begin()),
00224             DCLabeledParticleAdapterItr(conjugate.partial_particle_end() ) ) )
00225          ;
00226    }
00227 }

const CDDecayListStorageHelper& CDDecayListStorageHelper::operator= const CDDecayListStorageHelper  )  [private]
 

const CDDecayListStorageHelper& CDDecayListStorageHelper::operator= const CDDecayListStorageHelper  )  [private]
 

void CDDecayListStorageHelper::registerVersion CDDecayList *(CDDecayListStorageHelper::*)(SMSourceStream &)  iMethod  )  [private]
 

void CDDecayListStorageHelper::registerVersion CDDecayList *(CDDecayListStorageHelper::*)(SMSourceStream &)  iMethod  )  [private]
 


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