Read in the fragmentation_rules file.
#include "msparser.hpp"
#include <iostream>
using namespace matrix_science;
int main(int argc, char * argv[])
{
if ( argc < 2 )
{
std::cout << "The location of fragmentation_rules file has to be specified as a parameter" << std::endl;
std::cout << "The location should either be the full path to the fragmentation_rules file" << std::endl;
std::cout << "or a URL to a Mascot server - e.g. http://mascot-server/mascot/cgi" << std::endl;
return 1;
}
if (argc > 2)
{
}
{
std::cout << "There are errors. Cannot continue. The last error description:" << std::endl;
return 1;
}
std::cout << n << " instruments are configured:" << std::endl;
int i;
for(i=0; i < n; i++)
{
}
if (strncmp("http:", argv[1], 5) != 0) {
std::string filename = argv[1];
filename += ".new";
}
return 0;
}
Settings required to make an HTTP connection to a Mascot server.
Definition: ms_connection_settings.hpp:54
void setSessionID(const std::string sessionID)
Sets the Mascot security sessionID to be used for the connection.
Definition: ms_connection_settings.cpp:242
std::string getLastErrorString() const
Return the error description of the last error that occurred.
Definition: ms_errors.cpp:1488
bool isValid() const
Call this function to determine if there have been any errors.
Definition: ms_errors.cpp:1472
This class encapsulates a single entry (an instrument) from a fragmentation_rules file.
Definition: ms_fragmentationrules.hpp:56
void setSeriesUsed(const int series, const bool val)
Sets availability on a given series.
Definition: ms_fragmentationrules.cpp:343
This class encapsulates a complete fragmentation_rules file.
Definition: ms_fragmentationrules.hpp:209
const ms_fragmentationrules * getInstrumentByName(const char *name) const
Returns a configuration for an instrument by name.
Definition: ms_fragmentationrules.cpp:1313
bool updateInstrumentByName(const char *name, const ms_fragmentationrules item)
Update the information for a specific instrument.
Definition: ms_fragmentationrules.cpp:1369
void save_file()
Stores instrument definitions in a file.
Definition: ms_fragmentationrules.cpp:1245
void setFileName(const char *filename)
Use this member to set a non-default file name.
Definition: ms_fragmentationrules.cpp:959
bool deleteInstrumentByName(const char *name)
Remove an instrument from the list in memory.
Definition: ms_fragmentationrules.cpp:1432
std::string getInstrumentName(const int instrumentNum) const
Returns an instrument name by its number from 0 to (getNumberOfInstruments()-1).
Definition: ms_fragmentationrules.cpp:1297
int getNumberOfInstruments() const
Returns a number of instruments configured.
Definition: ms_fragmentationrules.cpp:997