Code migrated from http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/ferencek/HCAL_Pedestal_Tuning/