#include <ngcdcsMERGE.hpp>
Public Member Functions | |
| ngcdcsMERGE () | |
| Constructor. | |
| ngcdcsMERGE (void(*signalHandler)(int)) | |
| Constructor with signal handler. | |
| virtual | ~ngcdcsMERGE () |
| Destructor. | |
| int | Initialized () |
| Return intitialization flag. | |
| int | BigEndian () |
| Endianess. | |
| void | Id (int val) |
| Set merger id. | |
| int | Id () |
| Return merger id. | |
| char * | ErrMsg () |
| Error message. | |
| int | Run (int argc, char **argv) |
| A data file merger main function. | |
| void | ExitSignal (int sig) |
| Exit signal handler. | |
| int | Check (const char *name) |
| Check item to be processed. | |
| int | Process (const char *name, int process=1) |
| Process item (list file, header file or FITS-extension file) | |
| int | ProcessList (FILE *fd, const char *item=NULL) |
| Process open list file. | |
| int | ProcessList (const char *fileName, const char *item=NULL) |
| Process list file. | |
| int | DeleteList (const char *fileName) |
| Delete list file and the data sources specified therein. | |
| int | DeleteList (FILE *fd) |
| Delete data sources in open list file. | |
| int | ProcessHdr (const char *fileName) |
| Process header file. | |
| int | ProcessFits (const char *source, const char *target=NULL) |
| Process FITS-extension file. | |
| int | DeleteFits (const char *source) |
| Delete FITS source file and the data sources specified therein. | |
| int | VerifyList (const char *fileName) |
| Verify list file to be processed. | |
| int | VerifyHdr (const char *fileName) |
| Verify FITS-header file to be processed. | |
| int | VerifyFits (const char *source, const char *target=NULL) |
| Verify FITS-extension file to be processed. | |
| double | Size () |
| Return the verification size (bytes) | |
| int | NotificationStream (FILE *stream, int level=1) |
| Attach stream to notification list. | |
| void | NotifySize (double size) |
| Communicate the expected size. | |
| int | Aborted () |
| Return aborted-flag. | |
| const char * | Stat2Str (int stat) |
| Convert status to string. | |
| void | AttachDisplay () |
| Attach status display. | |
| void | WaitForDisplay () |
| Wait for status display termination. | |
| void | Status (int stat) |
| Status update event. | |
| void | Completed (int stat, const char *msg=NULL) |
| Completion event. | |
Public Attributes | |
| int | cleanup |
| Flag to just perform a cleanup (delete the source files) | |
| int | verify |
| Flag to initiate a verification run before processing. | |
| int | invalidate |
| Flag to invalidate the source after successful merging. | |
| unsigned int | chunkSize |
| Chunk size (bytes) | |
| int | parStream |
| Parallel streaming. | |
| int | largeFile |
| Flag to enable/disable large file extension. | |
| char | targetName [512] |
| Requested targetName. | |
| char | listItem [512] |
| Requested list item name. | |
| int | verboseLevel |
| Verbose level. | |
| int | logLevel |
| Logging level. | |
Protected Member Functions | |
| void | Initialized (int flag) |
| Set initialization flag. | |
| virtual int | Args (int argc, char **argv) |
| Command line argument parser call-back. | |
| virtual FILE * | Usage () |
| Print-Usage call-back returning an apropriate error stream. | |
| virtual int | InitCB () |
| Initialization call-back. | |
| virtual void | StatusCB (int stat) |
| Status update event call-back. | |
| virtual void | CompletedCB (int stat, const char *msg=NULL) |
| Completion event call-back. | |
| virtual void | Notify (double size) |
| Transfer-progress notification call-back. | |
| virtual void | FileEvent (const char *id, const char *fileName) |
| File event call-back. | |
| virtual void | NotifySizeCB (double size) |
| Call-back to communicate the expected size. | |
| virtual int | CheckPoint () |
| Check-point call-back for abort. | |
| virtual void | Verbose (int level, const char *format,...) __attribute__((format(printf |
| virtual void virtual void | Verbose (const char *format,...) __attribute__((format(printf |
| Verbose message. | |
| virtual void virtual void virtual void | Log (int level, const char *format,...) __attribute__((format(printf |
| Log message if logging level exceeds level. | |
| virtual void virtual void virtual void virtual void | Log (const char *format,...) __attribute__((format(printf |
| Log message. | |
File merger class
| ngcdcsMERGE::ngcdcsMERGE | ( | ) |
Constructor.
|
explicit |
Constructor with signal handler.
|
virtual |
Destructor.
|
inline |
Return aborted-flag.
|
protectedvirtual |
Command line argument parser call-back.
| void ngcdcsMERGE::AttachDisplay | ( | ) |
Attach status display.
| int ngcdcsMERGE::BigEndian | ( | ) |
Endianess.
| int ngcdcsMERGE::Check | ( | const char * | name | ) |
Check item to be processed.
|
protectedvirtual |
Check-point call-back for abort.
| void ngcdcsMERGE::Completed | ( | int | stat, |
| const char * | msg = NULL ) |
Completion event.
|
protectedvirtual |
Completion event call-back.
| int ngcdcsMERGE::DeleteFits | ( | const char * | source | ) |
Delete FITS source file and the data sources specified therein.
| int ngcdcsMERGE::DeleteList | ( | const char * | fileName | ) |
Delete list file and the data sources specified therein.
| int ngcdcsMERGE::DeleteList | ( | FILE * | fd | ) |
Delete data sources in open list file.
|
inline |
Error message.
| void ngcdcsMERGE::ExitSignal | ( | int | sig | ) |
Exit signal handler.
|
protectedvirtual |
File event call-back.
|
inline |
Return merger id.
|
inline |
Set merger id.
|
protectedvirtual |
Initialization call-back.
|
inline |
Return intitialization flag.
|
inlineprotected |
Set initialization flag.
|
protectedvirtual |
Log message.
|
protectedvirtual |
Log message if logging level exceeds level.
| int ngcdcsMERGE::NotificationStream | ( | FILE * | stream, |
| int | level = 1 ) |
Attach stream to notification list.
|
protectedvirtual |
Transfer-progress notification call-back.
| void ngcdcsMERGE::NotifySize | ( | double | size | ) |
Communicate the expected size.
|
protectedvirtual |
Call-back to communicate the expected size.
| int ngcdcsMERGE::Process | ( | const char * | name, |
| int | process = 1 ) |
Process item (list file, header file or FITS-extension file)
| int ngcdcsMERGE::ProcessFits | ( | const char * | source, |
| const char * | target = NULL ) |
Process FITS-extension file.
| int ngcdcsMERGE::ProcessHdr | ( | const char * | fileName | ) |
Process header file.
| int ngcdcsMERGE::ProcessList | ( | const char * | fileName, |
| const char * | item = NULL ) |
Process list file.
| int ngcdcsMERGE::ProcessList | ( | FILE * | fd, |
| const char * | item = NULL ) |
Process open list file.
| int ngcdcsMERGE::Run | ( | int | argc, |
| char ** | argv ) |
A data file merger main function.
|
inline |
Return the verification size (bytes)
| const char * ngcdcsMERGE::Stat2Str | ( | int | stat | ) |
Convert status to string.
| void ngcdcsMERGE::Status | ( | int | stat | ) |
Status update event.
|
protectedvirtual |
Status update event call-back.
|
protectedvirtual |
Print-Usage call-back returning an apropriate error stream.
|
protectedvirtual |
Verbose message.
|
protectedvirtual |
| int ngcdcsMERGE::VerifyFits | ( | const char * | source, |
| const char * | target = NULL ) |
Verify FITS-extension file to be processed.
| int ngcdcsMERGE::VerifyHdr | ( | const char * | fileName | ) |
Verify FITS-header file to be processed.
| int ngcdcsMERGE::VerifyList | ( | const char * | fileName | ) |
Verify list file to be processed.
| void ngcdcsMERGE::WaitForDisplay | ( | ) |
Wait for status display termination.
| unsigned int ngcdcsMERGE::chunkSize |
Chunk size (bytes)
| int ngcdcsMERGE::cleanup |
Flag to just perform a cleanup (delete the source files)
| int ngcdcsMERGE::invalidate |
Flag to invalidate the source after successful merging.
| int ngcdcsMERGE::largeFile |
Flag to enable/disable large file extension.
| char ngcdcsMERGE::listItem[512] |
Requested list item name.
| int ngcdcsMERGE::logLevel |
Logging level.
| int ngcdcsMERGE::parStream |
Parallel streaming.
| char ngcdcsMERGE::targetName[512] |
Requested targetName.
| int ngcdcsMERGE::verboseLevel |
Verbose level.
| int ngcdcsMERGE::verify |
Flag to initiate a verification run before processing.