Class StandardSolenoid

All Implemented Interfaces:
IMagField

public final class StandardSolenoid extends Solenoid
The Class Solenoid.
Version:
1.0
Author:
Sebouh Paul
  • Method Details

    • isActive

      public boolean isActive()
      Checks this field active.
      Overrides:
      isActive in class Solenoid
      Returns:
      true if this field is active;
    • fromBinaryFile

      public static StandardSolenoid fromBinaryFile(File file) throws FileNotFoundException
      Obtain a solenoid object from a binary file, probably "clas12_solenoid_fieldmap_binary.dat"
      Parameters:
      file - the file to read
      Returns:
      the solenoid object
      Throws:
      FileNotFoundException - the file not found exception
    • getName

      public String getName()
      Get the name of the field
      Specified by:
      getName in interface IMagField
      Overrides:
      getName in class Solenoid
      Returns:
      the name
    • toString

      public final String toString()
      Get some data as a string.
      Overrides:
      toString in class MagneticField
      Returns:
      a string representation.
    • printConfiguration

      public void printConfiguration(PrintStream ps)
      Print the current configuration
      Specified by:
      printConfiguration in interface IMagField
      Overrides:
      printConfiguration in class Solenoid
      Parameters:
      ps - the print stream
    • main

      public static void main(String[] arg)
      main method used for testing.
      Parameters:
      arg - command line arguments