HDF5Group group = root.requireSubgroup(key);
double normFactor = (double) trajectoryCount;
String transitionName;
HDF5Dataset ds;
double gcf, gbf, gnf;
double ecf, ebf, enf;
int[][] emptyData = new int[][] { { 0 } };
for (XRayTransition transition : accumCharac.getTransitions()) {
transitionName = transition.getIUPACName();
ds = group.createDataset(transitionName, emptyData);
gnf = accumCharac.getGenerated(transition) / normFactor;
enf = accumCharac.getEmitted(transition) / normFactor;
gcf = ecf = 0.0;
if (accumCharacFluo != null) {
gcf = accumCharacFluo.getGenerated(transition) / normFactor;
ecf = accumCharacFluo.getEmitted(transition) / normFactor;
}
gbf = ebf = 0.0;
if (accumBremssFluo != null) {
gbf = accumBremssFluo.getGenerated(transition) / normFactor;
ebf = accumBremssFluo.getEmitted(transition) / normFactor;
}
ds.setAttribute("gcf", gcf, 0.0);
ds.setAttribute("gbf", gbf, 0.0);
ds.setAttribute("gnf", gnf, 0.0);
ds.setAttribute("gt", gnf + gcf + gbf, 0.0);
ds.setAttribute("ecf", ecf, 0.0);
ds.setAttribute("ebf", ebf, 0.0);
ds.setAttribute("enf", enf, 0.0);
ds.setAttribute("et", enf + ecf + ebf, 0.0);
}
}