Skip to content

Commit 5b3513d

Browse files
committed
clang
1 parent e4efba2 commit 5b3513d

File tree

5 files changed

+40
-41
lines changed

5 files changed

+40
-41
lines changed

Detectors/CTP/macro/PlotPbLumi.C

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ using namespace std::chrono;
3737
// if fillN = 0: pileup correction not done
3838
// QCDB =1 : use for ongoing run
3939
//
40-
void PlotPbLumi(int runNumber, int fillN = 0, int QCDB = 0, std::string ccdbHost = "http://alice-ccdb.cern.ch" )
40+
void PlotPbLumi(int runNumber, int fillN = 0, int QCDB = 0, std::string ccdbHost = "http://alice-ccdb.cern.ch")
4141
{ // "http://ccdb-test.cern.ch:8080"
4242
std::string mCCDBPathCTPScalers = "CTP/Calib/Scalers";
4343
std::string mQCDBPathCTPScalers = "qc/CTP/Scalers";
@@ -51,7 +51,7 @@ void PlotPbLumi(int runNumber, int fillN = 0, int QCDB = 0, std::string ccdbHos
5151
// Filling
5252
std::map<string, string> metadata;
5353
int nbc = 0;
54-
if(fillN) {
54+
if (fillN) {
5555
std::string sfill = std::to_string(fillN);
5656
metadata["fillNumber"] = sfill;
5757
auto lhcifdata = ccdbMgr.getSpecific<o2::parameters::GRPLHCIFData>("GLO/Config/GRPLHCIF", timeStamp, metadata);
@@ -60,10 +60,10 @@ void PlotPbLumi(int runNumber, int fillN = 0, int QCDB = 0, std::string ccdbHos
6060
nbc = bcs.size();
6161
std::cout << "Number of interacting bc:" << nbc << std::endl;
6262
}
63-
if(QCDB) { // use this option for ongoing run
63+
if (QCDB) { // use this option for ongoing run
6464
mCCDBPathCTPScalers = mQCDBPathCTPScalers;
6565
ccdbMgr.setURL("http://ccdb-test.cern.ch:8080");
66-
timeStamp = duration_cast< milliseconds >(system_clock::now().time_since_epoch()).count();
66+
timeStamp = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
6767
std::cout << "For scalers using Current time:" << timeStamp << std::endl;
6868
}
6969
// Scalers
@@ -131,20 +131,20 @@ void PlotPbLumi(int runNumber, int fillN = 0, int QCDB = 0, std::string ccdbHos
131131
double_t Trun = timeL - time0;
132132
double_t orbit0 = recs[0].intRecord.orbit;
133133
int n = recs.size() - 1;
134-
if(runNumber == 559143) {
134+
if (runNumber == 559143) {
135135
n = 400;
136136
}
137-
if(runNumber == 559561 ) {
138-
n = n - 3; // rate drops at the end
137+
if (runNumber == 559561) {
138+
n = n - 3; // rate drops at the end
139139
}
140-
if(runNumber == 559575){
140+
if (runNumber == 559575) {
141141
n = n - 6;
142142
}
143-
if(runNumber == 559617) {
143+
if (runNumber == 559617) {
144144
n = n - 5;
145145
}
146-
if(runNumber == 559632) {
147-
n = n - 6;
146+
if (runNumber == 559632) {
147+
n = n - 6;
148148
}
149149
std::cout << " Run duration:" << Trun << " Scalers size:" << n + 1 << std::endl;
150150
Double_t x[n], znc[n], zncpp[n], ex[n], eznc[n];
@@ -162,34 +162,34 @@ void PlotPbLumi(int runNumber, int fillN = 0, int QCDB = 0, std::string ccdbHos
162162
double_t znci = (double_t)(recs[i + 1].scalersInps[25] - recs[i].scalersInps[25]);
163163
double_t zncipp = znci;
164164
double_t mu = 0;
165-
if(fillN) {
166-
mu = -TMath::Log(1. - znci / tt / nbc / frev);
165+
if (fillN) {
166+
mu = -TMath::Log(1. - znci / tt / nbc / frev);
167167
zncipp = mu * nbc * frev * tt;
168168
}
169169
zncpp[i] = zncipp / 28.;
170170
znc[i] = zncipp / 28. / tt;
171171
eznc[i] = TMath::Sqrt(zncipp) / 28. / tt;
172-
if(1){
172+
if (1) {
173173
//
174174
auto had = recs[i + 1].scalers[tsc].lmBefore - recs[i].scalers[tsc].lmBefore;
175175
had += recs[i + 1].scalers[tce].lmBefore - recs[i].scalers[tce].lmBefore;
176176
tcetsctoznc[i] = (double_t)(had) / zncpp[i];
177-
etcetsctoznc[i] = TMath::Sqrt(tcetsctoznc[i]*(1-tcetsctoznc[i])/ zncpp[i]);
177+
etcetsctoznc[i] = TMath::Sqrt(tcetsctoznc[i] * (1 - tcetsctoznc[i]) / zncpp[i]);
178178
had = recs[i + 1].scalers[tce].lmBefore - recs[i].scalers[tce].lmBefore;
179179
double_t tcec = had;
180180
tcetoznc[i] = (double_t)(had) / zncpp[i];
181181
had = recs[i + 1].scalers[vch].lmBefore - recs[i].scalers[vch].lmBefore;
182-
vchtoznc[i] = (double_t)(had) / zncpp[i] ;
183-
//std::cout << "mu:" << mu << " zncpp corr:" << zncipp << " zncraw:" << znci << " tce:" << tcec << " tce/had" << tcec/zncpp[i] << std::endl;
184-
}
182+
vchtoznc[i] = (double_t)(had) / zncpp[i];
183+
// std::cout << "mu:" << mu << " zncpp corr:" << zncipp << " zncraw:" << znci << " tce:" << tcec << " tce/had" << tcec/zncpp[i] << std::endl;
184+
}
185185
}
186186
//
187-
TFile myfile("file.root","RECREATE");
187+
TFile myfile("file.root", "RECREATE");
188188
gStyle->SetMarkerSize(0.5);
189-
//TGraph* gr1 = new TGraph(n, x, znc);
189+
// TGraph* gr1 = new TGraph(n, x, znc);
190190
TGraphErrors* gr1 = new TGraphErrors(n, x, znc, ex, eznc);
191191
TGraph* gr2 = new TGraph(n, x, tcetsctoznc);
192-
//TGraphErrors* gr2 = new TGraphErrors(n, x, tcetsctoznc, ex, etcetsctoznc); // nom and denom are strongly correlated
192+
// TGraphErrors* gr2 = new TGraphErrors(n, x, tcetsctoznc, ex, etcetsctoznc); // nom and denom are strongly correlated
193193
TGraph* gr3 = new TGraph(n, x, tcetoznc);
194194
TGraph* gr4 = new TGraph(n, x, vchtoznc);
195195
gr1->SetMarkerStyle(20);
@@ -198,26 +198,26 @@ void PlotPbLumi(int runNumber, int fillN = 0, int QCDB = 0, std::string ccdbHos
198198
gr4->SetMarkerStyle(23);
199199
gr1->SetTitle("R=ZNC/28 rate [Hz]; time[sec]; R");
200200
gr2->SetTitle("R=(TSC+TCE)*TVTX*B*28/ZNC; time[sec]; R");
201-
//gr2->SetTitle("R=TSC*TVTX*B*28/ZNC; time[sec]; R");
202-
// gr2->GetHistogram()->SetMaximum(1.1);
203-
// gr2->GetHistogram()->SetMinimum(0.9);
201+
// gr2->SetTitle("R=TSC*TVTX*B*28/ZNC; time[sec]; R");
202+
// gr2->GetHistogram()->SetMaximum(1.1);
203+
// gr2->GetHistogram()->SetMinimum(0.9);
204204
gr3->SetTitle("R=(TCE)*TVTX*B*28/ZNC; time[sec]; R");
205205
// gr3->GetHistogram()->SetMaximum(0.6);
206206
// gr3->GetHistogram()->SetMinimum(0.4);
207207
gr4->SetTitle("R=(VCH)*TVTX*B*28/ZNC; time[sec]; R");
208208
// gr4->GetHistogram()->SetMaximum(0.6);
209209
// gr4->GetHistogram()->SetMinimum(0.4);
210210
TCanvas* c1 = new TCanvas("c1", srun.c_str(), 200, 10, 800, 500);
211-
TF1 *fun = new TF1("poly0","[0]+x*[1]");
211+
TF1* fun = new TF1("poly0", "[0]+x*[1]");
212212
c1->Divide(2, 2);
213213
c1->cd(1);
214214
gr1->Draw("AP");
215215
c1->cd(2);
216-
fun->SetParameter(0,1);
217-
gr2->Fit("poly0","FM");
216+
fun->SetParameter(0, 1);
217+
gr2->Fit("poly0", "FM");
218218
gr2->Draw("AP");
219219
c1->cd(3);
220-
fun->SetParameter(0,0.5);
220+
fun->SetParameter(0, 0.5);
221221
gr3->Fit("poly0");
222222
gr3->Draw("AP");
223223
c1->cd(4);

Detectors/CTP/macro/TestConfig.C

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void TestConfig(bool test = 1)
2121
if (test == 0) {
2222
return;
2323
}
24-
uint64_t timestamp = 1660276134898+10000;
24+
uint64_t timestamp = 1660276134898 + 10000;
2525
std::string run = "523186";
2626
o2::ctp::ctpCCDBManager::setCCDBHost("https://alice-ccdb.cern.ch");
2727
bool ok;
@@ -35,12 +35,12 @@ void TestConfig(bool test = 1)
3535
auto& triggerclasses = ctpconfig.getCTPClasses();
3636
std::cout << "Found " << triggerclasses.size() << " trigger classes" << std::endl;
3737
for (const auto& trg : triggerclasses) {
38-
if (trg.cluster->maskCluster[o2::detectors::DetID::EMC]) {
39-
// Class triggering EMCAL cluster
40-
LOG(info) << "Found trigger class for EMCAL cluster: " << trg.name << " with input mask " << std::bitset<64>(trg.descriptor->getInputsMask());
41-
trg.descriptor->getInputsMask();
42-
}
38+
if (trg.cluster->maskCluster[o2::detectors::DetID::EMC]) {
39+
// Class triggering EMCAL cluster
40+
LOG(info) << "Found trigger class for EMCAL cluster: " << trg.name << " with input mask " << std::bitset<64>(trg.descriptor->getInputsMask());
41+
trg.descriptor->getInputsMask();
4342
}
43+
}
4444
return;
4545
int indexInList = 0;
4646
for (const auto& trgclass : triggerclasses) {

Detectors/CTP/macro/TestFetcher.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void TestFetcher(int runNumber = 559456)
2525
// Opening run
2626
CTPRateFetcher fetcher;
2727
fetcher.setupRun(runNumber, &ccdb, ts, 0);
28-
//ccdb.setURL("http://ali-qcdb-gpn.cern.ch:8083/");
28+
// ccdb.setURL("http://ali-qcdb-gpn.cern.ch:8083/");
2929
ccdb.setURL("http://ccdb-test.cern.ch:8080/");
3030

3131
std::string QCDBPathCTPScalers = "qc/CTP/Scalers";

Detectors/CTP/reconstruction/include/CTPReconstruction/RawDataDecoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class RawDataDecoder
4444
void setVerbose(bool v) { mVerbose = v; }
4545
void setMAXErrors(int m) { mErrorMax = m; }
4646
int setLumiInp(int lumiinp, std::string inp);
47-
void setCTPConfig( CTPConfiguration cfg) { mCTPConfig = std::move(cfg); };
47+
void setCTPConfig(CTPConfiguration cfg) { mCTPConfig = std::move(cfg); };
4848
uint32_t getIRRejected() const { return mIRRejected; }
4949
uint32_t getTCRRejected() const { return mTCRRejected; }
5050
std::vector<uint32_t>& getTFOrbits() { return mTFOrbits; }

Detectors/CTP/workflow/src/RawDecoderSpec.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ void RawDecoderSpec::run(framework::ProcessingContext& ctx)
137137
if (fatal_flag) {
138138
ret = mDecoder.decodeRawFatal(inputs, filter);
139139
} else {
140-
if(mDecodeinputs) {
141-
const auto ctpcfg = inputs.get<o2::ctp::CTPConfiguration*>("ctpconfig");
142-
//ctpcfg->printStream(std::cout);
143-
mDecoder.setCTPConfig(*ctpcfg);
140+
if (mDecodeinputs) {
141+
const auto ctpcfg = inputs.get<o2::ctp::CTPConfiguration*>("ctpconfig");
142+
// ctpcfg->printStream(std::cout);
143+
mDecoder.setCTPConfig(*ctpcfg);
144144
}
145145
ret = mDecoder.decodeRaw(inputs, filter, mOutputDigits, lumiPointsHBF1);
146146
}
@@ -184,7 +184,6 @@ void RawDecoderSpec::run(framework::ProcessingContext& ctx)
184184
}
185185
mOutputLumiInfo.counts = mCountsT;
186186

187-
188187
mOutputLumiInfo.countsFV0 = mCountsV;
189188
mOutputLumiInfo.nHBFCounted = mNHBIntegratedT;
190189
mOutputLumiInfo.nHBFCountedFV0 = mNHBIntegratedV;

0 commit comments

Comments
 (0)