An open source method of characteristics neutron transport code.
ReadSegments Class Reference

A class used to read tracking data from a file. More...

#include <TrackTraversingAlgorithms.h>

Public Member Functions

 ReadSegments (TrackGenerator *track_generator)
 Constructor for ReadSegments calls the TraverseSegments constructor and initializes the input FILE to NULL. More...
 
void setInputFile (FILE *input)
 Sets the input file to read in tracking information. More...
 
void execute ()
 Reads a tracking file and saves the information explicitly for every Track in the TrackGenerator. More...
 
void onTrack (Track *track, segment *segments)
 Saves tracking information to the corresponding Track explicitly. More...
 

Additional Inherited Members

- Protected Member Functions inherited from TraverseSegments
 TraverseSegments (TrackGenerator *track_generator)
 Constructor for the TraverseSegments class assigns the TrackGenerator and pulls relevant information from it.
 
virtual ~TraverseSegments ()
 Destructor for TraverseSegments.
 
void loopOverTracks (MOCKernel *kernel)
 Loops over Tracks, applying the provided kernel to all segments and the functionality described in onTrack(...) to all Tracks. More...
 
void loopOverTracksByStackTwoWay (TransportKernel *kernel)
 Loops over all 3D Tracks using axial on-the-fly ray tracking by z-stack, going forward then backward on each 3D Track. More...
 
template<class KernelType >
MOCKernelgetKernel ()
 
- Protected Attributes inherited from TraverseSegments
TrackGenerator_track_generator
 
TrackGenerator3D_track_generator_3D
 
double * _global_z_mesh
 
int _mesh_size
 
segmentationType _segment_formation
 

Detailed Description

A class used to read tracking data from a file.

"src/TrackTraversingAlgorithms.h"

ReadSegments imports Track data from the provided file and writes the tracking data to the Tracks in the provided TrackGenerator.

Constructor & Destructor Documentation

◆ ReadSegments()

ReadSegments::ReadSegments ( TrackGenerator track_generator)

Constructor for ReadSegments calls the TraverseSegments constructor and initializes the input FILE to NULL.

Parameters
track_generatorThe TrackGenerator to pull tracking information from

Member Function Documentation

◆ execute()

void ReadSegments::execute ( )
virtual

Reads a tracking file and saves the information explicitly for every Track in the TrackGenerator.

The tracking file is set by setInputFile(...)

Implements TraverseSegments.

◆ onTrack()

void ReadSegments::onTrack ( Track track,
segment segments 
)
virtual

Saves tracking information to the corresponding Track explicitly.

Parameters
trackThe track for which all tracking information is explicitly saved (including segments)
segmentsThe segments associated with the Track

Implements TraverseSegments.

◆ setInputFile()

void ReadSegments::setInputFile ( FILE *  input)

Sets the input file to read in tracking information.

Parameters
inputthe tracking file

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