improved ClassData and MultiBuilder
This commit is contained in:
parent
87d833503e
commit
0177be09cc
|
@ -9,6 +9,7 @@
|
||||||
#include "TTree.h"
|
#include "TTree.h"
|
||||||
|
|
||||||
#define MAX_MULTI 100
|
#define MAX_MULTI 100
|
||||||
|
#define BUFFERFILL 0.5 // only 0.5 * MAXNData will be filled in memeory each time
|
||||||
|
|
||||||
template<typename T> void swap(T * a, T *b );
|
template<typename T> void swap(T * a, T *b );
|
||||||
int partition(int arr[], int kaka[], TString file[], int start, int end);
|
int partition(int arr[], int kaka[], TString file[], int start, int end);
|
||||||
|
@ -214,7 +215,7 @@ int main(int argc, char **argv) {
|
||||||
do{
|
do{
|
||||||
|
|
||||||
/// fill the data class with some agg;
|
/// fill the data class with some agg;
|
||||||
bool breakFlag = false;
|
bool fillFlag = true;
|
||||||
do{
|
do{
|
||||||
|
|
||||||
// Get many agg. from each file.
|
// Get many agg. from each file.
|
||||||
|
@ -239,7 +240,7 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
fseek(inFile[i], -4, SEEK_CUR); // rool back
|
fseek(inFile[i], -4, SEEK_CUR); // roll back
|
||||||
|
|
||||||
short header = ((word[0] >> 28 ) & 0xF);
|
short header = ((word[0] >> 28 ) & 0xF);
|
||||||
if( header != 0xA ) break;
|
if( header != 0xA ) break;
|
||||||
|
@ -270,19 +271,33 @@ int main(int argc, char **argv) {
|
||||||
//printf("-----------------------------------\n");
|
//printf("-----------------------------------\n");
|
||||||
for( int i = 0; i < nGroup; i++){
|
for( int i = 0; i < nGroup; i++){
|
||||||
for( int ch = 0; ch < data[i]->GetNChannel(); ch ++){
|
for( int ch = 0; ch < data[i]->GetNChannel(); ch ++){
|
||||||
if( data[i]->LoopIndex[ch]*MaxNData + data[i]->DataIndex[ch] - lastLoopIndex[i][ch]*MaxNData - lastDataIndex[i][ch] > MaxNData * 0.5 ) {
|
|
||||||
breakFlag = true;
|
int iData = data[i]->DataIndex[ch];
|
||||||
//printf("digi:%d | ch: %d DataIndex: %d (%d) \n", data[i]->boardSN, ch, data[i]->DataIndex[ch], lastDataIndex[i][ch]);
|
int iLoop = data[i]->LoopIndex[ch];
|
||||||
|
|
||||||
|
if( (iLoop*MaxNData + iData) - (lastLoopIndex[i][ch]*MaxNData + lastDataIndex[i][ch]) > MaxNData * BUFFERFILL ) {
|
||||||
|
fillFlag = false;
|
||||||
}
|
}
|
||||||
lastDataIndex[i][ch] = data[i]->DataIndex[ch];
|
|
||||||
lastLoopIndex[i][ch] = data[i]->LoopIndex[ch];
|
//unsigned long long t1 = data[i]->Timestamp[ch][iData];
|
||||||
|
//printf("digi:%d | ch: %2d DataIndex: %5d (%d) [%5d(%d)] | %llu\n", data[i]->boardSN, ch, iData, iLoop, lastDataIndex[i][ch], lastLoopIndex[i][ch], t1);
|
||||||
|
|
||||||
}
|
}
|
||||||
//printf("%3d | agg : %d | %s\n", snList[i], aggCount[i], breakFlag ? "Break" : "cont." );
|
//printf("%3d | agg : %d | %u | %s\n", snList[i], aggCount[i], data[i]->aggTime, fillFlag ? "cont. fill" : "break." );
|
||||||
|
//data[i]->PrintStat();
|
||||||
}
|
}
|
||||||
|
|
||||||
}while(breakFlag);
|
}while(fillFlag);
|
||||||
|
|
||||||
|
for( int i = 0; i < nGroup; i++){
|
||||||
|
for( int ch = 0; ch < data[i]->GetNChannel(); ch ++){
|
||||||
|
lastDataIndex[i][ch] = data[i]->DataIndex[ch];
|
||||||
|
lastLoopIndex[i][ch] = data[i]->LoopIndex[ch];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mb->BuildEvents(0, 0, debug);
|
mb->BuildEvents(0, 0, debug);
|
||||||
|
//mb->PrintStat();
|
||||||
|
|
||||||
///----------- save to tree;
|
///----------- save to tree;
|
||||||
long startIndex = mb->eventIndex - mb->eventBuilt + 1;
|
long startIndex = mb->eventIndex - mb->eventBuilt + 1;
|
||||||
|
@ -329,6 +344,7 @@ int main(int argc, char **argv) {
|
||||||
printf("------------------- build the last data\n");
|
printf("------------------- build the last data\n");
|
||||||
|
|
||||||
mb->BuildEvents(1, 0, debug);
|
mb->BuildEvents(1, 0, debug);
|
||||||
|
//mb->PrintStat();
|
||||||
|
|
||||||
///----------- save to tree;
|
///----------- save to tree;
|
||||||
long startIndex = mb->eventIndex - mb->eventBuilt + 1;
|
long startIndex = mb->eventIndex - mb->eventBuilt + 1;
|
||||||
|
|
151
ClassData.h
151
ClassData.h
|
@ -42,6 +42,8 @@ class Data{
|
||||||
unsigned short NumEventsDecoded [MaxNChannels]; /// reset at every decode
|
unsigned short NumEventsDecoded [MaxNChannels]; /// reset at every decode
|
||||||
unsigned short NumNonPileUpDecoded [MaxNChannels]; /// reset at every decode
|
unsigned short NumNonPileUpDecoded [MaxNChannels]; /// reset at every decode
|
||||||
|
|
||||||
|
unsigned int aggTime; /// update every decode
|
||||||
|
|
||||||
/// store data for event building and deduce the trigger rate.
|
/// store data for event building and deduce the trigger rate.
|
||||||
//it is a circular memory
|
//it is a circular memory
|
||||||
bool IsNotRollOverFakeAgg;
|
bool IsNotRollOverFakeAgg;
|
||||||
|
@ -415,8 +417,8 @@ inline void Data::DecodeBuffer(bool fastDecode, int verbose){
|
||||||
if( verbose >= 1 ) printf("Board Agg Counter : %u \n", bdAggCounter & 0x7FFFFF);
|
if( verbose >= 1 ) printf("Board Agg Counter : %u \n", bdAggCounter & 0x7FFFFF);
|
||||||
|
|
||||||
nw = nw + 1;
|
nw = nw + 1;
|
||||||
unsigned int bdAggTimeTag = ReadBuffer(nw, verbose);
|
aggTime = ReadBuffer(nw, verbose);
|
||||||
if( verbose >= 2 ) printf("Agg Time Tag : %u \n", bdAggTimeTag);
|
if( verbose >= 1 ) printf("Agg Time Tag : %u \n", aggTime);
|
||||||
|
|
||||||
for( int chMask = 0; chMask < 8 ; chMask ++ ){ // the max numnber of Coupled/RegChannel is 8 for PHA, PSD, QDC
|
for( int chMask = 0; chMask < 8 ; chMask ++ ){ // the max numnber of Coupled/RegChannel is 8 for PHA, PSD, QDC
|
||||||
if( ((ChannelMask >> chMask) & 0x1 ) == 0 ) continue;
|
if( ((ChannelMask >> chMask) & 0x1 ) == 0 ) continue;
|
||||||
|
@ -583,35 +585,37 @@ inline int Data::DecodePHADualChannelBlock(unsigned int ChannelMask, bool fastDe
|
||||||
case 7: printf("Reserved\n"); break;
|
case 7: printf("Reserved\n"); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("...... Analog Probe 1 : ");
|
if( hasWaveForm ){
|
||||||
switch (analogProbe1 ){
|
printf("...... Analog Probe 1 : ");
|
||||||
case 0 : printf("Input \n"); break;
|
switch (analogProbe1 ){
|
||||||
case 1 : printf("RC-CR (1st derivative) \n"); break;
|
case 0 : printf("Input \n"); break;
|
||||||
case 2 : printf("RC-CR2 (2st derivative) \n"); break;
|
case 1 : printf("RC-CR (1st derivative) \n"); break;
|
||||||
case 3 : printf("trapazoid \n"); break;
|
case 2 : printf("RC-CR2 (2st derivative) \n"); break;
|
||||||
}
|
case 3 : printf("trapazoid \n"); break;
|
||||||
printf("...... Analog Probe 2 : ");
|
}
|
||||||
switch (analogProbe2 ){
|
printf("...... Analog Probe 2 : ");
|
||||||
case 0 : printf("Input \n"); break;
|
switch (analogProbe2 ){
|
||||||
case 1 : printf("Theshold \n"); break;
|
case 0 : printf("Input \n"); break;
|
||||||
case 2 : printf("trapezoid - baseline \n"); break;
|
case 1 : printf("Theshold \n"); break;
|
||||||
case 3 : printf("baseline \n"); break;
|
case 2 : printf("trapezoid - baseline \n"); break;
|
||||||
}
|
case 3 : printf("baseline \n"); break;
|
||||||
printf("...... Digital Probe : ");
|
}
|
||||||
switch (digitalProbe ){
|
printf("...... Digital Probe : ");
|
||||||
case 0 : printf("Peaking \n"); break;
|
switch (digitalProbe ){
|
||||||
case 1 : printf("Armed (trigger) \n"); break;
|
case 0 : printf("Peaking \n"); break;
|
||||||
case 2 : printf("Peak Run \n"); break;
|
case 1 : printf("Armed (trigger) \n"); break;
|
||||||
case 3 : printf("Pile up \n"); break;
|
case 2 : printf("Peak Run \n"); break;
|
||||||
case 4 : printf("Peaking \n"); break;
|
case 3 : printf("Pile up \n"); break;
|
||||||
case 5 : printf("Trigger Validation Window \n"); break;
|
case 4 : printf("Peaking \n"); break;
|
||||||
case 6 : printf("Baseline for energy calculation \n"); break;
|
case 5 : printf("Trigger Validation Window \n"); break;
|
||||||
case 7 : printf("Trigger holdoff \n"); break;
|
case 6 : printf("Baseline for energy calculation \n"); break;
|
||||||
case 8 : printf("Trigger Validation \n"); break;
|
case 7 : printf("Trigger holdoff \n"); break;
|
||||||
case 9 : printf("ACQ Busy \n"); break;
|
case 8 : printf("Trigger Validation \n"); break;
|
||||||
case 10 : printf("Trigger window \n"); break;
|
case 9 : printf("ACQ Busy \n"); break;
|
||||||
case 11 : printf("Ext. Trigger \n"); break;
|
case 10 : printf("Trigger window \n"); break;
|
||||||
case 12 : printf("Busy = memory is full \n"); break;
|
case 11 : printf("Ext. Trigger \n"); break;
|
||||||
|
case 12 : printf("Busy = memory is full \n"); break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -805,7 +809,7 @@ inline int Data::DecodePSDDualChannelBlock(unsigned int ChannelMask, bool fastDe
|
||||||
if( hasExtra ){
|
if( hasExtra ){
|
||||||
printf(".... extra : ");
|
printf(".... extra : ");
|
||||||
switch(extraOption){
|
switch(extraOption){
|
||||||
case 0: printf("[0:15] trapwzoid baseline * 4 [16:31] Extended timestamp (16-bit)\n"); break;
|
case 0: printf("[0:15] baseline * 4 [16:31] Extended timestamp (16-bit)\n"); break;
|
||||||
case 1: printf("[0:11] reserved [12] lost trigger counted [13] 1024 trigger counted [14] Over-range\n");
|
case 1: printf("[0:11] reserved [12] lost trigger counted [13] 1024 trigger counted [14] Over-range\n");
|
||||||
printf("[15] trigger lost [16:31] Extended timestamp (16-bit)\n"); break;
|
printf("[15] trigger lost [16:31] Extended timestamp (16-bit)\n"); break;
|
||||||
case 2: printf("[0:9] Fine time stamp [10:15] flag [10:15] Reserved [16:31] Extended timestamp (16-bit)\n"); break;
|
case 2: printf("[0:9] Fine time stamp [10:15] flag [10:15] Reserved [16:31] Extended timestamp (16-bit)\n"); break;
|
||||||
|
@ -816,41 +820,46 @@ inline int Data::DecodePSDDualChannelBlock(unsigned int ChannelMask, bool fastDe
|
||||||
case 7: printf("debug, must be 0x12345678\n"); break;
|
case 7: printf("debug, must be 0x12345678\n"); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf(".... digital Probe 1 : ");
|
if( hasWaveForm ){
|
||||||
switch(digitalProbe1){
|
printf(".... digital Probe 1 : ");
|
||||||
case 0 : printf("Long gate \n"); break;
|
switch(digitalProbe1){
|
||||||
case 1 : printf("Over threshold \n"); break;
|
case 0 : printf("Long gate \n"); break;
|
||||||
case 2 : printf("Shaped TRG \n"); break;
|
case 1 : printf("Over threshold \n"); break;
|
||||||
case 3 : printf("TRG Val. Acceptance \n"); break;
|
case 2 : printf("Shaped TRG \n"); break;
|
||||||
case 4 : printf("Pile-Up \n"); break;
|
case 3 : printf("TRG Val. Acceptance \n"); break;
|
||||||
case 5 : printf("Coincidence \n"); break;
|
case 4 : printf("Pile-Up \n"); break;
|
||||||
case 6 : printf("Reserved \n"); break;
|
case 5 : printf("Coincidence \n"); break;
|
||||||
case 7 : printf("Trigger \n"); break;
|
case 6 : printf("Reserved \n"); break;
|
||||||
}
|
case 7 : printf("Trigger \n"); break;
|
||||||
printf(".... digital Probe 2 : ");
|
|
||||||
switch(digitalProbe2){
|
|
||||||
case 0 : printf("Short gate \n"); break;
|
|
||||||
case 1 : printf("Over threshold \n"); break;
|
|
||||||
case 2 : printf("TRG Validation \n"); break;
|
|
||||||
case 3 : printf("TRG HoldOff \n"); break;
|
|
||||||
case 4 : printf("Pile-Up \n"); break;
|
|
||||||
case 5 : printf("Coincidence \n"); break;
|
|
||||||
case 6 : printf("Reserved \n"); break;
|
|
||||||
case 7 : printf("Trigger \n"); break;
|
|
||||||
}
|
|
||||||
printf(".... analog Probe (dual trace : %d): ", hasDualTrace);
|
|
||||||
if( hasDualTrace ) {
|
|
||||||
switch(analogProbe){
|
|
||||||
case 0 : printf("Input and baseline \n"); break;
|
|
||||||
case 1 : printf("CFD and baseline \n"); break;
|
|
||||||
case 2 : printf("Input and CFD \n"); break;
|
|
||||||
}
|
}
|
||||||
}else{
|
printf(".... digital Probe 2 : ");
|
||||||
switch(analogProbe){
|
switch(digitalProbe2){
|
||||||
case 0 : printf("Input \n"); break;
|
case 0 : printf("Short gate \n"); break;
|
||||||
case 1 : printf("CFD \n"); break;
|
case 1 : printf("Over threshold \n"); break;
|
||||||
|
case 2 : printf("TRG Validation \n"); break;
|
||||||
|
case 3 : printf("TRG HoldOff \n"); break;
|
||||||
|
case 4 : printf("Pile-Up \n"); break;
|
||||||
|
case 5 : printf("Coincidence \n"); break;
|
||||||
|
case 6 : printf("Reserved \n"); break;
|
||||||
|
case 7 : printf("Trigger \n"); break;
|
||||||
|
}
|
||||||
|
printf(".... analog Probe (dual trace : %d): ", hasDualTrace);
|
||||||
|
if( hasDualTrace ) {
|
||||||
|
switch(analogProbe){
|
||||||
|
case 0 : printf("Input and baseline \n"); break;
|
||||||
|
case 1 : printf("CFD and baseline \n"); break;
|
||||||
|
case 2 : printf("Input and CFD \n"); break;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
switch(analogProbe){
|
||||||
|
case 0 : printf("Input \n"); break;
|
||||||
|
case 1 : printf("CFD \n"); break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !hasExtra && !hasWaveForm) printf("\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nEvents = (aggSize -2) / (nSample/2 + 2 + hasExtra );
|
nEvents = (aggSize -2) / (nSample/2 + 2 + hasExtra );
|
||||||
|
@ -912,6 +921,7 @@ inline int Data::DecodePSDDualChannelBlock(unsigned int ChannelMask, bool fastDe
|
||||||
|
|
||||||
if( hasExtra ){
|
if( hasExtra ){
|
||||||
nw = nw +1 ; word = ReadBuffer(nw, verbose);
|
nw = nw +1 ; word = ReadBuffer(nw, verbose);
|
||||||
|
if( verbose > 2 ) printf("extra \n");
|
||||||
extra = word;
|
extra = word;
|
||||||
extTimeStamp = 0;
|
extTimeStamp = 0;
|
||||||
if( extraOption == 0 || extraOption == 2 ) extTimeStamp = (extra >> 16);
|
if( extraOption == 0 || extraOption == 2 ) extTimeStamp = (extra >> 16);
|
||||||
|
@ -960,10 +970,13 @@ inline int Data::DecodePSDDualChannelBlock(unsigned int ChannelMask, bool fastDe
|
||||||
|
|
||||||
//if( DataIndex[channel] >= MaxNData ) ClearData();
|
//if( DataIndex[channel] >= MaxNData ) ClearData();
|
||||||
|
|
||||||
if( verbose >= 2 ) printf("extra : 0x%08x, Qshort : %d, Qlong : %d \n", extra, Qshort, Qlong);
|
//if( verbose >= 2 ) printf("extra : 0x%08x, Qshort : %d, Qlong : %d \n", extra, Qshort, Qlong);
|
||||||
|
if( verbose == 1 ) printf("ch : %2d, Qshort : %6d, Qlong : %6d, timestamp : %llu\n",
|
||||||
if( verbose >= 1 ) printf("ch : %2d, Qshort : %d, Qlong : %d, timestamp : %llu\n",
|
|
||||||
channel, Qshort, Qlong, timeStamp);
|
channel, Qshort, Qlong, timeStamp);
|
||||||
|
if( verbose >= 2 ) printf("Qshort : %6d, Qlong : %6d, timestamp : %llu\n",
|
||||||
|
Qshort, Qlong, timeStamp);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -998,12 +1011,14 @@ inline int Data::DecodeQDCGroupedChannelBlock(unsigned int ChannelMask, bool fas
|
||||||
|
|
||||||
if( verbose >= 2 ) {
|
if( verbose >= 2 ) {
|
||||||
printf("Charge : %d, Time: %d, Wave : %d, Extra: %d\n", hasEnergy, hasTimeStamp, hasWaveForm, hasExtra);
|
printf("Charge : %d, Time: %d, Wave : %d, Extra: %d\n", hasEnergy, hasTimeStamp, hasWaveForm, hasExtra);
|
||||||
printf(".... analog Probe (%d): ", analogProbe);
|
if( hasWaveForm ){
|
||||||
|
printf(".... analog Probe (%d): ", analogProbe);
|
||||||
switch(analogProbe){
|
switch(analogProbe){
|
||||||
case 0 : printf("Input\n"); break;
|
case 0 : printf("Input\n"); break;
|
||||||
case 1 : printf("Smoothed Input\n"); break;
|
case 1 : printf("Smoothed Input\n"); break;
|
||||||
case 2 : printf("Baseline\n"); break;
|
case 2 : printf("Baseline\n"); break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nEvents = (aggSize -2) / (nSample/2 + 2 + hasExtra );
|
nEvents = (aggSize -2) / (nSample/2 + 2 + hasExtra );
|
||||||
|
|
|
@ -8,6 +8,8 @@ MultiBuilder::MultiBuilder(Data ** multiData, std::vector<int> type, std::vector
|
||||||
snList = sn;
|
snList = sn;
|
||||||
for( int i = 0; i < (int) type.size(); i++) idList.push_back(i);
|
for( int i = 0; i < (int) type.size(); i++) idList.push_back(i);
|
||||||
timeWindow = 100;
|
timeWindow = 100;
|
||||||
|
leftOverTime = 100;
|
||||||
|
breakTime = -1;
|
||||||
ClearEvents();
|
ClearEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +20,8 @@ MultiBuilder::MultiBuilder(Data * singleData, int type, int sn): nData(1){
|
||||||
snList.push_back(sn);
|
snList.push_back(sn);
|
||||||
idList.push_back(0);
|
idList.push_back(0);
|
||||||
timeWindow = 100;
|
timeWindow = 100;
|
||||||
|
leftOverTime = 100;
|
||||||
|
breakTime = -1;
|
||||||
ClearEvents();
|
ClearEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +257,7 @@ void MultiBuilder::BuildEvents(bool isFinal, bool skipTrace, bool verbose){
|
||||||
for( int i = 0; i <(int) events[eventIndex].size(); i++){
|
for( int i = 0; i <(int) events[eventIndex].size(); i++){
|
||||||
int chxxx = events[eventIndex][i].ch;
|
int chxxx = events[eventIndex][i].ch;
|
||||||
int bd = events[eventIndex][i].bd;
|
int bd = events[eventIndex][i].bd;
|
||||||
printf("%02d, %02d | %d | %5d %llu \n", bd, chxxx, nextIndex[bd][chxxx], events[eventIndex][i].energy, events[eventIndex][i].timestamp);
|
printf("%02d, %02d | %5d | %5d %llu \n", bd, chxxx, nextIndex[bd][chxxx], events[eventIndex][i].energy, events[eventIndex][i].timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( nExhaushedCh == nData * MaxNChannels ) {
|
if( nExhaushedCh == nData * MaxNChannels ) {
|
||||||
|
@ -261,16 +265,20 @@ void MultiBuilder::BuildEvents(bool isFinal, bool skipTrace, bool verbose){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
printf("----- next bd : %d, ch : %d, next earlist Time : %llu.\n", earlistDigi, earlistCh, earlistTime);
|
printf("----- next bd : %d, ch : %d, next earlist Time : %llu.\n", earlistDigi, earlistCh, earlistTime);
|
||||||
|
printf("leftOver %llu, breakTime %llu \n", leftOverTime, breakTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !isFinal && latestTime - earlistTime <= timeWindow ) {
|
if( !isFinal ){
|
||||||
if( verbose ) {
|
if( latestTime - earlistTime <= leftOverTime){
|
||||||
printf("######################### left over data for next build, latesTime : %llu.\n", latestTime);
|
if( verbose ) printf("######################### left over data for next build, latesTime : %llu. | leftOverTime : %llu\n", latestTime, leftOverTime);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
if( earlistTime > breakTime ) {
|
||||||
|
if( verbose ) printf("######################### left over data for next build, earlistTime : %llu. | breakTime : %llu\n", earlistTime, breakTime);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}while(nExhaushedCh < nData * MaxNChannels);
|
}while(nExhaushedCh < nData * MaxNChannels);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,8 +45,14 @@ public:
|
||||||
MultiBuilder(Data * singleData, int type, int sn);
|
MultiBuilder(Data * singleData, int type, int sn);
|
||||||
~MultiBuilder();
|
~MultiBuilder();
|
||||||
|
|
||||||
void SetTimeWindow(int ticks) {timeWindow = ticks;}
|
void SetTimeWindow(unsigned short ticks) {timeWindow = ticks;}
|
||||||
int GetTimeWindow() const{return timeWindow;}
|
unsigned short GetTimeWindow() const{return timeWindow;}
|
||||||
|
|
||||||
|
void SetLeftOverTime(unsigned long long ticks) {leftOverTime = ticks;}
|
||||||
|
unsigned long long GetLeftOverTime() const{return leftOverTime;}
|
||||||
|
|
||||||
|
void SetBreakTime(unsigned long long ticks) {breakTime = ticks;}
|
||||||
|
unsigned long long GetBreakTime() const{return breakTime;}
|
||||||
|
|
||||||
unsigned int GetNumOfDigitizer() const {return nData;}
|
unsigned int GetNumOfDigitizer() const {return nData;}
|
||||||
std::vector<int> GetDigiIDList() const {return idList;}
|
std::vector<int> GetDigiIDList() const {return idList;}
|
||||||
|
@ -71,6 +77,8 @@ private:
|
||||||
Data ** data; // assume all data has MaxNChannel (16)
|
Data ** data; // assume all data has MaxNChannel (16)
|
||||||
|
|
||||||
unsigned short timeWindow;
|
unsigned short timeWindow;
|
||||||
|
unsigned long long leftOverTime;
|
||||||
|
unsigned long long breakTime; // timestamp for breaking the event builder
|
||||||
int loopIndex[MaxNDigitizer][MaxNChannels];
|
int loopIndex[MaxNDigitizer][MaxNChannels];
|
||||||
int nextIndex[MaxNDigitizer][MaxNChannels];
|
int nextIndex[MaxNDigitizer][MaxNChannels];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user