#include <Utilities.h>
Definition at line 24 of file Utilities.h.
◆ Utilities()
cond::Utilities::Utilities |
( |
const std::string & |
commandName, |
|
|
std::string |
positionalParameter = std::string("") |
|
) |
| |
Definition at line 72 of file Utilities.cc.
78 m_options.add_options()(
"debug",
"switch on debug mode")(
"help,h",
"help message");
79 if (!positionalParameter.empty()) {
81 addOption<std::string>(positionalParameter,
"", positionalParameter);
References m_options, and m_positionalOptions.
◆ ~Utilities()
cond::Utilities::~Utilities |
( |
| ) |
|
|
virtual |
◆ addAuthenticationOptions()
void cond::Utilities::addAuthenticationOptions |
( |
| ) |
|
Definition at line 127 of file Utilities.cc.
128 addOption<std::string>(
"authPath",
"P",
"path to the authentication key");
129 addOption<std::string>(
"user",
"u",
"user name");
130 addOption<std::string>(
"pass",
"p",
"password");
◆ addConfigFileOption()
void cond::Utilities::addConfigFileOption |
( |
| ) |
|
Definition at line 133 of file Utilities.cc.
134 addOption<std::string>(
"configFile",
"f",
"configuration file(optional)");
◆ addConnectOption()
void cond::Utilities::addConnectOption |
( |
std::string const & |
fullName, |
|
|
std::string const & |
shortName, |
|
|
std::string const & |
helpEntry |
|
) |
| |
Definition at line 121 of file Utilities.cc.
124 addOption<std::string>(connectionOptionName, shortName, helpEntry);
◆ addOption() [1/2]
template<typename T >
void cond::Utilities::addOption |
( |
const std::string & |
fullName, |
|
|
const std::string & |
shortName, |
|
|
const std::string & |
helpEntry |
|
) |
| |
|
inline |
Definition at line 81 of file Utilities.h.
84 std::stringstream optInfo;
86 if (!shortName.empty())
87 optInfo <<
"," << shortName;
88 m_options.add_options()(optInfo.str().c_str(), boost::program_options::value<T>(), helpEntry.c_str());
References newFWLiteAna::fullName, and m_options.
◆ addOption() [2/2]
template<>
void cond::Utilities::addOption |
( |
const std::string & |
fullName, |
|
|
const std::string & |
shortName, |
|
|
const std::string & |
helpEntry |
|
) |
| |
|
inline |
◆ execute()
int cond::Utilities::execute |
( |
| ) |
|
|
virtual |
◆ getAuthenticationPathValue()
std::string cond::Utilities::getAuthenticationPathValue |
( |
| ) |
|
Definition at line 153 of file Utilities.cc.
153 {
return getOptionValue<std::string>(
"authPath"); }
◆ getConfigFileValue()
std::string cond::Utilities::getConfigFileValue |
( |
| ) |
|
Definition at line 165 of file Utilities.cc.
165 {
return getOptionValue<std::string>(
"configFile"); }
◆ getConnectValue()
std::string cond::Utilities::getConnectValue |
( |
| ) |
|
Definition at line 159 of file Utilities.cc.
159 {
return getOptionValue<std::string>(
"connect"); }
◆ getDictionaryValue()
std::string cond::Utilities::getDictionaryValue |
( |
| ) |
|
Definition at line 163 of file Utilities.cc.
163 {
return getOptionValue<std::string>(
"dictionary"); }
◆ getLogDBValue()
std::string cond::Utilities::getLogDBValue |
( |
| ) |
|
Definition at line 161 of file Utilities.cc.
161 {
return getOptionValue<std::string>(
"logDB"); }
◆ getOptionValue()
template<typename T >
T cond::Utilities::getOptionValue |
( |
const std::string & |
fullName | ) |
|
|
inline |
◆ getPasswordValue()
std::string cond::Utilities::getPasswordValue |
( |
| ) |
|
Definition at line 157 of file Utilities.cc.
157 {
return getOptionValue<std::string>(
"pass"); }
◆ getUserValue()
std::string cond::Utilities::getUserValue |
( |
| ) |
|
Definition at line 155 of file Utilities.cc.
155 {
return getOptionValue<std::string>(
"user"); }
◆ getValueIfExists()
std::string cond::Utilities::getValueIfExists |
( |
const std::string & |
fullName | ) |
|
|
private |
◆ hasDebug()
bool cond::Utilities::hasDebug |
( |
| ) |
|
◆ hasOptionValue()
bool cond::Utilities::hasOptionValue |
( |
const std::string & |
fullName | ) |
|
◆ initializePluginManager()
void cond::Utilities::initializePluginManager |
( |
| ) |
|
◆ parseCommand()
void cond::Utilities::parseCommand |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
◆ run()
int cond::Utilities::run |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 89 of file Utilities.cc.
93 std::vector<edm::ParameterSet> psets;
96 psets.push_back(pSet);
References edm::ParameterSet::addParameter(), dir2webdir::argc, cmsBatch::argv, edmplugin::standard::config(), submitPVResolutionJobs::config, edmplugin::PluginManager::configure(), gather_cfg::cout, edm::ServiceRegistry::createSet(), submitPVResolutionJobs::err, cppFunctionSkipper::exception, runTheMatrix::ret, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by Types.EventID::cppID(), Types.LuminosityBlockID::cppID(), and o2olib.O2OTool::execute().
◆ sendError()
void cond::Utilities::sendError |
( |
const std::string & |
message | ) |
|
|
private |
◆ sendException()
void cond::Utilities::sendException |
( |
const std::string & |
message | ) |
|
|
private |
◆ m_currentToken
◆ m_name
std::string cond::Utilities::m_name |
|
private |
◆ m_options
boost::program_options::options_description cond::Utilities::m_options |
|
private |
◆ m_positionalOptions
boost::program_options::positional_options_description cond::Utilities::m_positionalOptions |
|
private |
◆ m_values
boost::program_options::variables_map cond::Utilities::m_values |
|
private |