Skip to content

Commit bba9742

Browse files
committed
clang
1 parent d51c7de commit bba9742

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

DataFormats/Detectors/CTP/src/Configuration.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,8 +793,8 @@ std::string CTPConfiguration::getClassNameFromHWIndex(int index)
793793
const CTPClass* CTPConfiguration::getCTPClassFromHWIndex(int index) const
794794
{
795795
const CTPClass* clsfound = nullptr;
796-
for(auto const& cls: mCTPClasses){
797-
if(index == cls.getIndex()){
796+
for (auto const& cls : mCTPClasses) {
797+
if (index == cls.getIndex()) {
798798
clsfound = &cls;
799799
break;
800800
}

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

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

Detectors/CTP/reconstruction/src/RawDataDecoder.cxx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,9 @@ int RawDataDecoder::decodeRaw(o2::framework::InputRecord& inputs, std::vector<o2
299299
}
300300
// std::cout << "trgclassmask:" << std::hex << trgclassmask << std::dec << std::endl;
301301
ret = shiftInputs(digitsMap, digits, mTFOrbit, trgclassmask);
302-
if(mCheckConsistency) {
302+
if (mCheckConsistency) {
303303
ret = checkReadoutConsistentncy(digits, trgclassmask);
304304
}
305-
306305
}
307306
if (mDoDigits && !mDecodeInps) {
308307
for (auto const& dig : digitsMap) {
@@ -634,31 +633,31 @@ int RawDataDecoder::checkReadoutConsistentncy(o2::pmr::vector<CTPDigit>& digits,
634633
{
635634
int ret = 0;
636635
int lost = 0;
637-
for(auto const& digit: digits) {
636+
for (auto const& digit : digits) {
638637
// if class mask => inps
639-
for(int i = 0; i < digit.CTPClassMask.size(); i++){
640-
if(digit.CTPClassMask[i]){
641-
const CTPClass *cls = mCTPConfig.getCTPClassFromHWIndex(i);
638+
for (int i = 0; i < digit.CTPClassMask.size(); i++) {
639+
if (digit.CTPClassMask[i]) {
640+
const CTPClass* cls = mCTPConfig.getCTPClassFromHWIndex(i);
642641
uint64_t clsinpmask = cls->descriptor->getInputsMask();
643642
uint64_t diginpmask = digit.CTPInputMask.to_ullong();
644-
if(!((clsinpmask & diginpmask) == clsinpmask)) {
643+
if (!((clsinpmask & diginpmask) == clsinpmask)) {
645644
LOG(error) << "CTP class:" << cls->name << " inpmask:" << clsinpmask << " not compatible with inputs mask:" << diginpmask;
646645
ret = 128;
647646
}
648647
}
649648
}
650649
// if inps => class mask
651-
for(auto const& cls: mCTPConfig.getCTPClasses()) {
650+
for (auto const& cls : mCTPConfig.getCTPClasses()) {
652651
uint64_t clsinpmask = cls.descriptor->getInputsMask();
653652
uint64_t diginpmask = digit.CTPInputMask.to_ullong();
654653
uint64_t digclsmask = digit.CTPClassMask.to_ullong();
655-
if((clsinpmask & diginpmask) == clsinpmask) {
656-
if((cls.classMask & digclsmask) == 0) {
654+
if ((clsinpmask & diginpmask) == clsinpmask) {
655+
if ((cls.classMask & digclsmask) == 0) {
657656
int32_t BCShiftCorrection = -o2::ctp::TriggerOffsetsParam::Instance().customOffset[o2::detectors::DetID::CTP];
658657
int32_t offset = BCShiftCorrection + o2::ctp::TriggerOffsetsParam::Instance().LM_L0 + o2::ctp::TriggerOffsetsParam::Instance().L0_L1_classes - 1;
659658
offset = o2::constants::lhc::LHCMaxBunches - offset;
660-
if(digit.intRecord.bc < offset) {
661-
LOG(error) << "CTP class:" << cls.name << " inpmask:" << clsinpmask << " cls mask:" << cls.classMask << " not found in digit:" << digit;
659+
if (digit.intRecord.bc < offset) {
660+
LOG(error) << "CTP class:" << cls.name << " inpmask:" << clsinpmask << " cls mask:" << cls.classMask << " not found in digit:" << digit;
662661
ret = 256;
663662
} else {
664663
lost++;
@@ -667,7 +666,7 @@ int RawDataDecoder::checkReadoutConsistentncy(o2::pmr::vector<CTPDigit>& digits,
667666
}
668667
}
669668
}
670-
if(lost) {
669+
if (lost) {
671670
LOG(info) << "LOST classes because of shift:" << lost;
672671
}
673672
return ret;

Detectors/CTP/workflowScalers/src/ctp-ccdb-orbit.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ int main(int argc, char** argv)
133133
TFile* f = TFile::Open(file.c_str(), "RECREATE");
134134
if (f == nullptr) {
135135
std::cout << "Error: File" << file << " could not be open for writing !!!" << std::endl;
136-
ret++;;
136+
ret++;
137137
} else {
138138
std::cout << "File" << file << " being writen." << std::endl;
139139
f->WriteObject(&vect, "ccdb_object");

0 commit comments

Comments
 (0)