Jpp  debug
the software that should make you happy
Public Member Functions | Private Attributes | List of all members
JACOUSTICS::JSydney::JAnchorEditor Struct Reference

Auxiliary class to edit orientation of anchor. More...

Inheritance diagram for JACOUSTICS::JSydney::JAnchorEditor:
JFIT::JParameter_t

Public Member Functions

 JAnchorEditor (JSetup &setup, const int id)
 Constructor. More...
 
virtual void apply (const double step) override
 Apply step. More...
 

Private Attributes

std::vector< JHydrophone > & hydrophones
 
std::vector< JTransmitter > & transmitters
 
size_t index [2]
 

Detailed Description

Auxiliary class to edit orientation of anchor.

Definition at line 451 of file JSydney.cc.

Constructor & Destructor Documentation

◆ JAnchorEditor()

JACOUSTICS::JSydney::JAnchorEditor::JAnchorEditor ( JSetup setup,
const int  id 
)
inline

Constructor.

Parameters
setupsetup
idstring identifier

Definition at line 460 of file JSydney.cc.

460  :
463  {
464  using namespace std;
465  using namespace JPP;
466 
467  index[0] = distance(hydrophones .begin(), find_if(hydrophones .begin(), hydrophones .end(), make_predicate(&JHydrophone ::getString, id)));
468  index[1] = distance(transmitters.begin(), find_if(transmitters.begin(), transmitters.end(), make_predicate(&JTransmitter::getString, id)));
469  }
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
int getString() const
Get string number.
Definition: JLocation.hh:134
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.
Definition: JPredicate.hh:128
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JSTDTypes.hh:14
hydrophones
hydrophones
transmitters_container transmitters
transmitters
Definition: JSydney.cc:127
std::vector< JTransmitter > & transmitters
Definition: JSydney.cc:489
std::vector< JHydrophone > & hydrophones
Definition: JSydney.cc:488

Member Function Documentation

◆ apply()

virtual void JACOUSTICS::JSydney::JAnchorEditor::apply ( const double  step)
inlineoverridevirtual

Apply step.

Parameters
stepstep

Implements JFIT::JParameter_t.

Definition at line 477 of file JSydney.cc.

478  {
479  using namespace JPP;
480 
481  const JRotation3Z R(step);
482 
483  if (index[0] != hydrophones .size()) { hydrophones [index[0]].rotate(R); }
484  if (index[1] != transmitters.size()) { transmitters[index[1]].rotate(R); }
485  }
Rotation around Z-axis.
Definition: JRotation3D.hh:87

Member Data Documentation

◆ hydrophones

std::vector<JHydrophone>& JACOUSTICS::JSydney::JAnchorEditor::hydrophones
private

Definition at line 488 of file JSydney.cc.

◆ transmitters

std::vector<JTransmitter>& JACOUSTICS::JSydney::JAnchorEditor::transmitters
private

Definition at line 489 of file JSydney.cc.

◆ index

size_t JACOUSTICS::JSydney::JAnchorEditor::index[2]
private

Definition at line 490 of file JSydney.cc.


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