Logo
Reference manual - version orea_version
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, bool clearLog=true, 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.
void run (const QuantLib::ext::shared_ptr< MarketDataLoader > loader)
 Run taking a MarketDataLoader.
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< PlainInMemoryReport > getReport (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 ()
QuantLib::ext::shared_ptr< BufferLogger > getLogger (const std::string &name)
std::vector< std::string > & getProgressLog ()
Real getRunTime ()
 time for executing run(...) in seconds
std::string version ()
std::string gitHash ()
void setupLog (QuantLib::Size mask=15, const std::string &path="", const std::string &file="", const boost::filesystem::path &logRootPath=boost::filesystem::path(), 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

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< CSVLoader > buildCsvLoader (const QuantLib::ext::shared_ptr< Parameters > &params)
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< StructuredLogger > structuredLogger_
boost::timer::cpu_timer runTimer_
string logFile_
 Logging.
Size logMask_
bool console_
string outputPath_
bool clearLog_ = true
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.