add MAX_TRACE_LENGTH 16000 in DataBlock
This commit is contained in:
parent
b92673ee7a
commit
f198afabf5
|
@ -14,6 +14,8 @@
|
|||
#include "TTree.h"
|
||||
#include "TString.h"
|
||||
|
||||
#define MAX_TRACE_LENGHT 16000
|
||||
|
||||
class DataBlock{
|
||||
|
||||
public:
|
||||
|
@ -37,7 +39,7 @@ public:
|
|||
|
||||
ULong64_t eventID;
|
||||
|
||||
UShort_t trace[1024];
|
||||
UShort_t trace[MAX_TRACE_LENGHT];
|
||||
|
||||
DataBlock(){
|
||||
Clear();
|
||||
|
@ -71,7 +73,7 @@ public:
|
|||
}
|
||||
|
||||
void ClearTrace(){
|
||||
for( int i = 0; i < 1024; i++) trace[i] = 0;
|
||||
for( int i = 0 ; i < MAX_TRACE_LENGHT; i++) trace[i] = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -82,19 +82,17 @@ int main(int argn, char **argv) {
|
|||
clock2.Reset();
|
||||
clock2.Start("timer");
|
||||
|
||||
evt->ScanNumberOfBlock();
|
||||
|
||||
//=============== Read File
|
||||
while( evt->IsEndOfFile() == false ){
|
||||
|
||||
evt->ReadBlock();
|
||||
evt->PrintStatus(10000);
|
||||
|
||||
//evt->PrintStatus(10000);
|
||||
|
||||
int id = data->crate*MAX_BOARDS_PER_CRATE*MAX_CHANNELS_PER_BOARD + (data->slot-BOARD_START)*MAX_CHANNELS_PER_BOARD + data->ch;
|
||||
detID = mapping[id];
|
||||
|
||||
printf("--------- a\n");
|
||||
outFile->
|
||||
|
||||
//cern fill tree
|
||||
outFile->cd();
|
||||
tree->Fill();
|
||||
|
|
|
@ -37,7 +37,7 @@ class evtReader{
|
|||
long int nBlock;
|
||||
|
||||
unsigned int extraHeader[14];
|
||||
unsigned int traceBlock[4000];
|
||||
unsigned int traceBlock[MAX_TRACE_LENGHT/2];
|
||||
|
||||
TBenchmark gClock;
|
||||
|
||||
|
@ -167,6 +167,7 @@ int evtReader::ReadBlock(int opt){
|
|||
data->trace_out_of_range = header[3] >> 31;
|
||||
|
||||
data->ClearQDC();
|
||||
data->ClearTrace();
|
||||
|
||||
///======== read QDCsum
|
||||
if( data->headerLength >= 4 ){
|
||||
|
@ -201,6 +202,7 @@ int evtReader::ReadBlock(int opt){
|
|||
}
|
||||
|
||||
///make QDC by trace
|
||||
/**
|
||||
if( data->headerLength == 4 || data->headerLength == 8 ) {
|
||||
for( int i = 0; i < 8; i++){ data->QDCsum[i] = 0;}
|
||||
for( int i = 0; i < data->trace_length; i++){
|
||||
|
@ -213,7 +215,7 @@ int evtReader::ReadBlock(int opt){
|
|||
if( 160 <= i && i < 175 ) data->QDCsum[6] += data->trace[i];
|
||||
if( 175 <= i && i < 200 ) data->QDCsum[7] += data->trace[i];
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user