Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
virtual void apply (const double step) override
 Apply step.
 

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 467 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 476 of file JSydney.cc.

476 :
479 {
480 using namespace std;
481 using namespace JPP;
482
483 index[0] = distance(hydrophones .begin(), find_if(hydrophones .begin(), hydrophones .end(), make_predicate(&JHydrophone ::getString, id)));
484 index[1] = distance(transmitters.begin(), find_if(transmitters.begin(), transmitters.end(), make_predicate(&JTransmitter::getString, id)));
485 }
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
hydrophones
hydrophones
transmitters_container transmitters
transmitters
Definition JSydney.cc:143
std::vector< JTransmitter > & transmitters
Definition JSydney.cc:505
std::vector< JHydrophone > & hydrophones
Definition JSydney.cc:504

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 493 of file JSydney.cc.

494 {
495 using namespace JPP;
496
497 const JRotation3Z R(step);
498
499 if (index[0] != hydrophones .size()) { hydrophones [index[0]].rotate(R); }
500 if (index[1] != transmitters.size()) { transmitters[index[1]].rotate(R); }
501 }
Rotation around Z-axis.

Member Data Documentation

◆ hydrophones

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

Definition at line 504 of file JSydney.cc.

◆ transmitters

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

Definition at line 505 of file JSydney.cc.

◆ index

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

Definition at line 506 of file JSydney.cc.


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