bug fix on MutliBuilder

This commit is contained in:
carina@hades 2023-10-05 13:19:45 -04:00
parent 59af8a4c6d
commit 1c25b44ce2
4 changed files with 6 additions and 7 deletions

View File

@ -93,8 +93,8 @@ int main(int argc, char **argv){
if (argc <= 1) {
printf("Incorrect number of arguments:\n");
printf("%s [inFile] [DPPType] \n", argv[0]);
printf(" +-- PHA = %d\n", V1730_DPP_PHA_CODE);
printf(" +-- PSD = %d\n", V1730_DPP_PSD_CODE);
printf(" +-- PHA = %d\n", DPPType::DPP_PHA_CODE);
printf(" +-- PSD = %d\n", DPPType::DPP_PSD_CODE);
return 1;
}

View File

@ -75,8 +75,8 @@ int main(int argc, char **argv) {
TString typeStr = &inFileName[i][snPos+9];
typeStr.Resize(3);
if( typeStr == "PHA" ) type[i] = V1730_DPP_PHA_CODE;
if( typeStr == "PSD" ) type[i] = V1730_DPP_PSD_CODE;
if( typeStr == "PHA" ) type[i] = DPPType::DPP_PHA_CODE;
if( typeStr == "PSD" ) type[i] = DPPType::DPP_PSD_CODE;
int order = atoi(&inFileName[i][snPos+13]);
ID[i] = sn + order * 1000;

View File

@ -199,7 +199,7 @@ void MultiBuilder::BuildEvents(bool isFinal, bool skipTrace, bool verbose){
em.fineTime = data[bd]->fineTime[ch][nextIndex[bd][ch]];
if( !skipTrace ) em.trace = data[bd]->Waveform1[ch][nextIndex[bd][ch]];
if( typeList[bd] == V1730_DPP_PSD_CODE ) em.energy2 = data[bd]->Energy2[ch][nextIndex[bd][ch]];
if( typeList[bd] == DPPType::DPP_PSD_CODE ) em.energy2 = data[bd]->Energy2[ch][nextIndex[bd][ch]];
events[eventIndex].push_back(em);
nextIndex[bd][ch]++;
@ -300,7 +300,7 @@ void MultiBuilder::BuildEventsBackWard(int maxNumEvent, bool verbose){
em.ch = ch;
em.energy = data[bd]->Energy[ch][nextIndex[bd][ch]];
em.timestamp = time;
if( typeList[bd] == V1730_DPP_PSD_CODE ) em.energy2 = data[bd]->Energy2[ch][nextIndex[bd][ch]];
if( typeList[bd] == DPPType::DPP_PSD_CODE ) em.energy2 = data[bd]->Energy2[ch][nextIndex[bd][ch]];
events[eventIndex].push_back(em);
nextIndex[bd][ch]--;

View File

@ -2,7 +2,6 @@
#define MuLTI_BUILDER_H
#include "ClassData.h"
#include "ClassDigitizer.h"
#define MaxNEvent 100000 // circular, this number should be at least nDigi * MaxNChannel * MaxNData