Skip to content

Commit

Permalink
clang
Browse files Browse the repository at this point in the history
  • Loading branch information
lietava committed Mar 1, 2024
1 parent 81f254c commit b7c9e05
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
10 changes: 5 additions & 5 deletions DataFormats/Detectors/CTP/src/Scalers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
using namespace o2::ctp;
void errorCounters::printStream(std::ostream& stream) const
{
//stream << "Counter warnings diff 1 lmBlmA:" << lmBlmAd1 << " lmAl0B:" << lmAl0Bd1 << " l0Bl0A:" << l0Bl0Ad1 << " l0Al1B: " << l0Al1Bd1 << " l1Bl1A:" << l1Bl1Ad1;
//stream << std::endl;
if(lmB + l0B << + l1B + lmA + l0A + l1A + lmBlmA + lmAl0B + l0Bl0A + l0Al1B + l1Bl1A) {
// stream << "Counter warnings diff 1 lmBlmA:" << lmBlmAd1 << " lmAl0B:" << lmAl0Bd1 << " l0Bl0A:" << l0Bl0Ad1 << " l0Al1B: " << l0Al1Bd1 << " l1Bl1A:" << l1Bl1Ad1;
// stream << std::endl;
if (lmB + l0B << +l1B + lmA + l0A + l1A + lmBlmA + lmAl0B + l0Bl0A + l0Al1B + l1Bl1A) {
stream << "Counter errorrs: lmB:" << lmB << " l0B:" << l0B << " l1B:" << l1B << " lmA:" << lmA << " l0A:" << l0A << " l1A:" << l1A;
stream << " lmBlmA:" << lmBlmA << " lmAl0B:" << lmAl0B << " l0Bl0A:" << l0Bl0A << " l0Al1B: " << l0Al1B << " l1Bl1A:" << l1Bl1A;
stream << std::endl;
Expand Down Expand Up @@ -502,14 +502,14 @@ int CTPRunScalers::updateOverflowsInps(const CTPScalerRecordRaw& rec0, const CTP
static int iPrint = 0;
uint32_t NINPS = 48;
if (rec0.scalersInps.size() < NINPS) {
if(iPrint < 1) {
if (iPrint < 1) {
LOG(error) << "Scalers not available. Size:" << rec0.scalersInps.size();
iPrint++;
return 1;
}
}
if (rec1.scalersInps.size() < NINPS) {
if(iPrint < 1) {
if (iPrint < 1) {
LOG(error) << "Scalers not available. Size:" << rec0.scalersInps.size();
iPrint++;
return 2;
Expand Down
10 changes: 5 additions & 5 deletions Detectors/CTP/macro/GetScalersForRun.C
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ void GetScalersForRun(int runNumber = 0, int fillN = 0, bool test = 1)
} else {
std::cout << "ZNC class not available, rate from input:" << std::endl;
}
auto zncinprate = ctpscalers->getRateGivenT((timeStamp+100) * 1.e-3, 25, 7);
std::cout << "ZNC inp rate:" << zncinprate.first/28. << " " << zncinprate.second/28. << std::endl;
auto zncinprate = ctpscalers->getRateGivenT((timeStamp + 100) * 1.e-3, 25, 7);
std::cout << "ZNC inp rate:" << zncinprate.first / 28. << " " << zncinprate.second / 28. << std::endl;

//o2::ctpRateFetcher ctprate;
//auto fetcherRate = ctprate.fetch(&ccdbMgr, timeStamp, runNumber, "ZNC");
//std::cout << "Result from the fetcher (ZNC): " << fetcherRate << std::endl;
// o2::ctpRateFetcher ctprate;
// auto fetcherRate = ctprate.fetch(&ccdbMgr, timeStamp, runNumber, "ZNC");
// std::cout << "Result from the fetcher (ZNC): " << fetcherRate << std::endl;
}
5 changes: 2 additions & 3 deletions Detectors/CTP/macro/ctpRateF.C
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
#include "DataFormatsCTP/Scalers.h"
#include "DataFormatsParameters/GRPLHCIFData.h"
#include "CCDB/BasicCCDBManager.h"
struct ctpRateFetcher
{
struct ctpRateFetcher {
ctpRateFetcher() = default;
double fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string sourceName);
void getCTPconfig(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber);
Expand Down Expand Up @@ -143,6 +142,6 @@ void ctpRateF(int runNumber = 0)
uint64_t timeStamp = (soreor.second - soreor.first) / 2 + soreor.first;
std::cout << "Timestamp:" << timeStamp << std::endl;
ctpRateFetcher ctprate;
auto rate = ctprate.fetch(&ccdbMgr, timeStamp+100, runNumber, "ZNChadronic");
auto rate = ctprate.fetch(&ccdbMgr, timeStamp + 100, runNumber, "ZNChadronic");
std::cout << "Rate:" << rate << std::endl;
}

0 comments on commit b7c9e05

Please sign in to comment.