Logo
Reference manual - version orea_version
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OREApp Class Reference

Orchestrates the processes covered by ORE, data loading, analytics and reporting. More...

#include <orea/app/oreapp.hpp>

Public Member Functions

 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.
 
 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.
 
virtual ~OREApp ()
 Destructor.
 
virtual void run ()
 Runs analytics and generates reports after using the first OREApp c'tor.
 
void run (const std::vector< std::string > &marketData, const std::vector< std::string > &fixingData)
 Runs analytics and generates reports after using the second OREApp c'tor.
 
QuantLib::ext::shared_ptr< InputParametersgetInputs ()
 
std::set< std::string > getAnalyticTypes ()
 
std::set< std::string > getSupportedAnalyticTypes ()
 
const QuantLib::ext::shared_ptr< Analytic > & getAnalytic (std::string type)
 
std::set< std::string > getReportNames ()
 
QuantLib::ext::shared_ptr< PlainInMemoryReportgetReport (std::string reportName)
 
std::set< std::string > getCubeNames ()
 
QuantLib::ext::shared_ptr< NPVCubegetCube (std::string cubeName)
 
std::set< std::string > getMarketCubeNames ()
 
QuantLib::ext::shared_ptr< AggregationScenarioDatagetMarketCube (std::string cubeName)
 
std::vector< std::string > getErrors ()
 
Real getRunTime ()
 time for executing run(...) in seconds
 
std::string version ()
 

Protected Member Functions

virtual void analytics ()
 
void buildInputParameters (QuantLib::ext::shared_ptr< InputParameters > inputs, const QuantLib::ext::shared_ptr< Parameters > &params)
 Populate InputParameters object from classic ORE key-value pairs in Parameters.
 
QuantLib::ext::shared_ptr< CSVLoaderbuildCsvLoader (const QuantLib::ext::shared_ptr< Parameters > &params)
 
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
 
void closeLog ()
 remove logs
 
void initFromParams ()
 
void initFromInputs ()
 

Protected Attributes

QuantLib::ext::shared_ptr< Parametersparams_
 ORE Input parameters.
 
QuantLib::ext::shared_ptr< InputParametersinputs_
 
QuantLib::ext::shared_ptr< OutputParametersoutputs_
 
QuantLib::ext::shared_ptr< AnalyticsManageranalyticsManager_
 
QuantLib::ext::shared_ptr< StructuredLoggerstructuredLogger_
 
boost::timer::cpu_timer runTimer_
 
string logFile_
 Logging.
 
Size logMask_
 
bool console_
 
string outputPath_
 
boost::filesystem::path logRootPath_
 
string progressLogFile_ = ""
 
QuantLib::Size progressLogRotationSize_ = 100 * 1024 * 1024
 
bool progressLogToConsole_ = false
 
string structuredLogFile_ = ""
 
QuantLib::Size structuredLogRotationSize_ = 100 * 1024 * 1024
 
std::vector< std::string > errorMessages_
 

Detailed Description

Orchestrates the processes covered by ORE, data loading, analytics and reporting.