improved attribute handling for NeXus IDF 1

This commit is contained in:
nemu
2011-12-22 13:51:04 +00:00
parent 7e2ea62ac3
commit e76399634f
3 changed files with 55 additions and 18 deletions

View File

@ -3751,7 +3751,7 @@ Bool_t PRunDataHandler::WriteNexusFile(TString fln)
nxs->GetEntryIdf1()->GetInstrument()->GetDetector()->SetNumber(fData[0].GetNoOfHistos());
nxs->GetEntryIdf1()->GetInstrument()->GetCollimator()->SetType("n/a");
// calculate the total number of counts
int total_counts = 0;
double total_counts = 0;
for (unsigned int i=0; i<fData[0].GetNoOfHistos(); i++) {
for (unsigned int j=0; j<fData[0].GetDataBin(i)->size(); j++)
total_counts += fData[0].GetDataBin(i)->at(j);