Prepare for taking MF configurations from DB

Includes:
-Tools to create .db files for standard configurations 
-Fix for one numerical stability problem with geometries imported to DB. The problem did not affect existing configurations (with geometry coming from xml), and the fix was regression-tested.

This fix is needed to be able to finally switch to reading MF geometry and configuration from DB, which will happen in a future (pre)release once a GT with all required payloads becomes available.

Hi Nicola,

We are moving towards running multithreaded by default
and it's the first time since ever.
I tried to ward off some future issues, but whatever in this case

On 11/21/14, 7:14 AM, Nicola Amapane wrote:
> In MagneticField/GeomBuilder/src/MagGeoBuilderFromDDD.cc:
> 
>>    for (int i = 0; i<nESectors; ++i) {
>> -    int offset = eVolumes.size()/nESectors;
>> -    if (debug) cout << " Sector at phi = "
>> -		    << (*(eVolumes.begin()+((i)*offset)))->center().phi()
>> -		    << endl;
>> +    if (debug) {
>> +      cout << " Sector at phi = "
>> +	   << (*(eVolumes.begin()+((i)*offset)))->center().phi()
>> +	   << endl;
> 
> Dear Slava, In the 10 year lifetime of this code, nobody has been
> running it in debug mode other than me. With all due respect, I really
> doubt you even know how make a sense of what the debug mode would do.
> When I'll need to test it in a multi-threaded mode, I will take care of
> the needed modifications. Before that, it's just a waste of time.
> Cheers, Nicola
> … <#>
> On 21-Nov-14 14:09, Slava Krutelyov wrote: In
> MagneticField/GeomBuilder/src/MagGeoBuilderFromDDD.cc: > for (int i = 0;
> i<nESectors; ++i) { > - int offset = eVolumes.size()/nESectors; > - if
> (debug) cout << " Sector at phi = " > - <<
> (*(eVolumes.begin()+((i)*offset)))->center().phi() > - << endl; > + if
> (debug) { > + cout << " Sector at phi = " > + <<
> (*(eVolumes.begin()+((i)*offset)))->center().phi() > + << endl; Hi
> Nicola, If we were to test this in multi-threaded mode, cout may give
> garbage output. edm::LogPrint behaves visually exactly as cout (and is
> enabled by default, because it's a verbatim equivalent of a LogWarning).
> A change is rather trivial. … <#> On 11/21/14, 6:46 AM, Nicola Amapane
> wrote: In MagneticField/GeomBuilder/src/MagGeoBuilderFromDDD.cc: > for
> (int i = 0; i<nESectors; ++i) { > - int offset =
> eVolumes.size()/nESectors; > - if (debug) cout << " Sector at phi = " >
> - << (*(eVolumes.begin()+((i)*offset)))->center().phi() > - << endl; > +
> if (debug) { > + cout << " Sector at phi = " > + <<
> (*(eVolumes.begin()+((i)*offset)))->center().phi() > + << endl; As I
> wrote, this is also something that activates much more checks than just
> printing a message (elsewhere in this class). There is no point in
> changing messages here because messages are issued only when running in
> debugging mode, and logDebug does not help here. — Reply to this email
> directly or view it on GitHub
> <https://github.com/cms-sw/cmssw/pull/6514/files#r20712559>. --
> ***********************************************************************
> Vyacheslav (Slava) Krutelyov TAMU: Physics Dept Texas A&M MS4242,
> College Station, TX 77843-4242 CERN: 42-R-027 AIM/Skype: siava16
> googleTalk: slava77@gmail.com (630) 291-5128 Cell (US) +41 76 275 7116
> Cell (CERN)
> -----------------------------------------------------------------------
> — Reply to this email directly or view it on GitHub
> <https://github.com/cms-sw/cmssw/pull/6514/files#r20713625>.
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/cms-sw/cmssw/pull/6514/files#r20713769>.
> 

-- 
***********************************************************************
 Vyacheslav (Slava) Krutelyov
 TAMU: Physics Dept Texas A&M MS4242, College Station, TX 77843-4242
 CERN: 42-R-027
 AIM/Skype: siava16              googleTalk: slava77@gmail.com
 (630) 291-5128  Cell (US)       +41 76 275 7116 Cell (CERN)

-----------------------------------------------------------------------