Skip to content

Commit b818ee2

Browse files
authored
Merge b15f814 into sapling-pr-archive-ktf
2 parents 1d5769b + b15f814 commit b818ee2

61 files changed

Lines changed: 3796 additions & 2196 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CCDB/include/CCDB/BasicCCDBManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ class CCDBManagerInstance
6464
bool isValid(long ts) { return ts < endvalidity && ts >= startvalidity; }
6565
bool isCacheValid(long ts)
6666
{
67-
LOGP(debug, "isCacheValid : {} : {} : {} --> {}", cacheValidFrom, ts, cacheValidUntil, ts < cacheValidUntil && ts >= cacheValidFrom);
68-
return ts < cacheValidUntil && ts >= cacheValidFrom;
67+
LOGP(debug, "isCacheValid : {} : {} : {} --> {}", cacheValidFrom, ts, cacheValidUntil, isValid(ts));
68+
return ts < cacheValidUntil && isValid(ts);
6969
}
7070
void clear()
7171
{

DataFormats/common/include/CommonDataFormat/TFIDInfo.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ struct TFIDInfo { // helper info to patch DataHeader
2929
uint32_t runNumber = -1U;
3030
uint32_t startTime = -1U; // same as timeslot
3131
uint64_t creation = -1UL;
32+
bool discard = false;
3233

3334
bool isDummy() { return tfCounter == -1U; }
3435
void fill(uint32_t firstTForbit_, uint32_t tfCounter_, uint32_t runNumber_, uint32_t startTime_, uint64_t creation_)
@@ -38,9 +39,10 @@ struct TFIDInfo { // helper info to patch DataHeader
3839
runNumber = runNumber_;
3940
startTime = startTime_;
4041
creation = creation_;
42+
discard = (firstTForbit < tfCounter) || firstTForbit == -1U || creation == -1;
4143
}
4244

43-
ClassDefNV(TFIDInfo, 2);
45+
ClassDefNV(TFIDInfo, 3);
4446
};
4547
} // namespace dataformats
4648
} // namespace o2

Detectors/Base/src/TFIDInfoHelper.cxx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,9 @@ void o2::base::TFIDInfoHelper::fillTFIDInfo(ProcessingContext& pc, o2::dataforma
2323
{
2424
const auto& tinfo = pc.services().get<o2::framework::TimingInfo>();
2525
static int errCount = 0;
26-
if (tinfo.firstTForbit == -1U || tinfo.creation == -1) {
27-
if (errCount++ < 5) {
28-
LOGP(warn, "Ignoring dummy input with orbit {} and creation time {} in fillTFIDInfo", tinfo.firstTForbit, tinfo.creation);
29-
}
30-
return;
26+
ti.fill(tinfo.firstTForbit, tinfo.tfCounter, tinfo.runNumber, tinfo.timeslice, tinfo.creation);
27+
if (ti.discard && errCount++ < 5) {
28+
LOGP(warn, "Bad input with orbit {}, TFcounter {} and creation time {} in fillTFIDInfo", tinfo.firstTForbit, tinfo.tfCounter, tinfo.creation);
3129
}
32-
ti.firstTForbit = tinfo.firstTForbit;
33-
ti.tfCounter = tinfo.tfCounter;
34-
ti.runNumber = tinfo.runNumber;
35-
ti.startTime = tinfo.timeslice;
36-
ti.creation = tinfo.creation;
30+
return;
3731
}

Detectors/Calibration/include/DetectorsCalibration/TimeSlotCalibration.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,15 @@ template <typename Container>
281281
template <typename... DATA>
282282
bool TimeSlotCalibration<Container>::process(const DATA&... data)
283283
{
284+
if (mCurrentTFInfo.discard) {
285+
LOGP(warn, "Ignoring TF with discard flag on: Orbit {}, TFcounter {}, Run:{}, StartTime:{} CreationTime {}, ",
286+
mCurrentTFInfo.firstTForbit,
287+
mCurrentTFInfo.tfCounter,
288+
mCurrentTFInfo.runNumber,
289+
mCurrentTFInfo.startTime,
290+
mCurrentTFInfo.creation);
291+
return false; // ignore bad TF
292+
}
284293
static bool firstCall = true;
285294
if (firstCall) {
286295
firstCall = false;

Detectors/ITSMFT/ITS/tracking/src/VertexerTraits.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ void VertexerTraits<nLayers>::computeVertices(const int iteration)
370370
std::array<float, 3> tmpVertex{mTimeFrame->getTrackletClusters(rofId).back().getVertex()};
371371
if (tmpVertex[0] * tmpVertex[0] + tmpVertex[1] * tmpVertex[1] > 4.f) {
372372
mTimeFrame->getTrackletClusters(rofId).pop_back();
373-
break;
373+
continue;
374374
}
375375
usedTracklets[line1] = true;
376376
usedTracklets[line2] = true;

Detectors/PHOS/calib/src/PHOSEnergyCalibDevice.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ void PHOSEnergyCalibDevice::run(o2::framework::ProcessingContext& pc)
133133
LOG(warning) << "LHCPeriod is not available, using current month " << mLHCPeriod;
134134
}
135135
}
136+
o2::base::TFIDInfoHelper::fillTFIDInfo(pc, mCalibrator->getCurrentTFInfo());
136137
mCalibrator->process(tfcounter, clusters, cluelements, cluTR, mOutputDigits);
137138

138139
fillOutputTree();

Detectors/PHOS/calib/src/PHOSL1phaseCalibDevice.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void PHOSL1phaseCalibDevice::init(o2::framework::InitContext& ic)
3030

3131
void PHOSL1phaseCalibDevice::run(o2::framework::ProcessingContext& pc)
3232
{
33-
33+
o2::base::TFIDInfoHelper::fillTFIDInfo(pc, mCalibrator->getCurrentTFInfo());
3434
o2::base::GRPGeomHelper::instance().checkUpdates(pc);
3535
auto crTime = pc.services().get<o2::framework::TimingInfo>().creation;
3636
if (mRunStartTime == 0 || crTime < mRunStartTime) {

Detectors/PHOS/calib/src/PHOSRunbyrunCalibDevice.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ void PHOSRunbyrunCalibDevice::run(o2::framework::ProcessingContext& pc)
5454
auto tfcounter = o2::header::get<o2::header::DataHeader*>(pc.inputs().get("clusters").header)->tfCounter;
5555
auto clusters = pc.inputs().get<gsl::span<Cluster>>("clusters");
5656
auto cluTR = pc.inputs().get<gsl::span<TriggerRecord>>("cluTR");
57+
o2::base::TFIDInfoHelper::fillTFIDInfo(pc, mCalibrator->getCurrentTFInfo());
5758
LOG(detail) << "Processing TF with " << clusters.size() << " clusters and " << cluTR.size() << " TriggerRecords";
5859
mCalibrator->process(tfcounter, clusters, cluTR);
5960
}

Detectors/PHOS/calib/src/PHOSTurnonCalibDevice.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void PHOSTurnonCalibDevice::run(o2::framework::ProcessingContext& pc)
4949
auto cellTR = pc.inputs().get<gsl::span<TriggerRecord>>("cellTriggerRecords");
5050
auto clusters = pc.inputs().get<gsl::span<Cluster>>("clusters");
5151
auto cluTR = pc.inputs().get<gsl::span<TriggerRecord>>("clusterTriggerRecords");
52-
52+
o2::base::TFIDInfoHelper::fillTFIDInfo(pc, mCalibrator->getCurrentTFInfo());
5353
LOG(detail) << "[PHOSTurnonCalibDevice - run] Received " << cells.size() << " cells and " << clusters.size() << " clusters, running calibration";
5454

5555
mCalibrator->process(tfcounter, cells, cellTR, clusters, cluTR);

Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str
101101
const double staveTiltAngle = itofSegmented ? 10.0 : 0.0; // degrees
102102
const int modulesPerStave = itofSegmented ? 10 : 0; // number of modules per stave in segmented case
103103
mITOFLayer = ITOFLayer(name,
104-
dInnerTof.first, 0.f, dInnerTof.second, 0.f, x2x0, ITOFLayer::kBarrelSegmented,
104+
dInnerTof.first, 0.f, dInnerTof.second, 0.f, x2x0, itofSegmented ? ITOFLayer::kBarrelSegmented : ITOFLayer::kBarrel,
105105
nStaves, staveWidth, staveTiltAngle, modulesPerStave);
106106
}
107107
if (otof) { // oTOF
@@ -111,7 +111,7 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str
111111
const double staveTiltAngle = otofSegmented ? 5.0 : 0.0; // degrees
112112
const int modulesPerStave = otofSegmented ? 54 : 0; // number of modules per stave in segmented case
113113
mOTOFLayer = OTOFLayer(name,
114-
dOuterTof.first, 0.f, dOuterTof.second, 0.f, x2x0, OTOFLayer::kBarrelSegmented,
114+
dOuterTof.first, 0.f, dOuterTof.second, 0.f, x2x0, otofSegmented ? OTOFLayer::kBarrelSegmented : OTOFLayer::kBarrel,
115115
nStaves, staveWidth, staveTiltAngle, modulesPerStave);
116116
}
117117
if (ftof) {

0 commit comments

Comments
 (0)