/[PAMELA software]/yoda/techmodel/EventTrkReader.cpp
ViewVC logotype

Diff of /yoda/techmodel/EventTrkReader.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2.3 by kusanagi, Mon Jan 3 14:20:09 2005 UTC revision 2.4 by kusanagi, Thu Jan 13 14:48:04 2005 UTC
# Line 2  Line 2 
2  // Implementation of the EventTrkReader class.  // Implementation of the EventTrkReader class.
3    
4    
5  #define UINT unsigned int  
 #define BYTE  unsigned char  
 #include <string>  
6  #include <log4cxx/logger.h>  #include <log4cxx/logger.h>
7    
8  #include <fstream>  #include <fstream>
 #include "stdio.h"  
9  #include "ReaderAlgorithms.h"  #include "ReaderAlgorithms.h"
10    
11  #include "event/EventTrkEvent.h"  #include "event/EventTrkEvent.h"
# Line 37  extern "C" { Line 34  extern "C" {
34        int fl2[12];        int fl2[12];
35        int fl1[12];        int fl1[12];
36        int fl6[12];        int fl6[12];
37          int checksum[12];
38          int TOTDATAlength;
39          int datatracker[49152];
40        int pnum[12];        int pnum[12];
41        int cmdnum[12];        int cmdnum[12];
42        int bid[12];        int bid[12];
43        int alarm[12];        int alarm[12];
44        int aswr[12];        int aswr[12];
       int TOTDATAlength;  
       int datatracker[49152];  
45      } level0_;      } level0_;
46  #include <dirent.h>  #include <dirent.h>
47  }  }
# Line 117  void EventTrkReader::RunEvent(int EventN Line 115  void EventTrkReader::RunEvent(int EventN
115          }          }
116      } else {*/      } else {*/
117      //Store the unpacked data      //Store the unpacked data
118        eventTrk->unpackError    = ERROR;
119        eventTrk->good0          = level0_.good0;
120        eventTrk->nev0           = level0_.nev0;
121      memcpy(eventTrk->DAQmode, level0_.DAQmode, sizeof(eventTrk->DAQmode));      memcpy(eventTrk->DAQmode, level0_.DAQmode, sizeof(eventTrk->DAQmode));
122      memcpy(eventTrk->DSPnumber, level0_.DSPnumber, sizeof(eventTrk->DSPnumber));      memcpy(eventTrk->DSPnumber, level0_.DSPnumber, sizeof(eventTrk->DSPnumber));
123      memcpy(eventTrk->DATAlength, level0_.DATAlength, sizeof(eventTrk->DATAlength));      memcpy(eventTrk->DATAlength, level0_.DATAlength, sizeof(eventTrk->DATAlength));
# Line 131  void EventTrkReader::RunEvent(int EventN Line 132  void EventTrkReader::RunEvent(int EventN
132      int tempSign[3][12];      int tempSign[3][12];
133      memcpy(tempAddr, (level0_.addrcluster), sizeof(tempAddr));      memcpy(tempAddr, (level0_.addrcluster), sizeof(tempAddr));
134      memcpy(tempSign, (level0_.signcluster), sizeof(tempSign));      memcpy(tempSign, (level0_.signcluster), sizeof(tempSign));
135      for (int j = 0; j < 11; j++){      for (int j = 0; j < 12; j++){
136          for (int i = 0; i < 2; i++){          for (int i = 0; i < 3; i++){
137              eventTrk->addrcluster[j][i] = tempAddr[i][j];              eventTrk->addrcluster[j][i] = tempAddr[i][j];
138              eventTrk->signcluster[j][i] = tempSign[i][j];              eventTrk->signcluster[j][i] = tempSign[i][j];
139          }          }

Legend:
Removed from v.2.3  
changed lines
  Added in v.2.4

  ViewVC Help
Powered by ViewVC 1.1.23