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

Diff of /yoda/techmodel/CalibTrk1Reader.cpp

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

revision 1.3 by kusanagi, Sat Jul 17 20:03:38 2004 UTC revision 1.4 by kusanagi, Thu Aug 19 15:24:46 2004 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Source: /home/cvsmanager/yoda/techmodel/CalibTrk1Reader.cpp,v $   * $Source: /home/cvsmanager/yoda/techmodel/CalibTrk1Reader.cpp,v $
3   * $Id: CalibTrk1Reader.cpp,v 1.2 2004/07/06 13:31:18 kusanagi Exp $   * $Id: CalibTrk1Reader.cpp,v 1.3 2004/07/17 20:03:38 kusanagi Exp $
4   * $Author: kusanagi $   * $Author: kusanagi $
5   *   *
6   * Implementation of the LogReader class.   * Implementation of the LogReader class.
# Line 34  extern "C" { Line 34  extern "C" {
34        int   nbad_l2[6];        int   nbad_l2[6];
35        int   nbad_l3[6];        int   nbad_l3[6];
36        int   cal_flag[6];        int   cal_flag[6];
37        int   checksum[6];        int   DSPped_par[6][3072];
       int   DSPbad_par[6][3072];  
       float DSPped_par[6][3072];  
38        float DSPsig_par[6][3072];        float DSPsig_par[6][3072];
39          float DSPbad_par[6][3072];
40      } trkcalib_;      } trkcalib_;
41    
42  #include <dirent.h>  #include <dirent.h>
# Line 71  CalibTrk1Reader::CalibTrk1Reader(void): Line 70  CalibTrk1Reader::CalibTrk1Reader(void):
70   */   */
71  std::string CalibTrk1Reader::GetVersionInfo(void) const {  std::string CalibTrk1Reader::GetVersionInfo(void) const {
72    return    return
73      "$Header: /home/cvsmanager/yoda/techmodel/CalibTrk1Reader.cpp,v 1.2 2004/07/06 13:31:18 kusanagi Exp $\n";      "$Header: /home/cvsmanager/yoda/techmodel/CalibTrk1Reader.cpp,v 1.3 2004/07/17 20:03:38 kusanagi Exp $\n";
74  }  }
75    
76  /**  /**
# Line 138  void CalibTrk1Reader::RunEvent(int Event Line 137  void CalibTrk1Reader::RunEvent(int Event
137          memcpy(calibTrk1->nbad_l2,   trkcalib_.nbad_l2,    sizeof(calibTrk1->nbad_l2));          memcpy(calibTrk1->nbad_l2,   trkcalib_.nbad_l2,    sizeof(calibTrk1->nbad_l2));
138          memcpy(calibTrk1->nbad_l3,   trkcalib_.nbad_l3,    sizeof(calibTrk1->nbad_l3));          memcpy(calibTrk1->nbad_l3,   trkcalib_.nbad_l3,    sizeof(calibTrk1->nbad_l3));
139          memcpy(calibTrk1->cal_flag,  trkcalib_.cal_flag,   sizeof(calibTrk1->cal_flag));                memcpy(calibTrk1->cal_flag,  trkcalib_.cal_flag,   sizeof(calibTrk1->cal_flag));      
140          memcpy(calibTrk1->checksum,  trkcalib_.checksum,   sizeof(calibTrk1->checksum));        
141    //--------have to invert array because of FORTRAN <-> C different management of the indexes
142            int tempBad_par[3072][6];
143            int tempPed_par[3072][6];
144            int tempSig_par[3072][6];
145          memcpy(calibTrk1->DSPbad_par,trkcalib_.DSPbad_par, sizeof(calibTrk1->DSPbad_par));                memcpy(calibTrk1->DSPbad_par,trkcalib_.DSPbad_par, sizeof(calibTrk1->DSPbad_par));      
146          memcpy(calibTrk1->DSPped_par,trkcalib_.DSPped_par, sizeof(calibTrk1->DSPped_par));                memcpy(calibTrk1->DSPped_par,trkcalib_.DSPped_par, sizeof(calibTrk1->DSPped_par));      
147          memcpy(calibTrk1->DSPsig_par,trkcalib_.DSPsig_par, sizeof(calibTrk1->DSPsig_par));                memcpy(calibTrk1->DSPsig_par,trkcalib_.DSPsig_par, sizeof(calibTrk1->DSPsig_par));      
148    
149            for (int i = 0; i < 6; i++){
150                for (int j = 0; j < 3072; j++){
151                    calibTrk1->DSPbad_par[i][j] = tempBad_par[j][i];
152                    calibTrk1->DSPped_par[i][j] = tempPed_par[j][i];
153                    calibTrk1->DSPsig_par[i][j] = tempSig_par[j][i];
154                }
155            }
156    //-----------------------------------------------------------------------------------------
157            
158    
159          cat <<  log4cpp::Priority::ERROR          cat <<  log4cpp::Priority::ERROR
160          <<  "Fortran77 function trkcalibpkt error code = " << ERROR          <<  "Fortran77 function trkcalibpkt error code = " << ERROR
161          <<  "\n " << log4cpp::CategoryStream::ENDLINE;          <<  "\n " << log4cpp::CategoryStream::ENDLINE;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23