#include <CDDecayStorageHelper.h>
Public Member Functions | |
CDDecayStorageHelper () | |
CDDecayStorageHelper () | |
Protected Member Functions | |
virtual DABoolean | compare (const CDDecay *iNewData, const CDDecay &iOldData) const |
virtual DABoolean | compare (const CDDecay *iNewData, const CDDecay &iOldData) const |
CDDecay * | deliverV1 (SMSourceStream &iSource) |
CDDecay * | deliverV1 (SMSourceStream &iSource) |
virtual const CDDecay & | getDefault () const |
virtual const CDDecay & | getDefault () const |
virtual void | implementStore (SMSinkStream &iSink, const CDDecay &iData) |
virtual void | implementStore (SMSinkStream &iSink, const CDDecay &iData) |
Private Member Functions | |
CDDecayStorageHelper (const CDDecayStorageHelper &) | |
CDDecayStorageHelper (const CDDecayStorageHelper &) | |
const CDDecayStorageHelper & | operator= (const CDDecayStorageHelper &) |
const CDDecayStorageHelper & | operator= (const CDDecayStorageHelper &) |
void | registerVersion (CDDecay *(CDDecayStorageHelper::*iMethod)(SMSourceStream &)) |
void | registerVersion (CDDecay *(CDDecayStorageHelper::*iMethod)(SMSourceStream &)) |
|
00125 { 00126 //registration of the different versions 00127 // NOTE: version number is determined by the order in which the 00128 // methods are registered 00129 registerVersion( &CDDecayStorageHelper::deliverV1 ); 00130 }
|
|
|
|
|
|
|
|
|
|
00229 { 00230 //write a comparison operation if operator== doesn't exist for CDDecay 00231 return true; 00232 //(*iNewData == iOldData ) ; 00233 }
|
|
|
|
00187 { 00188 00189 STL_VECTOR( ReferenceHolder<CDCandidate> ) children; 00190 back_insert_iterator<STL_VECTOR( ReferenceHolder<CDCandidate> ) > itInsertChild(children); 00191 GeV mass; 00192 double x,y,z; 00193 00194 iSource 00195 >> sm_make_contents(itInsertChild) 00196 >> mass 00197 >> x >> y >> z 00198 ; 00199 00200 CDDecay* returnValue = make( CDDecay( *children.front() ) ); 00201 00202 for( STL_VECTOR( ReferenceHolder<CDCandidate> )::iterator itChild= children.begin() + 1; 00203 itChild != children.end(); 00204 ++itChild ) { 00205 returnValue->addChild(**itChild); 00206 } 00207 returnValue->setMass( mass ); 00208 returnValue->setMomentum( HepVector3D(x,y,z) ); 00209 00210 return returnValue; 00211 }
|
|
|
|
00218 { 00219 //give constructor unique values to allow test of store and deliver 00220 // functions 00221 static const StorableDecay temp; 00222 return temp; 00223 }
|
|
|
|
00164 { 00165 // NOTE: Any change (adding/removing variable OR packing info) to this routine 00166 // MUST be accompanied by registering a new version deliver routine in 00167 // this class's constructor. 00168 // If only the packing info is changes, you can register the same deliver 00169 // routine a second time. 00170 typedef TBDerefItr<STL_VECTOR(ReferenceHolder<CDCandidate> )::const_iterator , 00171 const CDCandidate, 00172 CDCandidate> DerefItr; 00173 00174 00175 iSink 00176 << sm_field("children", sm_contents( DerefItr(iData.children().begin()), 00177 DerefItr(iData.children().end()) ) ) 00178 << SM_VAR(iData, mass) 00179 << SM_VAR(iData, momentum().x) 00180 << SM_VAR(iData, momentum().y) 00181 << SM_VAR(iData, momentum().z) 00182 ; 00183 }
|
|
|
|
|
|
|
|
|