SwimStepper Class Reference

#include <SwimStepper.h>

Inheritance diagram for SwimStepper:
SwimDefStepper SwimG4Stepper

List of all members.

Public Member Functions

 SwimStepper ()
virtual ~SwimStepper ()
virtual bool StepOnce (SwimParticle &, SwimStepData *)
void AddStepAction (SwimStepAction *a)
void Action (SwimParticle &particle, SwimStepData *stepData)

Private Attributes

std::list< SwimStepAction * > fListOfAction
SwimdEdxAction fdEdxAction
SwimStepOnceAction fStepOnceAction

Detailed Description

Definition at line 20 of file SwimStepper.h.


Constructor & Destructor Documentation

SwimStepper::SwimStepper (  )  [inline]

Definition at line 23 of file SwimStepper.h.

References AddStepAction(), fdEdxAction, and fStepOnceAction.

00024   {
00025     this->AddStepAction(&fStepOnceAction);
00026     this->AddStepAction(&fdEdxAction); 
00027   }

virtual SwimStepper::~SwimStepper (  )  [inline, virtual]

Definition at line 28 of file SwimStepper.h.

00028 {;}


Member Function Documentation

void SwimStepper::Action ( SwimParticle particle,
SwimStepData stepData 
) [inline]

Definition at line 36 of file SwimStepper.h.

References fListOfAction, and SwimStepData::GetIsForward().

Referenced by SwimSwimmer::Swim().

00037   {
00038     if (stepData->GetIsForward()==true) {
00039       std::list<SwimStepAction*>::iterator itr(fListOfAction.begin());
00040       std::list<SwimStepAction*>::iterator itrEnd(fListOfAction.end());
00041       for (;itr!=itrEnd;++itr)
00042         (*itr)->Perform(particle, stepData);
00043     }
00044     else {
00045       std::list<SwimStepAction*>::reverse_iterator ritr(fListOfAction.rbegin());
00046       std::list<SwimStepAction*>::reverse_iterator ritrEnd(fListOfAction.rend());
00047       for (;ritr!=ritrEnd;++ritr)
00048         (*ritr)->Perform(particle, stepData);
00049     }
00050   }

void SwimStepper::AddStepAction ( SwimStepAction a  )  [inline]

Definition at line 31 of file SwimStepper.h.

References fListOfAction.

Referenced by TestSwimmer::Ana(), main(), and SwimStepper().

00032   { 
00033     fListOfAction.push_back(a); 
00034   }

virtual bool SwimStepper::StepOnce ( SwimParticle ,
SwimStepData  
) [inline, virtual]

Reimplemented in SwimDefStepper, and SwimG4Stepper.

Definition at line 29 of file SwimStepper.h.

Referenced by SwimStepOnceAction::Perform().

00030                                                        { return false; }


Member Data Documentation

Definition at line 54 of file SwimStepper.h.

Referenced by SwimStepper().

Definition at line 53 of file SwimStepper.h.

Referenced by Action(), and AddStepAction().

Definition at line 55 of file SwimStepper.h.

Referenced by SwimStepper().


The documentation for this class was generated from the following file:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1