Skip to content

Commit 6367a5b

Browse files
committed
clang
1 parent 2b06259 commit 6367a5b

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

Detectors/CTP/workflowScalers/include/CTPWorkflowScalers/ctpCCDBManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ctpCCDBManager
4242
static std::string mCCDBHost;
4343
static std::string mQCDBHost;
4444
const std::string mCCDBPathCTPScalers = "CTP/Calib/Scalers";
45-
//std::string mCCDBPathCTPConfig = "CTP/Config/Config"; - in Configuration.h
45+
// std::string mCCDBPathCTPConfig = "CTP/Config/Config"; - in Configuration.h
4646
const std::string mQCDBPathCTPScalers = "qc/CTP/Scalers";
4747
const std::string mCCDBPathSoxOrbit = "CTP/Calib/FirstRunOrbit";
4848
const std::string mCCDBPathOrbitReset = "CTP/Calib/OrbitReset";

Detectors/CTP/workflowScalers/src/RunManager.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ int CTPRunManager::loadRun(const std::string& cfg)
127127
int CTPRunManager::setRunConfigBK(uint32_t runNumber, const std::string& cfg)
128128
{
129129
std::cout << "Printing cfg:" << cfg << std::endl;
130-
if(mBKClient) {
130+
if (mBKClient) {
131131
try {
132132
uint32_t runNumber = 1;
133133
mBKClient->run()->setRawCtpTriggerConfiguration(runNumber, cfg);
134134
} catch (std::runtime_error& error) {
135135
std::cerr << "An error occurred: " << error.what() << std::endl;
136136
return 1;
137137
}
138-
LOG(info) << "Run BK:" << runNumber << " CFG:" << cfg;
138+
LOG(info) << "Run BK:" << runNumber << " CFG:" << cfg;
139139
}
140140
return 0;
141141
}
@@ -232,10 +232,10 @@ int CTPRunManager::processMessage(std::string& topic, const std::string& message
232232
loadRun(message);
233233
return 0;
234234
}
235-
if(topic.find("soxorbit") != std::string::npos) {
235+
if (topic.find("soxorbit") != std::string::npos) {
236236
return 0;
237237
}
238-
if(topic.find("orbitreset") != std::string::npos) {
238+
if (topic.find("orbitreset") != std::string::npos) {
239239
return 0;
240240
}
241241
static int nerror = 0;
@@ -252,7 +252,7 @@ int CTPRunManager::processMessage(std::string& topic, const std::string& message
252252
} else if (topic.find("eox") != std::string::npos) {
253253
LOG(info) << "EOX received";
254254
mEOX = 1;
255-
} else if(topic.find("cnts") != std::string::npos) {
255+
} else if (topic.find("cnts") != std::string::npos) {
256256
// just continue
257257
} else {
258258
if (nerror < 10) {

Detectors/CTP/workflowScalers/src/ctpCCDBManager.cxx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ int ctpCCDBManager::saveRunConfigToCCDB(CTPConfiguration* cfg, long timeStart)
107107
}
108108
return ret;
109109
}
110-
int ctpCCDBManager::saveSoxOrbit(uint32_t runNumber, uint32_t soxOrbit, long timestamp) {
110+
int ctpCCDBManager::saveSoxOrbit(uint32_t runNumber, uint32_t soxOrbit, long timestamp)
111+
{
111112
// data base
112113
if (mCCDBHost == "none") {
113114
LOG(info) << "SOX Orbit not written to CCDB none";
@@ -119,8 +120,8 @@ int ctpCCDBManager::saveSoxOrbit(uint32_t runNumber, uint32_t soxOrbit, long tim
119120
timestamp = std::chrono::duration_cast<std::chrono::microseconds>(now.time_since_epoch()).count();
120121
}
121122
vect.push_back(timestamp);
122-
vect.push_back((uint64_t) runNumber);
123-
vect.push_back((uint64_t) soxOrbit);
123+
vect.push_back((uint64_t)runNumber);
124+
vect.push_back((uint64_t)soxOrbit);
124125
long tmin = timestamp;
125126
long tmax = tmin + 381928219;
126127
o2::ccdb::CcdbApi api;
@@ -137,7 +138,8 @@ int ctpCCDBManager::saveSoxOrbit(uint32_t runNumber, uint32_t soxOrbit, long tim
137138
}
138139
return 0;
139140
}
140-
int ctpCCDBManager::saveOrbitReset(long timeStamp) {
141+
int ctpCCDBManager::saveOrbitReset(long timeStamp)
142+
{
141143
// data base
142144
if (mCCDBHost == "none") {
143145
LOG(info) << "Orbit Reset not written to CCDB none";
@@ -153,12 +155,12 @@ int ctpCCDBManager::saveOrbitReset(long timeStamp) {
153155
long tmax = tmin + 381928219;
154156
o2::ccdb::CcdbApi api;
155157
map<string, string> metadata; // can be empty
156-
api.init(mCCDBHost.c_str()); // or http://localhost:8080 for a local installation
158+
api.init(mCCDBHost.c_str()); // or http://localhost:8080 for a local installation
157159

158160
// store abitrary user object in strongly typed manner
159161
int ret = api.storeAsTFileAny(&vect, mCCDBPathOrbitReset, metadata, tmin, tmax);
160162
if (ret == 0) {
161-
LOG(info) << "Orbit reset saved in ccdb:" << mCCDBHost << " tmin:" << tmin << " tmax:" << tmax;
163+
LOG(info) << "Orbit reset saved in ccdb:" << mCCDBHost << " tmin:" << tmin << " tmax:" << tmax;
162164
} else {
163165
LOG(fatal) << "Orbit reset Problem writing to database ret:" << ret;
164166
}

0 commit comments

Comments
 (0)