Skip to content
Snippets Groups Projects
Commit c3acf601 authored by Stephen A. Wood's avatar Stephen A. Wood
Browse files

Add _ti_ps_factors[] array with prescale factors computed from exponents

parent f7a48cb1
No related branches found
No related tags found
No related merge requests found
...@@ -233,11 +233,20 @@ void THcConfigEvtHandler::MakeParms(Int_t roc) ...@@ -233,11 +233,20 @@ void THcConfigEvtHandler::MakeParms(Int_t roc)
Int_t sync_count = cinfo->TI.sync_count; Int_t sync_count = cinfo->TI.sync_count;
gHcParms->Define(Form("g%s_ti_sync_count",fName.Data()),"Number of Pedestal events",sync_count); gHcParms->Define(Form("g%s_ti_sync_count",fName.Data()),"Number of Pedestal events",sync_count);
Int_t *prescales = new Int_t[cinfo->TI.num_prescales]; Int_t *ps_exps = new Int_t[cinfo->TI.num_prescales];
Int_t *ps_factors = new Int_t[cinfo->TI.num_prescales];
for(Int_t i=0;i<cinfo->TI.num_prescales;i++) { for(Int_t i=0;i<cinfo->TI.num_prescales;i++) {
prescales[i] = cinfo->TI.prescales[i]; ps_exps[i] = cinfo->TI.prescales[i];
if(ps_exps[i] > 0) {
ps_factors[i] = 1<<(ps_exps[i]-1) + 1;
} else if (ps_exps[i] == 0) {
ps_factors[i] = 1;
} else {
ps_factors[i] = -1;
}
} }
gHcParms->Define(Form("g%s_ti_ps[%d]",fName.Data(),cinfo->TI.num_prescales),"TI Event Prescaler settings",*prescales); gHcParms->Define(Form("g%s_ti_ps[%d]",fName.Data(),cinfo->TI.num_prescales),"TI Event Prescaler settings",*ps_exps);
gHcParms->Define(Form("g%s_ti_ps_factors[%d]",fName.Data(),cinfo->TI.num_prescales),"TI Event Prescaler settings",*ps_exps);
} }
} }
it++; it++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment