Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
{
ccdb->setURL("http://alice-ccdb.cern.ch");
ccdb->setTimestamp(-1);
}
void run(o2::framework::ProcessingContext& pc)
{
o2::fastsim::GeometryContainer geometryContainer; // Checking that the geometry files can be accessed and loaded
LOG(info) << "On-the-fly detector geometry provider running.";
if (detectorConfiguration.value.empty()) {
Expand All @@ -46,7 +43,7 @@
return;
}
int idx = 0;
for (auto& configFile : detectorConfiguration.value) {

Check failure on line 46 in ALICE3/TableProducer/OTF/onTheFlyDetectorGeometryProvider.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
LOG(info) << "Loading detector geometry from configuration file: " << configFile;
// If the filename starts with ccdb: then take the file from the ccdb
if (configFile.rfind("ccdb:", 0) == 0) {
Expand Down Expand Up @@ -74,19 +71,15 @@
const float mMagneticField = geometryContainer.getFloatValue(0, "global", "magneticfield");
for (int icfg = 0; icfg < nGeometries; ++icfg) {
const float cfgBfield = geometryContainer.getFloatValue(icfg, "global", "magneticfield");
if (std::abs(cfgBfield - mMagneticField) > 1e-3) {

Check failure on line 74 in ALICE3/TableProducer/OTF/onTheFlyDetectorGeometryProvider.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
LOG(fatal) << "Inconsistent magnetic field values between configurations 0 and " << icfg << ": " << mMagneticField << " vs " << cfgBfield;
}
}

pc.services().get<o2::framework::ControlService>().endOfStream();
pc.services().get<o2::framework::ControlService>().readyToQuit(o2::framework::QuitRequest::Me);
}

void processDummy(o2::aod::McCollisions const&)
void process(o2::aod::McCollisions const&)
{
}
PROCESS_SWITCH(OnTheFlyDetectorGeometryProvider, processDummy, "process dummy", false);
};

// #define VERIFY_ALICE3
Expand Down
Loading