#include <PSAnaApp.h>
Public Member Functions | |
PSAnaApp (const std::string &appName="psana") | |
virtual | ~PSAnaApp () |
int | run (int argc, char **argv) |
int | run (const std::vector< std::string > &argv) |
Protected Member Functions | |
virtual int | preRunApp () |
virtual int | runApp () |
void | setConfigFileAndOptions (std::string &cfgFile, std::map< std::string, std::string > &options) |
std::vector< std::string > | inputDataSets () const |
This class is a whole application, you can run psana by making an instance of this class and passing arguments to its run() method.
This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.
Definition at line 65 of file PSAnaApp.h.
psana::PSAnaApp::PSAnaApp | ( | const std::string & | appName = "psana" |
) | [explicit] |
Definition at line 90 of file PSAnaApp.cpp.
psana::PSAnaApp::~PSAnaApp | ( | ) | [virtual] |
Definition at line 108 of file PSAnaApp.cpp.
std::vector< std::string > psana::PSAnaApp::inputDataSets | ( | ) | const [protected] |
int psana::PSAnaApp::preRunApp | ( | ) | [protected, virtual] |
Method called before runApp, can be overriden in subclasses. Usually if you override it, call base class method too.
Definition at line 152 of file PSAnaApp.cpp.
References MsgLogger::MsgFormatter::addGlobalFormat(), MsgLogger::MsgLogLevel::debug, MsgLogger::MsgLogLevel::error, MsgLogger::MsgLogLevel::fatal, MsgLogger::MsgLogLevel::trace, and MsgLogger::MsgLogLevel::warning.
int psana::PSAnaApp::run | ( | const std::vector< std::string > & | argv | ) |
Run the application, accepts arguments as vector of strings which should contain the same values as regular argv (first element must be application name).
Definition at line 118 of file PSAnaApp.cpp.
References run(), and mpids_test::size.
int psana::PSAnaApp::run | ( | int | argc, | |
char ** | argv | |||
) | [inline] |
Run the application, accepts regular argc and argv.
Definition at line 77 of file PSAnaApp.h.
Referenced by run().
int psana::PSAnaApp::runApp | ( | ) | [protected, virtual] |
Main method which runs the whole application
Definition at line 175 of file PSAnaApp.cpp.
References psana::PSAna::dataSource(), psana::DataSource::empty(), psana::DataSource::events(), inputDataSets(), iter, psana::PSAna::modules(), MsgLogRoot, and setConfigFileAndOptions().
void psana::PSAnaApp::setConfigFileAndOptions | ( | std::string & | cfgFile, | |
std::map< std::string, std::string > & | options | |||
) | [protected] |
helper function for runApp which sets config file and options for framework
Definition at line 210 of file PSAnaApp.cpp.
References dumpConfigFile(), dumpConfigFileOptionSet(), MsgLogRoot, and removeDumpConfigFileOption().
Referenced by runApp().