Skip to content
Snippets Groups Projects
Commit 620771f6 authored by Rocco Ardino's avatar Rocco Ardino :registered: Committed by Thomas Owen James
Browse files

Prettify syntax of ternary selections in config.h

parent 210ab9c5
No related branches found
No related tags found
1 merge request!64Prettify syntax of ternary selections in config.h
Pipeline #5808386 passed
...@@ -119,9 +119,7 @@ class config { ...@@ -119,9 +119,7 @@ class config {
return boost::lexical_cast<uint64_t>(v.c_str()); return boost::lexical_cast<uint64_t>(v.c_str());
} }
bool getOutputForceWrite() const { bool getOutputForceWrite() const { return (vmap.at("output_force_write") == "yes"); }
return (true ? vmap.at("output_force_write") == "yes" : false);
}
uint32_t getNOrbitsPerDMAPacket() const { uint32_t getNOrbitsPerDMAPacket() const {
std::string v = vmap.at("NOrbitsPerDMAPacket"); std::string v = vmap.at("NOrbitsPerDMAPacket");
...@@ -143,15 +141,11 @@ class config { ...@@ -143,15 +141,11 @@ class config {
return boost::lexical_cast<short>(v.c_str()); return boost::lexical_cast<short>(v.c_str());
} }
bool getEnableStreamProcessor() const { bool getEnableStreamProcessor() const { return (vmap.at("enable_stream_processor") == "yes"); }
return (true ? vmap.at("enable_stream_processor") == "yes" : false);
}
bool getEnableElasticProcessor() const { bool getEnableElasticProcessor() const { return (vmap.at("enable_elastic_processor") == "yes"); }
return (true ? vmap.at("enable_elastic_processor") == "yes" : false);
}
bool getDoZS() const { return (true ? vmap.at("doZS") == "yes" : false); } bool getDoZS() const { return (vmap.at("doZS") == "yes"); }
uint32_t getSourceID(); uint32_t getSourceID();
...@@ -160,7 +154,7 @@ class config { ...@@ -160,7 +154,7 @@ class config {
return boost::lexical_cast<uint32_t>(v.c_str()); return boost::lexical_cast<uint32_t>(v.c_str());
} }
bool getCMSSWHeaders() const { return (true ? vmap.at("cmsswHeaders") == "yes" : false); } bool getCMSSWHeaders() const { return (vmap.at("cmsswHeaders") == "yes"); }
uint32_t getNOrbitsPerFile() const { // If > 0, the fixed N orbits per file option is performed uint32_t getNOrbitsPerFile() const { // If > 0, the fixed N orbits per file option is performed
std::string v = vmap.at("nOrbitsPerFile"); std::string v = vmap.at("nOrbitsPerFile");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment