00001 #ifndef PSANA_PSANAAPP_H
00002 #define PSANA_PSANAAPP_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include <string>
00017 #include <vector>
00018 #include <stack>
00019 #include <map>
00020 #include <boost/shared_ptr.hpp>
00021
00022
00023
00024
00025 #include "AppUtils/AppBase.h"
00026
00027
00028
00029
00030 #include "AppUtils/AppCmdArgList.h"
00031 #include "AppUtils/AppCmdOpt.h"
00032 #include "AppUtils/AppCmdOptList.h"
00033 #include "psana/Module.h"
00034 #include "PSEnv/Env.h"
00035 #include "PSEvt/Event.h"
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 namespace psana {
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 class PSAnaApp : public AppUtils::AppBase {
00066 public:
00067
00068
00069 explicit PSAnaApp(const std::string& appName = "psana") ;
00070
00071
00072 virtual ~PSAnaApp () ;
00073
00074
00075
00076
00077 int run(int argc, char** argv) { return AppUtils::AppBase::run(argc, argv); }
00078
00079
00080
00081
00082
00083
00084 int run(const std::vector<std::string>& argv);
00085
00086 protected :
00087
00088
00089
00090
00091
00092 virtual int preRunApp () ;
00093
00094
00095
00096
00097 virtual int runApp () ;
00098
00099
00100
00101
00102 void setConfigFileAndOptions(std::string &cfgFile, std::map<std::string, std::string> &options);
00103
00104 std::vector<std::string> inputDataSets() const;
00105 private:
00106
00107
00108 AppUtils::AppCmdOpt<std::string> m_calibDirOpt ;
00109 AppUtils::AppCmdOpt<std::string> m_configOpt ;
00110 AppUtils::AppCmdOpt<std::string> m_expNameOpt ;
00111 AppUtils::AppCmdOpt<std::string> m_jobNameOpt ;
00112 AppUtils::AppCmdOptList<std::string> m_modulesOpt;
00113 AppUtils::AppCmdOpt<unsigned> m_maxEventsOpt ;
00114 AppUtils::AppCmdOpt<unsigned> m_skipEventsOpt ;
00115 AppUtils::AppCmdOpt<unsigned> m_parallelOpt;
00116 AppUtils::AppCmdOptList<std::string> m_optionsOpt;
00117 AppUtils::AppCmdArgList<std::string> m_datasets;
00118 };
00119
00120 }
00121
00122 #endif // PSANA_PSANAAPP_H