porting L1 code to new DQM interface

this PR supersedes #5996 
@jingyucms

to be tested