stella.ccd
Class FitsNameGenerator

java.lang.Object
  extended by stella.ccd.FitsNameGenerator

public class FitsNameGenerator
extends Object

A class that generates unique fits-file names. The name is constructed in the following way:


Field Summary
private static String ABORT
          The extension to the name marking an aborted integration.
private static int count
          The running number.
private static char DATECOUNTSEPARATOR
          The separator char between the date and the running number.
private static DateFormat DATEFORMAT
          The date formatter.
private static String EXTENSION
          The fits file extension.
private static String lastdate
          The last date used.
private static NumberFormat NUMBERFORMAT
          The running number formatter.
private static String REGULAR
          The extension to the name marking a regular integration.
private static String SN
          The extension to the name marking an aborted integration.
 
Constructor Summary
FitsNameGenerator()
           
 
Method Summary
static File getAbortFits(String name)
          Returns a file name formatted according to an aborted integration.
static File getDefaultFits(String name)
          Returns a file name formatted according to a standard integration.
private static File getFits(String name, String how, boolean advance)
          Returns a formated fits file.
static File getSNFits(String name)
          Returns a file name formatted according to an integration ended due to S/N reached.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ABORT

private static final String ABORT
The extension to the name marking an aborted integration.

See Also:
Constant Field Values

SN

private static final String SN
The extension to the name marking an aborted integration.

See Also:
Constant Field Values

REGULAR

private static final String REGULAR
The extension to the name marking a regular integration.

See Also:
Constant Field Values

DATEFORMAT

private static final DateFormat DATEFORMAT
The date formatter.


NUMBERFORMAT

private static final NumberFormat NUMBERFORMAT
The running number formatter.


DATECOUNTSEPARATOR

private static final char DATECOUNTSEPARATOR
The separator char between the date and the running number.

See Also:
Constant Field Values

EXTENSION

private static final String EXTENSION
The fits file extension.

See Also:
Constant Field Values

lastdate

private static String lastdate
The last date used.


count

private static int count
The running number.

Constructor Detail

FitsNameGenerator

public FitsNameGenerator()
Method Detail

getAbortFits

public static final File getAbortFits(String name)
Returns a file name formatted according to an aborted integration. Called during an exposure abort, therefore no counter advance is forseen.


getDefaultFits

public static final File getDefaultFits(String name)
Returns a file name formatted according to a standard integration.


getSNFits

public static final File getSNFits(String name)
Returns a file name formatted according to an integration ended due to S/N reached. Called during an exposure abort, therefore no counter advance is forseen.


getFits

private static final File getFits(String name,
                                  String how,
                                  boolean advance)
Returns a formated fits file.