def METHOD_NAME():
    doc="""
    LPGTA data processing routine. 
    You must set these environment variables:
      * $LPGTA_DATA : base data directory
      * $LEGEND_META : the legend-metadata repository
    """
    rthf = argparse.RawTextHelpFormatter
    par = argparse.ArgumentParser(description=doc, formatter_class=rthf)
    arg, st, sf = par.add_argument, 'store_true', 'store_false'
    # routines
    arg('-d2r','--d2r', action=st, help='run daq_to_raw')
    arg('-r2d','--r2d', action=st, help='run raw_to_dsp')
    arg('-st' ,'--st' , nargs=1  , help='define the scantype')
    arg('-det','--det', nargs=1  , help='define the detector') 
    # options
    arg('--over', action=st, help='overwrite existing files')
    args = par.parse_args()
    argsv = vars(par.parse_args())
    expDB = 'HADES.json'
    dg = DataGroup(config=expDB)
    st, det = '', '' 
    if argsv['st']:
       st = argsv['st'][0]
    if argsv['det']:
       det = argsv['det'][0]
    if args.d2r: d2r(dg, st, det, args.over)
    if args.r2d: r2d(dg, st, det, args.over)