Skip to content

Commit 3cbfecb

Browse files
committed
code format
1 parent 5c19593 commit 3cbfecb

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

FWCore/Framework/bin/cmsRun.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,12 @@ namespace {
116116
std::vector<boost::program_options::option> result;
117117
std::string configName;
118118
if (!args.empty() and !args[0].empty()) {
119-
if(args[0][0]!='-'){ // name is first positional arg -> doesn't start with '-'
119+
if (args[0][0] != '-') { // name is first positional arg -> doesn't start with '-'
120120
configName = args[0];
121121
args.erase(args.begin());
122-
}
123-
else if(args[0]=="--" and args.size()>1){ // name can start with '-' if separator comes first
122+
} else if (args[0] == "--" and args.size() > 1) { // name can start with '-' if separator comes first
124123
configName = args[1];
125-
args.erase(args.begin(),args.begin()+2);
124+
args.erase(args.begin(), args.begin() + 2);
126125
}
127126
}
128127
if (!configName.empty()) {
@@ -260,8 +259,7 @@ int main(int argc, char* argv[]) {
260259
<< "For usage and an options list, please do 'cmsRun --help'.";
261260
edm::HaltMessageLogging();
262261
return edm::errors::ConfigFileNotFound;
263-
}
264-
else
262+
} else
265263
fileName = vm[kParameterSetOpt].as<std::string>();
266264
std::vector<std::string> pythonOptValues;
267265
if (vm.count(kPythonOpt)) {

FWCore/Integration/test/ProcessAccelerator_t.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,17 @@ TEST_CASE("Configuration with ModuleTypeResolver", s_tag) {
227227

228228
SECTION("Configuration hash is not changed") {
229229
std::unique_ptr<edm::ParameterSet> pset_auto, pset_cpu, pset_other, pset_cpuExplicit;
230-
std::unique_ptr<edm::ParameterSet> pset_otherExplicit, psetOtherDisabled_auto, psetOtherDisabled_cpu, psetOtherDisabled_other;
230+
std::unique_ptr<edm::ParameterSet> pset_otherExplicit, psetOtherDisabled_auto, psetOtherDisabled_cpu,
231+
psetOtherDisabled_other;
231232
edm::makeParameterSets(baseConfig_auto, pset_auto);
232233
edm::makeParameterSets(baseConfig_cpu, pset_cpu);
233234
edm::makeParameterSets(baseConfig_other, pset_other);
234235
edm::makeParameterSets(baseConfig_cpuExplicit, pset_cpuExplicit);
235236
edm::makeParameterSets(baseConfig_otherExplicit, pset_otherExplicit);
236237
edm::makeParameterSets(baseConfigOtherDisabled_auto, psetOtherDisabled_auto);
237238
edm::makeParameterSets(baseConfigOtherDisabled_cpu, psetOtherDisabled_cpu);
238-
REQUIRE_THROWS_WITH(edm::makeParameterSets(baseConfigOtherDisabled_other, psetOtherDisabled_other), Catch::Contains("UnavailableAccelerator"));
239+
REQUIRE_THROWS_WITH(edm::makeParameterSets(baseConfigOtherDisabled_other, psetOtherDisabled_other),
240+
Catch::Contains("UnavailableAccelerator"));
239241
pset_auto->registerIt();
240242
pset_cpu->registerIt();
241243
pset_other->registerIt();

FWCore/PythonParameterSet/src/PyBind11ProcessDesc.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@ PyBind11InterpreterSentry::~PyBind11InterpreterSentry() {
2525

2626
PyBind11ProcessDesc::PyBind11ProcessDesc() : theProcessPSet(), theInterpreter(false) {}
2727

28-
PyBind11ProcessDesc::PyBind11ProcessDesc(std::string const& config, bool isFile) : theProcessPSet(), theInterpreter(true) {
28+
PyBind11ProcessDesc::PyBind11ProcessDesc(std::string const& config, bool isFile)
29+
: theProcessPSet(), theInterpreter(true) {
2930
edm::python::initializePyBind11Module();
3031
prepareToRead();
3132
read(config, isFile);
3233
}
3334

3435
PyBind11ProcessDesc::PyBind11ProcessDesc(std::string const& config, bool isFile, const std::vector<std::string>& args)
35-
: theProcessPSet(),
36-
theInterpreter(true)
37-
{
36+
: theProcessPSet(), theInterpreter(true) {
3837
edm::python::initializePyBind11Module();
3938
prepareToRead();
4039
{
@@ -69,7 +68,7 @@ void PyBind11ProcessDesc::read(std::string const& config, bool isFile) {
6968
if (isFile)
7069
readFile(config);
7170
else
72-
readString(config);
71+
readString(config);
7372
} catch (pybind11::error_already_set const& e) {
7473
edm::pythonToCppException("Configuration", e.what());
7574
}

FWCore/PythonParameterSet/test/makeprocess_t.cppunit.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class testmakeprocess : public CppUnit::TestFixture {
5454
typedef std::shared_ptr<edm::ParameterSet> ParameterSetPtr;
5555
ParameterSetPtr pSet(char const* c) {
5656
//ParameterSetPtr result( new edm::ProcessDesc(std::string(c)) );
57-
ParameterSetPtr result = PyBind11ProcessDesc(std::string(c),false).parameterSet();
57+
ParameterSetPtr result = PyBind11ProcessDesc(std::string(c), false).parameterSet();
5858
CPPUNIT_ASSERT(result->getParameter<std::string>("@process_name") == "test");
5959
return result;
6060
}

0 commit comments

Comments
 (0)