Changeset 64


Ignore:
Timestamp:
06/17/09 08:04:10 (16 years ago)
Author:
ogrimm
Message:
Updated for new event format including trigger cells
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/rootread/rootread.cc

    r54 r64  
    7575  // Read and display all events
    7676  while (RD->ReadEvent(0, stdout) == CTX_OK) {
     77    int *TrigPnt = (int *) RD->Data;
     78    short *DataPnt = (short *) RD->Data + Boards*RD->RHeader->NChips*sizeof(int);
     79   
     80    printf("Trigger cells: ");
     81    for(unsigned int i=0; i<Boards*RD->RHeader->NChips; i++) printf("%d ", *(TrigPnt + i));
     82    printf("\n");
     83     
    7784    for(unsigned int k=0; k<Boards; k++) {
    7885      for(unsigned int j=0; j<Channels; j++) {
    7986        for(unsigned int i=0; i<Samples ; i++)
    80           h[k*Channels+j].SetBinContent(i, RD->Data[k*Channels*Samples + j*Samples + i] * RD->BStruct[k].ScaleFactor);
     87          h[k*Channels+j].SetBinContent(i, DataPnt[k*Channels*Samples +
     88            j*Samples + i] * RD->BStruct[k].ScaleFactor);
    8189      }
    8290
Note: See TracChangeset for help on using the changeset viewer.