how to get the CFG information in a new analysis action?

Dear All,
I want to add a command option in Clang to analyze the cfg information.
I have modified the Driver of Clang. Also, the CompilerInstance has been modified partly.
In the directory “lib\frontendtool\ExecuteCompilerInvocation.cpp”, I add some codes as follows(with the color red):
static FrontendAction * CreateFrontendBaseAction(CompilerInstance &CI){

case RunANewAnalysis: ////////this case is added by myself
return new ento::NewAnalysisAction();

Now my question is that who(which class or object) deals with the new acti! on.
Then how should I do to get the cfg information?
I also create the NewAnalysisAction with the return value *ASTConsumer.
But I have no idea that how to deal with the ASTConsumer, and how to translate to cfg then.