ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcdcsMRGLIST.hpp
Go to the documentation of this file.
1
8#ifndef ngcdcsMRGLIST_H
9#define ngcdcsMRGLIST_H
10
11
12#ifndef __cplusplus
13#error This is a C++ include file and cannot be used from plain C
14#endif
15
17
23 char name[256];
24
26 char msg[256];
27
29 int status;
30
32 int mrgId;
33
35 char expId[64];
36
39
42
45 next = NULL;
46 prev = NULL;
47 name[0] = '\0';
48 msg[0] = '\0';
50 mrgId = -1;
51 expId[0] = '\0';
52 }
53
56 if (next != NULL) delete next;
57 }
58};
59
64public:
66 int size;
67
70
73
75 ngcdcsMRGLIST(const ngcdcsMRGLIST &other);
76
79
81 virtual ~ngcdcsMRGLIST();
82
84 ngcdcs_mfile_t *Add(const char *newName);
85
87 void Delete(ngcdcs_mfile_t *e);
88
90 void Clear();
91
94
97
99 ngcdcs_mfile_t *Get(int id);
100
102 ngcdcs_mfile_t *Get(const char *name);
103
105 int Backup(const char *fileName, char *erms = NULL);
106
108 int Export(const char *fileName, char *erms);
109
111 int Export();
112
114 void Statistics(int *pending, int *active, int *aborted, int *failure,
115 FILE *fd = NULL);
116
118 void Statistics(FILE *fd);
119
120protected:
121private:
123 ngcdcs_mfile_t *first_;
124
126 char backupFile_[256];
127};
128
129#endif
ngcdcs_mfile_t * GetNext()
Return next entry to be processed.
Definition ngcdcsMRGLIST.cpp:170
ngcdcsMRGLIST(const ngcdcsMRGLIST &other)
Copy constructor.
Definition ngcdcsMRGLIST.cpp:51
ngcdcs_mfile_t * Add(const char *newName)
Add entry to list.
Definition ngcdcsMRGLIST.cpp:90
ngcdcsMRGLIST & operator=(const ngcdcsMRGLIST &other)
Operator =.
Definition ngcdcsMRGLIST.cpp:27
int Export()
Export list to backup-file.
Definition ngcdcsMRGLIST.cpp:378
void Clear()
Clear list.
Definition ngcdcsMRGLIST.cpp:144
int size
Number of entries.
Definition ngcdcsMRGLIST.hpp:66
virtual ~ngcdcsMRGLIST()
Destructor.
Definition ngcdcsMRGLIST.cpp:82
void Delete(ngcdcs_mfile_t *e)
Remove entry from list.
Definition ngcdcsMRGLIST.cpp:112
ngcdcs_mfile_t * First()
Return first list entry.
Definition ngcdcsMRGLIST.cpp:162
ngcdcs_mfile_t * entry
Entry.
Definition ngcdcsMRGLIST.hpp:69
void Statistics(int *pending, int *active, int *aborted, int *failure, FILE *fd=NULL)
Get statistics.
Definition ngcdcsMRGLIST.cpp:386
int Backup(const char *fileName, char *erms=NULL)
Attach backup file.
Definition ngcdcsMRGLIST.cpp:226
ngcdcsMRGLIST()
Constructor.
Definition ngcdcsMRGLIST.cpp:71
ngcdcs_mfile_t * Get(int id)
Get entry by merger id.
Definition ngcdcsMRGLIST.cpp:189
#define ngcdcsMSTAT_IDLE
Definition ngcdcsMRGSHM.hpp:31
Definition ngcdcsMRGLIST.hpp:21
char msg[256]
Status message.
Definition ngcdcsMRGLIST.hpp:26
char name[256]
Entry name.
Definition ngcdcsMRGLIST.hpp:23
int mrgId
Merger id.
Definition ngcdcsMRGLIST.hpp:32
ngcdcs_mfile_t * prev
Previous entry.
Definition ngcdcsMRGLIST.hpp:41
char expId[64]
Exposure id.
Definition ngcdcsMRGLIST.hpp:35
~ngcdcs_mfile_t()
Destructor.
Definition ngcdcsMRGLIST.hpp:55
ngcdcs_mfile_t()
Constructor.
Definition ngcdcsMRGLIST.hpp:44
ngcdcs_mfile_t * next
Next entry.
Definition ngcdcsMRGLIST.hpp:38
int status
Merging status.
Definition ngcdcsMRGLIST.hpp:29