Changeset 62 for tools


Ignore:
Timestamp:
06/16/09 15:02:02 (16 years ago)
Author:
ogrimm
Message:
Updated for event data format
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/inspectrawfile/inspectrawfile.cpp

    r47 r62  
    3535   
    3636    while (EventCount++ < NumEvents && RD->ReadEvent(0,stdout) == CTX_OK) {
    37       for(int i=0; i<RD->RHeader->NBoards; i++)
     37      printf("Trigger cells: ");
     38      for (int i=0; i<RD->RHeader->NBoards*RD->RHeader->NChips; i++) {
     39        printf("%d ", *((int *) RD->Data + i));
     40      }
     41      for(int i=0; i<RD->RHeader->NBoards; i++) {
    3842        for(int j=0; j<RD->RHeader->NChips*RD->RHeader->NChannels; j++) {
    39           printf("\nBoard %d, channel %d\t", i,j);
     43          if (NumBins>0) printf("\nBoard %d, channel %d\t", i,j);
    4044          for(int k=0; k<NumBins ; k++)
    41             printf("%.1f ",RD->Data[i*RD->RHeader->NChips*RD->RHeader->NChannels*RD->RHeader->Samples+j*RD->RHeader->Samples+k]*RD->BStruct[i].ScaleFactor);
     45            printf("%.1f ",*((short *) (RD->Data + RD->RHeader->NBoards*RD->RHeader->NChips*sizeof(int)) + i*RD->RHeader->NChips*RD->RHeader->NChannels*RD->RHeader->Samples +
     46             j*RD->RHeader->Samples+k)*RD->BStruct[i].ScaleFactor);
    4247        }
     48      }
    4349      printf("\n\n");
    4450    }
Note: See TracChangeset for help on using the changeset viewer.