Skip to content

Commit 12919ca

Browse files
committed
fix
1 parent 23d61a7 commit 12919ca

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

DataFormats/Detectors/CTP/include/DataFormatsCTP/Configuration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ std::ostream& operator<<(std::ostream& in, const CTPConfiguration& conf);
208208
struct CtpCfg {
209209
CtpCfg() = default;
210210
std::string filename = "ctp.cfg";
211-
CtpCfg readAndSave(std::string& path, int& ret);
211+
int readAndSave(std::string& path);
212212
uint32_t TFOrbits = 0;
213213
int ccdb = -1; // -1 means def constructor was called
214214
uint32_t orbitShift = 0;

DataFormats/Detectors/CTP/src/Configuration.cxx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,9 +1177,8 @@ int CTPInputsConfiguration::getInputIndexFromName(std::string& name)
11771177
return 0xff;
11781178
}
11791179

1180-
CtpCfg CtpCfg::readAndSave(std::string& path, int& ret)
1180+
int CtpCfg::readAndSave(std::string& path)
11811181
{
1182-
ret = 0;
11831182
std::string file = path + filename;
11841183
std::ifstream ctpcfg(file);
11851184
if (ctpcfg.is_open()) {
@@ -1214,9 +1213,9 @@ CtpCfg CtpCfg::readAndSave(std::string& path, int& ret)
12141213
LOG(warn) << "Open file success:" << file;
12151214
} else {
12161215
LOG(warn) << "Can not open file:" << file;
1217-
ret = 1;
1216+
return 1;
12181217
}
1219-
return *this;
1218+
return 0;
12201219
}
12211220

12221221
std::ostream& o2::ctp::operator<<(std::ostream& in, const o2::ctp::CTPConfiguration& conf)

Detectors/CTP/workflowScalers/src/ctpCCDBManager.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ int ctpCCDBManager::saveCtpCfg(uint32_t runNumber, long timeStart)
174174
return 0;
175175
}
176176
CtpCfg ctpcfg;
177-
int ret;
178-
ctpcfg.readAndSave(mCtpCfgDir, ret);
177+
int ret = ctpcfg.readAndSave(mCtpCfgDir);
179178
if (ret == 0) {
180179
using namespace std::chrono_literals;
181180
std::chrono::seconds days3 = 259200s;

0 commit comments

Comments
 (0)