20 int bankSize = bk_locate(pevent,
fBankName.c_str(),&raw);
23 vector<int> islandSamples;
26 int islandTimestamp = 0;
27 int lastTimestamp = 0;
28 bool firstIsland =
true;
29 for(
int i=0;
i < nBlocks;
i++){
43 int timestamp = ((raw[
i*10+0] & 0x7f) << 20) |
47 bool overflowB0 = ((raw[
i*10+3] & 0x08) != 0);
48 bool overflowA0 = ((raw[
i*10+3] & 0x04) != 0);
49 bool overflowB1 = ((raw[
i*10+3] & 0x02) != 0);
50 bool overflowA1 = ((raw[
i*10+3] & 0x01) != 0);
51 int sampleB0 = (overflowB0 << 12) |
54 int sampleA0 = (overflowA0 << 12) |
55 ((raw[
i*10+5] & 0xf) << 8) |
57 int sampleB1 = (overflowB1 << 12) |
60 int sampleA1 = (overflowA1 << 12) |
61 ((raw[
i*10+8] & 0xf) << 8) |
64 if(timestamp != lastTimestamp + 1) {
66 if(islandSamples.size() > 4) {
75 printf(
"Time = %d, nsamples = %d, char = %c , channel = %d\n",
77 for(
int k=0; k<islandSamples.size(); k++){
78 printf(
"%d ",islandSamples[k]);
82 islandSamples.clear();
87 islandTimestamp = timestamp;
89 lastTimestamp = timestamp;
92 for(
int k=0; k<10; k++){
96 printf(
"fadc=%x t=%2x %2x %2x %2x %2x\n",
i, timestamp,
97 sampleA1, sampleB1, sampleA0,sampleB0);
100 islandSamples.push_back(sampleA1);
101 islandSamples.push_back(sampleB1);
102 islandSamples.push_back(sampleA0);
103 islandSamples.push_back(sampleB0);
118 vector<TOctalFADCIsland> fData_temp;
123 fData_temp.push_back(last);
124 int counter_temp = 0;
int counter = 0;
132 fData_temp.push_back(last);
138 vector<int>&
samples = fData_temp.at(counter_temp).GetSampleVector();
143 for(
int j=0;j<
fData.at(
i).GetNSamples();j++)
145 samples.push_back(
fData.at(
i).GetSample(j));
151 last = fData_temp.at(counter_temp);