Is there a way to conditionally ignore coverpoints?

In reply to rgarcia07:

You can also set the weight after constructing the covergroup.

  covergroup my_cov
    coverpoint addr;
    cp_data: coverpoint data;
  endgroup

my_cov cg;
cg = new
if (cfg=="X")
  cg.cp_data.option.weight = 0;