java.lang.Object
simpa.core.api.FileNamingConventions
Class that contains the file naming conventions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
addFieldMapExtension
(String name, int maxDegree) Generates the correct filename for a binary fieldmap file.addFieldMapExtension
(Map<String, Double> map, int lmax) Adds the underscore character plus the lmax (maximum degree of spherical harmonics expansion ) and the binary field map extension to each keys in the map.static String
getBeamLossFileName
(String beamName) Gets the file name for a file containing the lost particles of a beam.static String
getBeamTrajectoryFileName
(String beamName) Gets the file name for a file containing the trajectory coordinates of a beam in the global Cartesian system according to the conventions from the name of the particle.static String
Generates the correct extension for a check file.static String
Generates the correct extension for a checkpoints file.static String
Generates the correct extension for a field at checkpoints file.static String
Generates the correct extension for a field file.static String
Generates the correct filename for a statistic file about the distrifution of maximum degrees in a field map.static String
getPathFileName
(String name) Generates the correct filename for a path file.static String
getPhaseSpaceFileName
(String particleName, double loniPos, NumberFormat nFormat) Gets the file mane of the phase space file according to the parameters and the convention.static String
Generates the correct extension for a point file.static String
Generates the correct extension for a solution file.static String
getTLBeamPhaseSpaceFileName
(String beamName, double longiPos) Gets the file name for phase space data of a beam tracked in a transfer line.static String
getTrajectoryFileName
(String particleName) Gets the file name for a file containing the trajectory coordinates in the global Cartesian system according to the conventions from the name of the particle.
-
Field Details
-
TEXT_FILE_EXTENSION
- See Also:
-
OPERA_FILE_EXTENSION
- See Also:
-
BIN_FILE_EXTENSION
- See Also:
-
FIELDMAP_STAT_FILE_EXTENSION
- See Also:
-
CHECK_FILE_EXTENSION
- See Also:
-
SOLUTION_FILE_EXTENSION
- See Also:
-
POINTS_FILE_EXTENSION
- See Also:
-
FIELD_FILE_EXTENSION
- See Also:
-
FIELD_AT_CHECK_FILE_EXTENSION
- See Also:
-
CHECK_POINT_FILE_EXTENSION
- See Also:
-
PHASE_SPACE_FILE_EXTENSION
- See Also:
-
TRAJECTORY_FILE_EXTENSION
- See Also:
-
BEAM_TRAJECTORY_FILE_EXTENSION
- See Also:
-
TL_BEAM_PHASE_SPACE_FILE_EXTENSION
- See Also:
-
BEAMLOSS_FILE_EXTENSION
- See Also:
-
SINGLE_ROW_COVER_FILE_EXTENSION
- See Also:
-
HCP_COVER_FILE_EXTENSION
- See Also:
-
-
Constructor Details
-
FileNamingConventions
public FileNamingConventions()
-
-
Method Details
-
getBeamLossFileName
Gets the file name for a file containing the lost particles of a beam.- Parameters:
beamName
- The name of the beam.- Returns:
- The filename
-
getTLBeamPhaseSpaceFileName
Gets the file name for phase space data of a beam tracked in a transfer line. This contains phase space data of all particles in the beam at the position of aTLPhaseSpaceObserver
which wrote it.- Parameters:
beamName
- The name of the beam.longiPos
- The longitudinal position of the phase space observer.- Returns:
- The filename
-
getPhaseSpaceFileName
public static String getPhaseSpaceFileName(String particleName, double loniPos, NumberFormat nFormat) Gets the file mane of the phase space file according to the parameters and the convention.- Parameters:
particleName
- The particle name.loniPos
- The longitudinal position of the phase space observer.nFormat
- Number format set set the number of fractional digits.- Returns:
- The filename
-
getTrajectoryFileName
Gets the file name for a file containing the trajectory coordinates in the global Cartesian system according to the conventions from the name of the particle.- Parameters:
particleName
- The name of the particle to be tracked.- Returns:
- Trajectory file name
-
getBeamTrajectoryFileName
Gets the file name for a file containing the trajectory coordinates of a beam in the global Cartesian system according to the conventions from the name of the particle.- Parameters:
beamName
- The name of the beam.- Returns:
- Trajectory file name for the beam
-
getFieldMapStatisticsFileName
Generates the correct filename for a statistic file about the distrifution of maximum degrees in a field map.- Parameters:
name
- filename.- Returns:
- The correct name for the statistics file.
-
getPathFileName
Generates the correct filename for a path file.- Parameters:
name
- name for the file.- Returns:
- The correct name for the path file.
-
getPointsFileExtension
Generates the correct extension for a point file.- Parameters:
off
- The output file format.- Returns:
- the correct extension for the points file.
-
getCheckPointsFileExtension
Generates the correct extension for a checkpoints file.- Returns:
- the correct extension for a checkpoints file.
-
getFieldFileExtension
Generates the correct extension for a field file.- Returns:
- the correct extension for a field file.
-
getCheckFileExtension
Generates the correct extension for a check file.- Returns:
- the correct extension for a check file.
-
getFieldAtCheckFileExtension
Generates the correct extension for a field at checkpoints file.- Returns:
- the correct extension for a field at checkpoints file.
-
getSolutionFileExtension
Generates the correct extension for a solution file.- Returns:
- the correct extension for a solution file.
-
addFieldMapExtension
Generates the correct filename for a binary fieldmap file.- Parameters:
name
- filename.maxDegree
- max degree that will be appended to the filename.- Returns:
- The correct name for the binary file.
-
addFieldMapExtension
Adds the underscore character plus the lmax (maximum degree of spherical harmonics expansion ) and the binary field map extension to each keys in the map. These should be the element names.- Parameters:
map
- Map with element names as keyslmax
- maximum degree of the SH expansion used for producing the binary file.- Returns:
- A new map with element names+lmax +binary extension as keys. The values are the same objects.
-