/[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 1.4 by kusanagi, Thu Aug 19 15:24:58 2004 UTC revision 2.0 by kusanagi, Tue Sep 21 20:51:22 2004 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 1.3 2004/07/26 23:09:47 kusanagi Exp $   * $Id: TrackerReader.cpp,v 1.6 2004/09/21 20:24:53 kusanagi Exp $
4   * $Author: kusanagi $   * $Author: kusanagi $
5   *   *
6   * Implementation of the TrackerPhysicsReader class.   * Implementation of the TrackerPhysicsReader class.
7   */   */
8    
9  #include <string>  #include <string>
10  #include <log4cpp/Category.hh>  #include <log4cxx/logger.h>
11  #include "TrackerReader.h"  #include "TrackerReader.h"
12  #include "event/physics/tracker/TrackerEvent.h"  #include "event/physics/tracker/TrackerEvent.h"
13    
# Line 50  extern "C" { Line 50  extern "C" {
50  using namespace pamela;  using namespace pamela;
51  using namespace pamela::tracker;  using namespace pamela::tracker;
52    
53  static log4cpp::Category& cat = log4cpp::Category::getInstance("pamela.techmodel.tracker.TrackerReader");    static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.tracker.TrackerReader"));
54    
55  /**  /**
56   * Constructor.   * Constructor.
57   */   */
58  TrackerReader::TrackerReader(void):  TrackerReader::TrackerReader(void):
59    TechmodelAlgorithm(PacketType::Physics, "TechmodelTrackerReader") {    TechmodelAlgorithm(PacketType::Physics, "TechmodelTrackerReader") {
60    cat.debug("Constructor");    logger->debug(_T("Constructor"));
61    tracker = new TrackerEvent();    tracker = new TrackerEvent();
62  }  }
63    
# Line 66  TrackerReader::TrackerReader(void): Line 66  TrackerReader::TrackerReader(void):
66   */   */
67  std::string TrackerReader::GetVersionInfo(void) const {  std::string TrackerReader::GetVersionInfo(void) const {
68    return    return
69      "$Header: /home/cvsmanager/yoda/techmodel/physics/TrackerReader.cpp,v 1.3 2004/07/26 23:09:47 kusanagi Exp $";      "$Header: /home/cvsmanager/yoda/techmodel/physics/TrackerReader.cpp,v 1.6 2004/09/21 20:24:53 kusanagi Exp $";
70  }  }
71    
72  /**  /**
# Line 74  std::string TrackerReader::GetVersionInf Line 74  std::string TrackerReader::GetVersionInf
74   * event reader routines for all packet types.   * event reader routines for all packet types.
75   */   */
76  void TrackerReader::Init(PamelaRun *run) {  void TrackerReader::Init(PamelaRun *run) {
77      logger->debug(_T("Initialize"));
78    SetInputStream(run);    SetInputStream(run);
79    run->WriteSubPacket(this, &tracker, tracker->Class());    run->WriteSubPacket(this, &tracker, tracker->Class());
80  }  }
# Line 106  void TrackerReader::RunEvent(int EventNu Line 107  void TrackerReader::RunEvent(int EventNu
107            
108      remove((char*)pathDir.c_str());      remove((char*)pathDir.c_str());
109    
110            /*if (ERROR != 0) {
111            char *errmsg;
112            switch (ERROR){
113                case 1: errmsg = "---------------------";
114            }
115        } else {*/
116      //Store the unpacked data      //Store the unpacked data
117      memcpy(tracker->DAQmode, level0_.DAQmode, sizeof(tracker->DAQmode));      memcpy(tracker->DAQmode, level0_.DAQmode, sizeof(tracker->DAQmode));
118      memcpy(tracker->DSPnumber, level0_.DSPnumber, sizeof(tracker->DSPnumber));      memcpy(tracker->DSPnumber, level0_.DSPnumber, sizeof(tracker->DSPnumber));
# Line 144  void TrackerReader::RunEvent(int EventNu Line 150  void TrackerReader::RunEvent(int EventNu
150      memcpy(tracker->aswr, level0_.aswr, sizeof(tracker->aswr));                memcpy(tracker->aswr, level0_.aswr, sizeof(tracker->aswr));          
151      tracker->TOTDATAlength = level0_.TOTDATAlength;      tracker->TOTDATAlength = level0_.TOTDATAlength;
152      memcpy(tracker->datatracker, level0_.datatracker, sizeof(tracker->datatracker));                memcpy(tracker->datatracker, level0_.datatracker, sizeof(tracker->datatracker));          
153        //}
154            
     cat <<  log4cpp::Priority::ERROR  
         <<  "Fortran77 function trkcalibpkt error code = " << ERROR  
         <<  "\n " << log4cpp::CategoryStream::ENDLINE;  
155  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.23