Fix conflicting checks.

The if statement would never be true.
With this fix the functionality is preserved with some more information in case of error.
Merged refs/pull/5634/head from repository cms-sw
guard against blank lines in db.tct
make Vladimirs change const correct
Merge pull request #5643 from davidlange6/fix_SimG4CoreGenerators

Fix sim g4 core generators
Merge pull request #5637 from gartung/clangSA-fix-data-products-report-gen

Guard against blank lines in db.txt which cause tlf2esd.txt report to not be generated.