28 TFile flGRPMagField(fname.c_str());
29 if (flGRPMagField.IsZombie()) {
30 LOG(error) <<
"Failed to open " << fname;
31 throw std::runtime_error(
"Failed to open GRP Mag Field file");
35 throw std::runtime_error(fmt::format(
"Failed to load GRP Mag Field object from {}", fname));
42 printf(
"magnet currents (A) L3 = %.3f, Dipole = %.f; uniformity = %s\n",
getL3Current(),
getDipoleCurrent(), mUniformField ?
"true" :
"false");
45o2::units::Current_t GRPMagField::checkDipoleOverride()
47 static float v = getenv(
"O2_OVERRIDE_DIPOLE_CURRENT") ? atof(getenv(
"O2_OVERRIDE_DIPOLE_CURRENT")) : NOOVERRIDEVAL;
48 static bool alarmShown =
false;
49 if (
v != NOOVERRIDEVAL && !alarmShown) {
50 LOGP(error,
"Overriding DIPOLE current to {}",
v);
56o2::units::Current_t GRPMagField::checkL3Override()
58 static float v = getenv(
"O2_OVERRIDE_L3_CURRENT") ? atof(getenv(
"O2_OVERRIDE_L3_CURRENT")) : NOOVERRIDEVAL;
59 static bool alarmShown =
false;
60 if (
v != NOOVERRIDEVAL && !alarmShown) {
61 LOGP(error,
"Overriding L3 current to {}",
v);
Header of the General Run Parameters object for B field values.
Definition of the Names Generator class.
static constexpr std::string_view CCDBOBJECT
static std::string getGRPMagFieldFileName(const std::string_view prefix=STANDARDSIMPREFIX)
o2::units::Current_t getDipoleCurrent() const
o2::units::Current_t getL3Current() const
getters/setters for magnets currents
static GRPMagField * loadFrom(const std::string &grpMagFieldFileName="")
void print() const
print itself
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"