+ //
+ // Initialize the manager. This tries to read the parameters from
+ // CDB. If that fails, the class uses the hard-coded parameters.
+ //
+ // Parameters:
+ // pp Preprocessor
+ // forceReInit Force (re-)initalize flag
+ // what What to initialize
+ //
+ if (forceReInit) fIsInit = kFALSE;
+ CheckForNewRun();
+
+ if (fIsInit) return 0;
+
+ UShort_t errMask = 0;
+ if (what & kPulseGain) errMask |= InitPulseGain(pp);
+ if (what & kPedestal) errMask |= InitPedestal(pp);
+ if (what & kDeadMap) errMask |= InitDeadMap(pp);
+ if (what & kSampleRate) errMask |= InitSampleRate(pp);
+ if (what & kZeroSuppression) errMask |= InitZeroSuppression(pp);
+ if (what & kAltroMap) errMask |= InitAltroMap(pp);
+ if (what & kStripRange) errMask |= InitStripRange(pp);
+ fIsInit = kTRUE;
+
+ return errMask;
+}
+
+//__________________________________________________________________
+Bool_t
+AliFMDParameters::CheckFile(const char* prefix,
+ const char* path,
+ int number,
+ TString& f) const
+{
+ //
+ // Check if the file <i>prefix</i><i>number</i> exists in @a path,
+ // and write the full path to @a f.
+ //
+ // Parameters:
+ // prefix File prefix (cond, peds, gains, ...)
+ // path Path to files
+ // number Detector number (1, 2, or 3)
+ // f On return full path to file (if found)
+ //
+ // Return:
+ // @c true if file exists and is readable, @c false otherwise
+ //
+ f = (Form("%s%d.csv", prefix, number));
+ AliFMDDebug(5, ("Checking if %s exists in %s ...", f.Data(), path));
+ f = gSystem->Which(path, f.Data());
+ AliFMDDebug(5, ("Got back '%s'", f.Data()));
+ return !f.IsNull();
+}
+
+//__________________________________________________________________
+UShort_t
+AliFMDParameters::Init(const char* path, Bool_t forceReInit, UInt_t what)
+{
+ //
+ // Initialize the manager. This will try to read some calibrations
+ // (sample rate, strip range, gains, pedestals) from local comma
+ // separated value (CSV) files in the directory pointed at by @a
+ // path. If they are not found, then they will be retrieved from
+ // OCDB as appropriately. Other calibrations are always read from
+ // OCDB.
+ //
+ // The CSV files should be named as
+ //
+ // - Pedestals: <tt>peds</tt><i>det_number</i><tt>.csv</tt>
+ // - Gains: <tt>gains</tt><i>det_number</i><tt>.csv</tt>
+ // - Sample Rate: <tt>conditions</tt><i>det_number</i><tt>.csv</tt>
+ // - Strip Range: <tt>conditions</tt><i>det_number</i><tt>.csv</tt>
+ //
+ // where <i>det_number</i> is the detector number (1, 2, or 3).
+ //
+ // Parameters:
+ // path Where to look for the CSV files
+ // forceReInit Always reinitialise
+ // what What calibrations to load.
+ //