ngc 1.4.0
 
Loading...
Searching...
No Matches
ngcdcsMRGLIST.hpp
Go to the documentation of this file.
1
7#ifndef ngcdcsMRGLIST_H
8#define ngcdcsMRGLIST_H
9
10
11#ifndef __cplusplus
12#error This is a C++ include file and cannot be used from plain C
13#endif
14
16
22 char name[256];
23
25 char msg[256];
26
28 int status;
29
31 int mrgId;
32
34 char expId[64];
35
38
41
44 next = NULL;
45 prev = NULL;
46 name[0] = '\0';
47 msg[0] = '\0';
49 mrgId = -1;
50 expId[0] = '\0';
51 }
52
55 if (next != NULL) delete next;
56 }
57};
58
63public:
65 int size;
66
69
72
74 ngcdcsMRGLIST(const ngcdcsMRGLIST &other);
75
78
80 virtual ~ngcdcsMRGLIST();
81
83 ngcdcs_mfile_t *Add(const char *newName);
84
86 void Delete(ngcdcs_mfile_t *e);
87
89 void Clear();
90
93
96
98 ngcdcs_mfile_t *Get(int id);
99
101 ngcdcs_mfile_t *Get(const char *name);
102
104 int Backup(const char *fileName, char *erms = NULL);
105
107 int Export(const char *fileName, char *erms);
108
110 int Export();
111
113 void Statistics(int *pending, int *active, int *aborted, int *failure,
114 FILE *fd = NULL);
115
117 void Statistics(FILE *fd);
118
119protected:
120private:
122 ngcdcs_mfile_t *first_;
123
125 char backupFile_[256];
126};
127
128#endif
ngcdcs_mfile_t * GetNext()
Return next entry to be processed.
Definition ngcdcsMRGLIST.cpp:169
ngcdcsMRGLIST(const ngcdcsMRGLIST &other)
Copy constructor.
Definition ngcdcsMRGLIST.cpp:50
ngcdcs_mfile_t * Add(const char *newName)
Add entry to list.
Definition ngcdcsMRGLIST.cpp:89
ngcdcsMRGLIST & operator=(const ngcdcsMRGLIST &other)
Operator =.
Definition ngcdcsMRGLIST.cpp:26
int Export()
Export list to backup-file.
Definition ngcdcsMRGLIST.cpp:377
void Clear()
Clear list.
Definition ngcdcsMRGLIST.cpp:143
int size
Number of entries.
Definition ngcdcsMRGLIST.hpp:65
virtual ~ngcdcsMRGLIST()
Destructor.
Definition ngcdcsMRGLIST.cpp:81
void Delete(ngcdcs_mfile_t *e)
Remove entry from list.
Definition ngcdcsMRGLIST.cpp:111
ngcdcs_mfile_t * First()
Return first list entry.
Definition ngcdcsMRGLIST.cpp:161
ngcdcs_mfile_t * entry
Entry.
Definition ngcdcsMRGLIST.hpp:68
void Statistics(int *pending, int *active, int *aborted, int *failure, FILE *fd=NULL)
Get statistics.
Definition ngcdcsMRGLIST.cpp:385
int Backup(const char *fileName, char *erms=NULL)
Attach backup file.
Definition ngcdcsMRGLIST.cpp:225
ngcdcsMRGLIST()
Constructor.
Definition ngcdcsMRGLIST.cpp:70
ngcdcs_mfile_t * Get(int id)
Get entry by merger id.
Definition ngcdcsMRGLIST.cpp:188
#define ngcdcsMSTAT_IDLE
Definition ngcdcsMRGSHM.hpp:30
Definition ngcdcsMRGLIST.hpp:20
char msg[256]
Status message.
Definition ngcdcsMRGLIST.hpp:25
char name[256]
Entry name.
Definition ngcdcsMRGLIST.hpp:22
int mrgId
Merger id.
Definition ngcdcsMRGLIST.hpp:31
ngcdcs_mfile_t * prev
Previous entry.
Definition ngcdcsMRGLIST.hpp:40
char expId[64]
Exposure id.
Definition ngcdcsMRGLIST.hpp:34
~ngcdcs_mfile_t()
Destructor.
Definition ngcdcsMRGLIST.hpp:54
ngcdcs_mfile_t()
Constructor.
Definition ngcdcsMRGLIST.hpp:43
ngcdcs_mfile_t * next
Next entry.
Definition ngcdcsMRGLIST.hpp:37
int status
Merging status.
Definition ngcdcsMRGLIST.hpp:28