Skip to content

Commit 243f5e0

Browse files
committed
update from cpt-pab03
1 parent dfbf251 commit 243f5e0

File tree

3 files changed

+697
-6
lines changed

3 files changed

+697
-6
lines changed

ConvertDat2Root_v5.cc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,17 +315,18 @@ int main (int argc, char **argv)
315315
std::cout << ">> Start reading file" << argv[1] << " ......\n" << std::endl;
316316

317317
// Read additional headers introduced in v5 of DRS software
318-
char tmpTimeHeader[6];
318+
char tmpTimeHeader[1];
319319
file.read ((char *) &tmpTimeHeader, 4);
320320
cout << tmpTimeHeader << "\n";
321321
file.read ((char *) &tmpTimeHeader, 4);
322322
cout << tmpTimeHeader << "\n";
323-
char tmpBoardSerialNumber[6];
323+
char tmpBoardSerialNumber[5];
324324
file.read ((char *) &tmpBoardSerialNumber, 4);
325325

326+
cout << tmpBoardSerialNumber <<"\n";
326327
for ( int i = 0; i < nChannels; i++ )
327328
{
328-
char tmpChannel1Header[5];
329+
char tmpChannel1Header[1];
329330
file.read ((char *) &tmpChannel1Header, 4);
330331
cout << tmpChannel1Header << "\n";
331332
if ( strcmp( tmpChannel1Header,"C001" ) == 0 ) file.read ((char *) &EventTime1, 4096);
@@ -569,7 +570,7 @@ int main (int argc, char **argv)
569570
// calculate time for this cell
570571
for (j=0,t2[i]=0; j<i ; j++)
571572
t2[i] += EventTime2[(j+tmpT) % 1024];
572-
// t2[i] = i;
573+
// t2[i] = i;
573574
// std::cout<<"KKK "<<c1[i]<<" "<<ChannelDataVoltage[i]<<std::endl;
574575
}
575576
} // end of channel 2
@@ -613,7 +614,7 @@ int main (int argc, char **argv)
613614
// calculate time for this cell
614615
for (j=0,t3[i]=0; j<i ; j++)
615616
t3[i] += EventTime3[(j+tmpT) % 1024];
616-
// t3[i] = i;
617+
//t3[i] = i;
617618
// std::cout<<"KKK "<<c1[i]<<" "<<ChannelDataVoltage[i]<<std::endl;
618619
}
619620

@@ -660,7 +661,7 @@ int main (int argc, char **argv)
660661
// calculate time for this cell
661662
for (j=0,t4[i]=0; j<i ; j++)
662663
t4[i] += EventTime4[(j+tmpT) % 1024];
663-
// t4[i] = i;
664+
//t4[i] = i;
664665
// std::cout<<"KKK "<<c1[i]<<" "<<ChannelDataVoltage[i]<<std::endl;
665666
}
666667
} // end of channel 4

0 commit comments

Comments
 (0)