phaser-server  0.0.4
jobSet.h
Go to the documentation of this file.
1 #ifndef PLAN_SET_H
2 #define PLAN_SET_H
8 #include <string>
9 #include <fstream>
10 class PhaseJob;
11 class ResultsDb;
12 
17 class JobSet
18 { public:
19  JobSet(void);
20  ~JobSet(void);
21  void StartJob(PhaseJob *);
22  void RemoveJob(const char *);
23  PhaseJob * SetPaused(bool);
24  void SetMessage(const char *, bool = false);
25  bool IsExecuting(void) const;
26  void DbFault(const char *);
27 
28  public:
30  PhaseJob * GetJob(void) { return m_job; }
32  ResultsDb * GetDb(void) { return m_db; }
34  const std::string & GetMessage(void) const { return m_message; }
36  bool IsAlert(void) const { return m_alert; }
38  std::ofstream & GetLog(void) { return m_log; }
39 
40  private:
41  void DestroyJob(void);
42  void CreateBB(bool);
43  void DeleteBB(void);
44 
45  private:
46  PhaseJob *m_job;
47  int m_bbid;
48  ResultsDb *m_db;
49  std::string m_message;
50  bool m_alert;
51  std::ofstream m_log;
52 };
53 
54 #endif
Manage objects related the RF cavity phasing job.
Definition: jobSet.h:18
ResultsDb * GetDb(void)
Access the database interface object.
Definition: jobSet.h:32
void RemoveJob(const char *)
Remove any outstanding job.
Definition: jobSet.cpp:164
~JobSet(void)
Destroy an instance.
Definition: jobSet.cpp:36
bool IsAlert(void) const
Is the job status in alert?
Definition: jobSet.h:36
void StartJob(PhaseJob *)
Start a new RF phasing job.
Definition: jobSet.cpp:100
bool IsExecuting(void) const
Is there an executing cavity phasing job?
Definition: jobSet.cpp:189
PhaseJob * GetJob(void)
Access the phasing job object.
Definition: jobSet.h:30
std::ofstream & GetLog(void)
Access the raw data log.
Definition: jobSet.h:38
void DbFault(const char *)
The results database is unavailable.
Definition: jobSet.cpp:148
const std::string & GetMessage(void) const
Access the job's status message.
Definition: jobSet.h:34
JobSet(void)
Construct an instance.
Definition: jobSet.cpp:28
void SetMessage(const char *, bool=false)
Set the client job status message.
Definition: jobSet.cpp:177
PhaseJob * SetPaused(bool)
Pause or resume the job phasing.
Definition: jobSet.cpp:132
A job for processing RF cavities.
Definition: phaseJob.h:17
Log phasing job results to a database.
Definition: resultsDb.h:16