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.
async_system_blast_tool.hpp
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2016 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
26 #ifndef SERVER_SRC_SERVICES_BLAST_INCLUDE_ASYNC_SYSTEM_BLAST_TOOL_HPP_
27 #define SERVER_SRC_SERVICES_BLAST_INCLUDE_ASYNC_SYSTEM_BLAST_TOOL_HPP_
28 
29 
30 #include "system_blast_tool.hpp"
31 #include "count_async_task.h"
32 #include "system_async_task.h"
33 
40 {
41 public:
52  AsyncSystemBlastTool (BlastServiceJob *service_job_p, const char *name_s, const char *factory_s, const BlastServiceData *data_p, const char *blast_program_name_s);
53 
54 
55 
64  AsyncSystemBlastTool (BlastServiceJob *job_p, const BlastServiceData *data_p, const json_t *json_p);
65 
69  virtual ~AsyncSystemBlastTool ();
70 
81  virtual bool AddToJSON (json_t *root_p);
82 
89  virtual OperationStatus Run ();
90 
91 
95  virtual bool PreRun ();
96 
97 
106  virtual OperationStatus GetStatus (bool update_flag = true);
107 
108 
118  virtual char *GetResults (BlastFormatter *formatter_p);
119 
120 
121 private:
122  static const char * const ASBT_ASYNC_S;
123  static const char * const ASBT_LOGFILE_S;
124 
125  char *asbt_async_logfile_s;
126  SystemAsyncTask *asbt_task_p;
127 };
128 
129 
130 #endif /* SERVER_SRC_SERVICES_BLAST_INCLUDE_ASYNC_SYSTEM_BLAST_TOOL_HPP_ */
BlastServiceJob
This datatype stores the ServiceJob and its associated BlastTool.
Definition: blast_service_job.h:66
SystemBlastTool
A class that will run Blast as a system process.
Definition: system_blast_tool.hpp:39
ExternalBlastTool::AddToJSON
virtual bool AddToJSON(json_t *root_p)
This method is used to serialise this ExternalBlastTool so that it can be recreated from another call...
BlastServiceData
The configuration data for the Blast Service.
Definition: blast_service.h:143
count_async_task.h
system_async_task.h
process.h
system_blast_tool.hpp
SystemBlastTool::GetStatus
virtual OperationStatus GetStatus(bool update_flag=true)
Get the status of a BlastTool.
BLAST_SERVICE_LOCAL
#define BLAST_SERVICE_LOCAL
Definition: blast_service_api.h:48
OperationStatus
OperationStatus
The current status of an Operation.
Definition: operation.h:96
ExternalBlastTool::GetResults
virtual char * GetResults(BlastFormatter *formatter_p)
Get the results after the ExternalBlastTool has finished running.
AsyncSystemBlastTool
A class that will run Blast as an asynchronous system process.
Definition: async_system_blast_tool.hpp:39
BlastTool::PreRun
virtual bool PreRun()
Any custom functionality required before running a BlastTool.
BlastFormatter
This class is for converting the output of a blast job between the available different formats.
Definition: blast_formatter.h:47
SystemBlastTool::Run
virtual OperationStatus Run()
Run this BlastTool.
SystemAsyncTask
A datatype to allow the running of command-line applications in a separate task.
Definition: system_async_task.h:44