30#include <boost/make_shared.hpp>
31#include <boost/timer/timer.hpp>
43 OREApp(QuantLib::ext::shared_ptr<Parameters> params,
bool console =
false,
44 const boost::filesystem::path& logRootPath = boost::filesystem::path())
48 OREApp(
const QuantLib::ext::shared_ptr<InputParameters>& inputs,
const std::string& logFile, Size logLevel = 31,
49 bool console =
false,
const boost::filesystem::path& logRootPath = boost::filesystem::path())
60 void run(
const std::vector<std::string>& marketData,
61 const std::vector<std::string>& fixingData);
67 const QuantLib::ext::shared_ptr<Analytic>&
getAnalytic(std::string type);
70 QuantLib::ext::shared_ptr<PlainInMemoryReport>
getReport(std::string reportName);
73 QuantLib::ext::shared_ptr<NPVCube>
getCube(std::string cubeName);
76 QuantLib::ext::shared_ptr<AggregationScenarioData>
getMarketCube(std::string cubeName);
90 const QuantLib::ext::shared_ptr<Parameters>& params);
91 QuantLib::ext::shared_ptr<CSVLoader>
buildCsvLoader(
const QuantLib::ext::shared_ptr<Parameters>& params);
93 void setupLog(
const std::string& path,
const std::string& file, QuantLib::Size mask,
94 const boost::filesystem::path& logRootPath,
const std::string& progressLogFile =
"",
95 QuantLib::Size progressLogRotationSize = 100 * 1024 * 1024,
bool progressLogToConsole =
false,
96 const std::string& structuredLogFile =
"", QuantLib::Size structuredLogRotationSize = 100 * 1024 * 1024);
104 QuantLib::ext::shared_ptr<Parameters>
params_;
105 QuantLib::ext::shared_ptr<InputParameters>
inputs_;
106 QuantLib::ext::shared_ptr<OutputParameters>
outputs_;
139 QuantLib::ext::shared_ptr<Parameters>
params_;
Orchestrates the processes covered by ORE, data loading, analytics and reporting.
QuantLib::ext::shared_ptr< AggregationScenarioData > getMarketCube(std::string cubeName)
QuantLib::Size structuredLogRotationSize_
void setupLog(const std::string &path, const std::string &file, QuantLib::Size mask, const boost::filesystem::path &logRootPath, const std::string &progressLogFile="", QuantLib::Size progressLogRotationSize=100 *1024 *1024, bool progressLogToConsole=false, const std::string &structuredLogFile="", QuantLib::Size structuredLogRotationSize=100 *1024 *1024)
set up logging
boost::timer::cpu_timer runTimer_
virtual void run()
Runs analytics and generates reports after using the first OREApp c'tor.
bool progressLogToConsole_
string structuredLogFile_
std::vector< std::string > getErrors()
virtual ~OREApp()
Destructor.
Real getRunTime()
time for executing run(...) in seconds
QuantLib::ext::shared_ptr< AnalyticsManager > analyticsManager_
QuantLib::ext::shared_ptr< PlainInMemoryReport > getReport(std::string reportName)
QuantLib::ext::shared_ptr< InputParameters > getInputs()
QuantLib::ext::shared_ptr< OutputParameters > outputs_
std::set< std::string > getMarketCubeNames()
std::vector< std::string > errorMessages_
const QuantLib::ext::shared_ptr< Analytic > & getAnalytic(std::string type)
QuantLib::Size progressLogRotationSize_
QuantLib::ext::shared_ptr< CSVLoader > buildCsvLoader(const QuantLib::ext::shared_ptr< Parameters > ¶ms)
QuantLib::ext::shared_ptr< Parameters > params_
ORE Input parameters.
boost::filesystem::path logRootPath_
std::set< std::string > getSupportedAnalyticTypes()
OREApp(const QuantLib::ext::shared_ptr< InputParameters > &inputs, const std::string &logFile, Size logLevel=31, bool console=false, const boost::filesystem::path &logRootPath=boost::filesystem::path())
Constructor that assumes we have already assembled input parameters via API.
void closeLog()
remove logs
QuantLib::ext::shared_ptr< NPVCube > getCube(std::string cubeName)
OREApp(QuantLib::ext::shared_ptr< Parameters > params, bool console=false, const boost::filesystem::path &logRootPath=boost::filesystem::path())
Constructor that uses ORE parameters and input data from files.
QuantLib::ext::shared_ptr< StructuredLogger > structuredLogger_
std::set< std::string > getReportNames()
std::set< std::string > getCubeNames()
QuantLib::ext::shared_ptr< InputParameters > inputs_
std::set< std::string > getAnalyticTypes()
void buildInputParameters(QuantLib::ext::shared_ptr< InputParameters > inputs, const QuantLib::ext::shared_ptr< Parameters > ¶ms)
Populate InputParameters object from classic ORE key-value pairs in Parameters.
Open Risk Engine setup and analytics choice.