How do the class G4TScoreNtupleWriter work in exampleB3a?

In the examples of basic exampleB3a,the code below:

G4TScoreNtupleWriter scoreNtupleWriter;
scoreNtupleWriter.SetVerboseLevel(1);

generate the root files:

scoring.root
scoring_t0.root
scoring_t1.root

but how do this class G4TScoreNtupleWriter works?