Skip to content
Snippets Groups Projects
Commit 07e57ab4 authored by R D Schaffer's avatar R D Schaffer
Browse files

since DCS has time-stamp IOV, for IOV when DCS currents say that solenoid or...

since DCS has time-stamp IOV, for IOV when DCS currents say that solenoid or toroid is off, use just the current run number
parent 23936c6f
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!35545no longer running updateCurrentxx if LockMapCurrents is true for AtlasFieldCacheCondAlg
...@@ -214,6 +214,8 @@ MagField::AtlasFieldMapCondAlg::updateFieldMap(const EventContext& ctx, Cache& c ...@@ -214,6 +214,8 @@ MagField::AtlasFieldMapCondAlg::updateFieldMap(const EventContext& ctx, Cache& c
else { else {
// For normal athena jobs, check the currents in DCS to check if one of the two magnets // For normal athena jobs, check the currents in DCS to check if one of the two magnets
// is OFF so that the correct map can be used. // is OFF so that the correct map can be used.
// If a field is off, set an IOV validity range to be the current run only.
// (Note DCS currents have a timestamp-based IOV, so this is not used.)
// Note: for the nominal maps from COOL, three maps are available: // Note: for the nominal maps from COOL, three maps are available:
// - Global with both solenoid and toroid // - Global with both solenoid and toroid
...@@ -225,35 +227,25 @@ MagField::AtlasFieldMapCondAlg::updateFieldMap(const EventContext& ctx, Cache& c ...@@ -225,35 +227,25 @@ MagField::AtlasFieldMapCondAlg::updateFieldMap(const EventContext& ctx, Cache& c
EventIDRange rangeDCS; EventIDRange rangeDCS;
ATH_CHECK( checkCurrentFromConditions(ctx, soleCurrent, toroCurrent, rangeDCS) ); ATH_CHECK( checkCurrentFromConditions(ctx, soleCurrent, toroCurrent, rangeDCS) );
bool useDCSIOVRange = false; bool mustCreateIOVRange = false;
if (soleCurrent < m_soleMinCurrent) { if (soleCurrent < m_soleMinCurrent) {
cache.m_mapSoleCurrent = 0; cache.m_mapSoleCurrent = 0;
useDCSIOVRange = true; mustCreateIOVRange = true;
ATH_MSG_INFO("updateFieldMap: set solenoid current to 0 from DCS"); ATH_MSG_INFO("updateFieldMap: set solenoid current to 0 from DCS");
} }
if (toroCurrent < m_toroMinCurrent) { if (toroCurrent < m_toroMinCurrent) {
cache.m_mapToroCurrent = 0; cache.m_mapToroCurrent = 0;
useDCSIOVRange = true; mustCreateIOVRange = true;
ATH_MSG_INFO("updateFieldMap: set toroid current to 0 from DCS"); ATH_MSG_INFO("updateFieldMap: set toroid current to 0 from DCS");
} }
if (useDCSIOVRange) { if (mustCreateIOVRange) {
// Construct range - from DCS range, if not a TimeStamp IOV // The currents from DCS are zero for either solenoid or toroid, construct an range for one run
EventIDBase start, stop; EventIDBase start, stop;
if (rangeDCS.start().isTimeStamp()) { // use ctx run number
// use ctx run number start.set_run_number(ctx.eventID().run_number());
start.set_run_number(ctx.eventID().run_number()); start.set_lumi_block(0);
start.set_lumi_block(0); stop.set_run_number(ctx.eventID().run_number() + 1);
stop.set_run_number(ctx.eventID().run_number() + 1); stop.set_lumi_block(0);
stop.set_lumi_block(0);
}
else {
// not just time stamp, use the DCS run number
// - require validity to be at least one full run
start.set_run_number(rangeDCS.start().run_number());
start.set_lumi_block(0);
stop.set_run_number(std::max(rangeDCS.start().run_number() + 1, rangeDCS.stop().run_number()));
stop.set_lumi_block(0);
}
cache.m_mapCondObjOutputRange = EventIDRange(start,stop); cache.m_mapCondObjOutputRange = EventIDRange(start,stop);
ATH_MSG_INFO("updateFieldMap: map IOV range " << cache.m_mapCondObjOutputRange); ATH_MSG_INFO("updateFieldMap: map IOV range " << cache.m_mapCondObjOutputRange);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment