Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
The base class for the object that will actually run the Polymarker application. More...
#include <polymarker_tool.hpp>
Public Member Functions | |
PolymarkerTool (PolymarkerServiceJob *job_p, const PolymarkerSequence *seq_p, const PolymarkerServiceData *data_p) | |
PolymarkerTool (PolymarkerServiceJob *job_p, const PolymarkerSequence *seq_p, const PolymarkerServiceData *data_p, const json_t *root_p) | |
virtual | ~PolymarkerTool () |
The PolymarkerTool destructor. More... | |
const char * | GetName () |
Get the name of this PolymarkerTool. More... | |
virtual bool | ParseParameters (const ParameterSet *const param_set_p)=0 |
Parse a ParameterSet to set the variables that the PolymarkerTool's ServiceJob will run with. More... | |
virtual bool | PreRun () |
The function that will be called before trying to run this PolymarkerTool. More... | |
virtual OperationStatus | Run ()=0 |
virtual bool | PostRun ()=0 |
The function that will be called after running this PolymarkerTool. More... | |
virtual OperationStatus | GetStatus (bool update_flag)=0 |
Get the OperationStatus for the ServiceJob that this PolymarkerTool is running. More... | |
virtual char * | GetLog ()=0 |
Get the log after the PolymarkerTool has finished running. More... | |
virtual char * | GetResults (PolymarkerFormatter *formatter_p)=0 |
Get the results from the run of this PolymarkerTool. More... | |
virtual bool | AddToJSON (json_t *root_p) |
Add the required information for this PolymarkerTool to be serialised to JSON and deserialised again. More... | |
virtual PolymarkerToolType | GetToolType () const =0 |
Get the PolymarkerToolType for this PolymarkerTool. More... | |
bool | AddSectionToResult (json_t *result_p, const char *const filename_s, const char *const key_s, PolymarkerFormatter *formatter_p) |
void | SetPolymarkerSequence (const PolymarkerSequence *seq_p) |
Set the PolymarkerSequence that this PolymarkerTool will run against. More... | |
bool | SaveJobMetadata () const |
bool | SetJobMetadata () |
bool | SetJobUUID (const uuid_t id) |
void | FreePolymarkerTool (PolymarkerTool *tool_p) |
Free a given PolymarkerTool. More... | |
OperationStatus | RunPolymarkerTool (PolymarkerTool *tool_p) |
Run a given PolymarkerTool. More... | |
Protected Attributes | |
PolymarkerServiceJob * | pt_service_job_p |
The PolymarkerServiceJob that this PolymarkerTool will run. More... | |
const PolymarkerSequence * | pt_seq_p |
The PolymarkerSequence that this PolymarkerTool's ServiceJob will be running against. More... | |
const PolymarkerServiceData * | pt_service_data_p |
The PolymarkerServiceData for the PolymarkerService that will be running this PolymarkerTool. More... | |
char * | pt_job_dir_s |
The local directory where the results and logging data will be stored. More... | |
Static Protected Attributes | |
static const char *const | PT_JOB_DIR_S |
The key used for specifying the PolymarkerTool's job directory within and JSON-based serialisations of a PolymarkerTool. More... | |
The base class for the object that will actually run the Polymarker application.
PolymarkerTool | ( | PolymarkerServiceJob * | job_p, |
const PolymarkerSequence * | seq_p, | ||
const PolymarkerServiceData * | data_p | ||
) |
PolymarkerTool | ( | PolymarkerServiceJob * | job_p, |
const PolymarkerSequence * | seq_p, | ||
const PolymarkerServiceData * | data_p, | ||
const json_t * | root_p | ||
) |
|
virtual |
The PolymarkerTool destructor.
const char* GetName | ( | ) |
Get the name of this PolymarkerTool.
|
pure virtual |
Parse a ParameterSet to set the variables that the PolymarkerTool's ServiceJob will run with.
param_set_p | The ParameterSet that the variables will be set from. |
true
if the required variables were collected successfully, false
otherwise Implemented in AsyncSystemPolymarkerTool.
|
virtual |
The function that will be called before trying to run this PolymarkerTool.
true
if the call was successful, false
otherwise Reimplemented in AsyncSystemPolymarkerTool.
|
pure virtual |
Implemented in AsyncSystemPolymarkerTool.
|
pure virtual |
The function that will be called after running this PolymarkerTool.
true
if the call was successful, false
otherwise Implemented in AsyncSystemPolymarkerTool.
|
pure virtual |
Get the OperationStatus for the ServiceJob that this PolymarkerTool is running.
update_flag | If this is true , then the ServiceJob will be checked for its latest status. If this is false , then the last cached value will be used. |
Implemented in AsyncSystemPolymarkerTool.
|
pure virtual |
Get the log after the PolymarkerTool has finished running.
Implemented in AsyncSystemPolymarkerTool.
|
pure virtual |
Get the results from the run of this PolymarkerTool.
formatter_p | The PolymarkerFormatter used to |
Implemented in AsyncSystemPolymarkerTool.
|
virtual |
Add the required information for this PolymarkerTool to be serialised to JSON and deserialised again.
This is called by each child class of PolymarkerTool all the way down to the actual PolymarkerTool child object that is being used.
root_p | The JSON fragment that the required details will be added to |
true
if the information was added successfully, false
otherwise Reimplemented in AsyncSystemPolymarkerTool.
|
pure virtual |
Get the PolymarkerToolType for this PolymarkerTool.
Implemented in AsyncSystemPolymarkerTool.
bool AddSectionToResult | ( | json_t * | result_p, |
const char *const | filename_s, | ||
const char *const | key_s, | ||
PolymarkerFormatter * | formatter_p | ||
) |
void SetPolymarkerSequence | ( | const PolymarkerSequence * | seq_p | ) |
Set the PolymarkerSequence that this PolymarkerTool will run against.
seq_p | The PolymarkerSequence to use. |
bool SaveJobMetadata | ( | ) | const |
bool SetJobMetadata | ( | ) |
bool SetJobUUID | ( | const uuid_t | id | ) |
void FreePolymarkerTool | ( | PolymarkerTool * | tool_p | ) |
Free a given PolymarkerTool.
This is simply a C-wrapper function around the PolymarkerTool destructor.
tool_p | The PolymarkerTool to free |
OperationStatus RunPolymarkerTool | ( | PolymarkerTool * | tool_p | ) |
Run a given PolymarkerTool.
This is simply a C-wrapper function around the PolymarkerTool::run() function.
tool_p | The PolymarkerTool to run. |
|
protected |
The PolymarkerServiceJob that this PolymarkerTool will run.
|
protected |
The PolymarkerSequence that this PolymarkerTool's ServiceJob will be running against.
|
protected |
The PolymarkerServiceData for the PolymarkerService that will be running this PolymarkerTool.
|
protected |
The local directory where the results and logging data will be stored.
|
staticprotected |
The key used for specifying the PolymarkerTool's job directory within and JSON-based serialisations of a PolymarkerTool.