ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcdcsMERGE Class Reference

#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.
 

Detailed Description

File merger class

Constructor & Destructor Documentation

◆ ngcdcsMERGE() [1/2]

ngcdcsMERGE::ngcdcsMERGE ( )

Constructor.

◆ ngcdcsMERGE() [2/2]

ngcdcsMERGE::ngcdcsMERGE ( void(* signalHandler )(int))
explicit

Constructor with signal handler.

◆ ~ngcdcsMERGE()

ngcdcsMERGE::~ngcdcsMERGE ( )
virtual

Destructor.

Member Function Documentation

◆ Aborted()

int ngcdcsMERGE::Aborted ( )
inline

Return aborted-flag.

◆ Args()

int ngcdcsMERGE::Args ( int argc,
char ** argv )
protectedvirtual

Command line argument parser call-back.

◆ AttachDisplay()

void ngcdcsMERGE::AttachDisplay ( )

Attach status display.

◆ BigEndian()

int ngcdcsMERGE::BigEndian ( )

Endianess.

◆ Check()

int ngcdcsMERGE::Check ( const char * name)

Check item to be processed.

◆ CheckPoint()

int ngcdcsMERGE::CheckPoint ( )
protectedvirtual

Check-point call-back for abort.

◆ Completed()

void ngcdcsMERGE::Completed ( int stat,
const char * msg = NULL )

Completion event.

◆ CompletedCB()

void ngcdcsMERGE::CompletedCB ( int stat,
const char * msg = NULL )
protectedvirtual

Completion event call-back.

◆ DeleteFits()

int ngcdcsMERGE::DeleteFits ( const char * source)

Delete FITS source file and the data sources specified therein.

◆ DeleteList() [1/2]

int ngcdcsMERGE::DeleteList ( const char * fileName)

Delete list file and the data sources specified therein.

◆ DeleteList() [2/2]

int ngcdcsMERGE::DeleteList ( FILE * fd)

Delete data sources in open list file.

◆ ErrMsg()

char * ngcdcsMERGE::ErrMsg ( )
inline

Error message.

◆ ExitSignal()

void ngcdcsMERGE::ExitSignal ( int sig)

Exit signal handler.

◆ FileEvent()

void ngcdcsMERGE::FileEvent ( const char * id,
const char * fileName )
protectedvirtual

File event call-back.

◆ Id() [1/2]

int ngcdcsMERGE::Id ( )
inline

Return merger id.

◆ Id() [2/2]

void ngcdcsMERGE::Id ( int val)
inline

Set merger id.

◆ InitCB()

int ngcdcsMERGE::InitCB ( )
protectedvirtual

Initialization call-back.

◆ Initialized() [1/2]

int ngcdcsMERGE::Initialized ( )
inline

Return intitialization flag.

◆ Initialized() [2/2]

void ngcdcsMERGE::Initialized ( int flag)
inlineprotected

Set initialization flag.

◆ Log() [1/2]

void ngcdcsMERGE::Log ( const char * format,
... )
protectedvirtual

Log message.

◆ Log() [2/2]

void ngcdcsMERGE::Log ( int level,
const char * format,
... )
protectedvirtual

Log message if logging level exceeds level.

◆ NotificationStream()

int ngcdcsMERGE::NotificationStream ( FILE * stream,
int level = 1 )

Attach stream to notification list.

◆ Notify()

void ngcdcsMERGE::Notify ( double size)
protectedvirtual

Transfer-progress notification call-back.

◆ NotifySize()

void ngcdcsMERGE::NotifySize ( double size)

Communicate the expected size.

◆ NotifySizeCB()

void ngcdcsMERGE::NotifySizeCB ( double size)
protectedvirtual

Call-back to communicate the expected size.

◆ Process()

int ngcdcsMERGE::Process ( const char * name,
int process = 1 )

Process item (list file, header file or FITS-extension file)

◆ ProcessFits()

int ngcdcsMERGE::ProcessFits ( const char * source,
const char * target = NULL )

Process FITS-extension file.

◆ ProcessHdr()

int ngcdcsMERGE::ProcessHdr ( const char * fileName)

Process header file.

◆ ProcessList() [1/2]

int ngcdcsMERGE::ProcessList ( const char * fileName,
const char * item = NULL )

Process list file.

◆ ProcessList() [2/2]

int ngcdcsMERGE::ProcessList ( FILE * fd,
const char * item = NULL )

Process open list file.

◆ Run()

int ngcdcsMERGE::Run ( int argc,
char ** argv )

A data file merger main function.

◆ Size()

double ngcdcsMERGE::Size ( )
inline

Return the verification size (bytes)

◆ Stat2Str()

const char * ngcdcsMERGE::Stat2Str ( int stat)

Convert status to string.

◆ Status()

void ngcdcsMERGE::Status ( int stat)

Status update event.

◆ StatusCB()

void ngcdcsMERGE::StatusCB ( int stat)
protectedvirtual

Status update event call-back.

◆ Usage()

FILE * ngcdcsMERGE::Usage ( )
protectedvirtual

Print-Usage call-back returning an apropriate error stream.

◆ Verbose() [1/2]

void ngcdcsMERGE::Verbose ( const char * format,
... )
protectedvirtual

Verbose message.

◆ Verbose() [2/2]

void ngcdcsMERGE::Verbose ( int level,
const char * format,
... )
protectedvirtual

◆ VerifyFits()

int ngcdcsMERGE::VerifyFits ( const char * source,
const char * target = NULL )

Verify FITS-extension file to be processed.

◆ VerifyHdr()

int ngcdcsMERGE::VerifyHdr ( const char * fileName)

Verify FITS-header file to be processed.

◆ VerifyList()

int ngcdcsMERGE::VerifyList ( const char * fileName)

Verify list file to be processed.

◆ WaitForDisplay()

void ngcdcsMERGE::WaitForDisplay ( )

Wait for status display termination.

Member Data Documentation

◆ chunkSize

unsigned int ngcdcsMERGE::chunkSize

Chunk size (bytes)

◆ cleanup

int ngcdcsMERGE::cleanup

Flag to just perform a cleanup (delete the source files)

◆ invalidate

int ngcdcsMERGE::invalidate

Flag to invalidate the source after successful merging.

◆ largeFile

int ngcdcsMERGE::largeFile

Flag to enable/disable large file extension.

◆ listItem

char ngcdcsMERGE::listItem[512]

Requested list item name.

◆ logLevel

int ngcdcsMERGE::logLevel

Logging level.

◆ parStream

int ngcdcsMERGE::parStream

Parallel streaming.

◆ targetName

char ngcdcsMERGE::targetName[512]

Requested targetName.

◆ verboseLevel

int ngcdcsMERGE::verboseLevel

Verbose level.

◆ verify

int ngcdcsMERGE::verify

Flag to initiate a verification run before processing.


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