Added traceLength in Hit Class
This commit is contained in:
parent
2ee71637cc
commit
792d1c5545
14
Hit.h
14
Hit.h
|
@ -3,14 +3,15 @@
|
|||
|
||||
class Hit{
|
||||
public:
|
||||
int sn;
|
||||
unsigned short bd;
|
||||
unsigned short ch;
|
||||
unsigned short sn;
|
||||
uint8_t bd;
|
||||
uint8_t ch;
|
||||
unsigned short energy;
|
||||
unsigned short energy2;
|
||||
unsigned long long timestamp;
|
||||
unsigned short fineTime;
|
||||
|
||||
unsigned short traceLength;
|
||||
std::vector<short> trace;
|
||||
|
||||
Hit(){
|
||||
|
@ -25,6 +26,7 @@ public:
|
|||
energy2 = 0;
|
||||
timestamp = 0;
|
||||
fineTime = 0;
|
||||
traceLength = 0;
|
||||
trace.clear();
|
||||
}
|
||||
|
||||
|
@ -32,6 +34,12 @@ public:
|
|||
printf("(%5d, %2d) %6d %16llu, %6d, %5ld\n", sn, ch, energy, timestamp, fineTime, trace.size());
|
||||
}
|
||||
|
||||
void PrintTrace(){
|
||||
for( unsigned short i = 0; i < traceLength; i++){
|
||||
printf("%3u | %6d \n", i, trace[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Define operator< for sorting
|
||||
bool operator<(const Hit& other) const {
|
||||
return timestamp < other.timestamp;
|
||||
|
|
Loading…
Reference in New Issue
Block a user