/[PAMELA software]/yoda/techmodel/physics/TrackerReader.cpp
ViewVC logotype

Diff of /yoda/techmodel/physics/TrackerReader.cpp

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

revision 2.3 by kusanagi, Mon Jan 3 14:20:13 2005 UTC revision 2.4 by kusanagi, Thu Jan 13 14:50:01 2005 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Source: /home/cvsmanager/yoda/techmodel/physics/TrackerReader.cpp,v $   * $Source: /home/cvsmanager/yoda/techmodel/physics/TrackerReader.cpp,v $
3   * $Id: TrackerReader.cpp,v 2.2 2004/12/22 11:39:16 kusanagi Exp $   * $Id: TrackerReader.cpp,v 2.3 2005/01/03 14:20:13 kusanagi Exp $
4   * $Author: kusanagi $   * $Author: kusanagi $
5   *   *
6   * Implementation of the TrackerPhysicsReader class.   * Implementation of the TrackerPhysicsReader class.
# Line 36  extern "C" { Line 36  extern "C" {
36        int fl2[12];        int fl2[12];
37        int fl1[12];        int fl1[12];
38        int fl6[12];        int fl6[12];
39          int checksum[12];
40          int TOTDATAlength;
41          int datatracker[49152];
42        int pnum[12];        int pnum[12];
43        int cmdnum[12];        int cmdnum[12];
44        int bid[12];        int bid[12];
45        int alarm[12];        int alarm[12];
46        int aswr[12];        int aswr[12];
       int TOTDATAlength;  
       int datatracker[49152];  
47      } level0_;      } level0_;
48  #include <dirent.h>  #include <dirent.h>
49  }  }
# Line 66  TrackerReader::TrackerReader(void): Line 67  TrackerReader::TrackerReader(void):
67   */   */
68  std::string TrackerReader::GetVersionInfo(void) const {  std::string TrackerReader::GetVersionInfo(void) const {
69    return    return
70      "$Header: /home/cvsmanager/yoda/techmodel/physics/TrackerReader.cpp,v 2.2 2004/12/22 11:39:16 kusanagi Exp $";      "$Header: /home/cvsmanager/yoda/techmodel/physics/TrackerReader.cpp,v 2.3 2005/01/03 14:20:13 kusanagi Exp $";
71  }  }
72    
73  /**  /**
# Line 119  void TrackerReader::RunEvent(int EventNu Line 120  void TrackerReader::RunEvent(int EventNu
120          }          }
121      } else {*/      } else {*/
122      //Store the unpacked data      //Store the unpacked data
123      memcpy(tracker->DAQmode, level0_.DAQmode, sizeof(tracker->DAQmode));      tracker->unpackError    = ERROR;
124      memcpy(tracker->DSPnumber, level0_.DSPnumber, sizeof(tracker->DSPnumber));      tracker->good0          = level0_.good0;
125        tracker->nev0           = level0_.nev0;
126        memcpy(tracker->DAQmode,    level0_.DAQmode,    sizeof(tracker->DAQmode));
127        memcpy(tracker->DSPnumber,  level0_.DSPnumber,  sizeof(tracker->DSPnumber));
128      memcpy(tracker->DATAlength, level0_.DATAlength, sizeof(tracker->DATAlength));      memcpy(tracker->DATAlength, level0_.DATAlength, sizeof(tracker->DATAlength));
129      memcpy(tracker->eventn, level0_.eventn, sizeof(tracker->eventn));      memcpy(tracker->eventn,     level0_.eventn,     sizeof(tracker->eventn));
130      memcpy(tracker->nclust, level0_.nclust, sizeof(tracker->nclust));      memcpy(tracker->nclust,     level0_.nclust,     sizeof(tracker->nclust));
131      memcpy(tracker->cutc, level0_.cutc, sizeof(tracker->cutc));      memcpy(tracker->cutc,       level0_.cutc,       sizeof(tracker->cutc));
132      memcpy(tracker->cutcl, level0_.cutcl, sizeof(tracker->cutcl));      memcpy(tracker->cutcl,      level0_.cutcl,      sizeof(tracker->cutcl));
133  //    memcpy(tracker->addrcluster, (level0_.addrcluster), sizeof(tracker->addrcluster));  //    memcpy(tracker->addrcluster, (level0_.addrcluster), sizeof(tracker->addrcluster));
134  //    memcpy(tracker->signcluster, (level0_.signcluster), sizeof(tracker->signcluster));  //    memcpy(tracker->signcluster, (level0_.signcluster), sizeof(tracker->signcluster));
135  //--------have to invert array because of FORTRAN <-> C different management of the indexes  //--------have to invert array because of FORTRAN <-> C different management of the indexes
# Line 133  void TrackerReader::RunEvent(int EventNu Line 137  void TrackerReader::RunEvent(int EventNu
137      int tempSign[3][12];      int tempSign[3][12];
138      memcpy(tempAddr, (level0_.addrcluster), sizeof(tempAddr));      memcpy(tempAddr, (level0_.addrcluster), sizeof(tempAddr));
139      memcpy(tempSign, (level0_.signcluster), sizeof(tempSign));      memcpy(tempSign, (level0_.signcluster), sizeof(tempSign));
140      for (int j = 0; j < 11; j++){      for (int j = 0; j < 12; j++){
141          for (int i = 0; i < 2; i++){          for (int i = 0; i < 3; i++){
142              tracker->addrcluster[j][i] = tempAddr[i][j];              tracker->addrcluster[j][i] = tempAddr[i][j];
143              tracker->signcluster[j][i] = tempSign[i][j];              tracker->signcluster[j][i] = tempSign[i][j];
144          }          }
145      }      }
146  //-----------------------------------------------------------------------------------------  //-----------------------------------------------------------------------------------------
147            
148      memcpy(tracker->fc, level0_.fc, sizeof(tracker->fc));      memcpy(tracker->fc,                 level0_.fc,              sizeof(tracker->fc));
149      memcpy(tracker->compressiontime, level0_.compressiontime, sizeof(tracker->compressiontime));      memcpy(tracker->compressiontime,    level0_.compressiontime, sizeof(tracker->compressiontime));
150      memcpy(tracker->fl1, level0_.fl1, sizeof(tracker->fl1));      memcpy(tracker->fl1,                level0_.fl1,             sizeof(tracker->fl1));
151      memcpy(tracker->fl2, level0_.fl2, sizeof(tracker->fl2));      memcpy(tracker->fl2,                level0_.fl2,             sizeof(tracker->fl2));
152      memcpy(tracker->fl3, level0_.fl3, sizeof(tracker->fl3));      memcpy(tracker->fl3,                level0_.fl3,             sizeof(tracker->fl3));
153      memcpy(tracker->fl4, level0_.fl4, sizeof(tracker->fl4));      memcpy(tracker->fl4,                level0_.fl4,             sizeof(tracker->fl4));
154      memcpy(tracker->fl5, level0_.fl5, sizeof(tracker->fl5));      memcpy(tracker->fl5,                level0_.fl5,             sizeof(tracker->fl5));
155      memcpy(tracker->fl6, level0_.fl6, sizeof(tracker->fl6));      memcpy(tracker->fl6,                level0_.fl6,             sizeof(tracker->fl6));
156      memcpy(tracker->pnum, level0_.pnum, sizeof(tracker->pnum));      memcpy(tracker->pnum,               level0_.pnum,            sizeof(tracker->pnum));
157      memcpy(tracker->cmdnum, level0_.cmdnum, sizeof(tracker->cmdnum));          memcpy(tracker->cmdnum,             level0_.cmdnum,          sizeof(tracker->cmdnum));    
158      memcpy(tracker->bid, level0_.bid, sizeof(tracker->bid));          memcpy(tracker->bid,                level0_.bid,             sizeof(tracker->bid));    
159      memcpy(tracker->alarm, level0_.alarm, sizeof(tracker->alarm));          memcpy(tracker->alarm,              level0_.alarm,           sizeof(tracker->alarm));    
160      memcpy(tracker->aswr, level0_.aswr, sizeof(tracker->aswr));                memcpy(tracker->aswr,               level0_.aswr,            sizeof(tracker->aswr));          
161        
162      tracker->TOTDATAlength = level0_.TOTDATAlength;      tracker->TOTDATAlength = level0_.TOTDATAlength;
163        tracker->TrackerData   = new TArrayI(level0_.TOTDATAlength, level0_.datatracker);
     tracker->TrackerData  = new TArrayI(level0_.TOTDATAlength, level0_.datatracker);  
164      //memcpy(tracker->datatracker, level0_.datatracker, sizeof(tracker->datatracker));                //memcpy(tracker->datatracker, level0_.datatracker, sizeof(tracker->datatracker));          
165      //}      //}
166            

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

  ViewVC Help
Powered by ViewVC 1.1.23