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

Diff of /yoda/techmodel/EventReader.cpp

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

revision 2.2 by kusanagi, Fri Sep 24 11:57:49 2004 UTC revision 2.3 by kusanagi, Sun Oct 17 12:28:38 2004 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Author: kusanagi $   * $Author: kusanagi $
3   * $Date: 2004/09/22 13:14:03 $   * $Date: 2004/09/24 11:57:49 $
4   * $Revision: 2.1 $   * $Revision: 2.2 $
5   *   *
6   * Implementation of the functions of a sample Algorithm class.   * Implementation of the functions of a sample Algorithm class.
7   * This file can be used as a templace to develop your own algorithm.   * This file can be used as a templace to develop your own algorithm.
# Line 87  EventReader::EventReader(int packetsLimi Line 87  EventReader::EventReader(int packetsLimi
87   */   */
88  std::string EventReader::GetVersionInfo(void) const {  std::string EventReader::GetVersionInfo(void) const {
89    return    return
90      "$Header: /home/cvsmanager/yoda/techmodel/EventReader.cpp,v 2.1 2004/09/22 13:14:03 kusanagi Exp $\n";      "$Header: /home/cvsmanager/yoda/techmodel/EventReader.cpp,v 2.2 2004/09/24 11:57:49 kusanagi Exp $\n";
91  }  }
92    
93  /**  /**
# Line 136  void EventReader::RunEvent(int EventNumb Line 136  void EventReader::RunEvent(int EventNumb
136        if (FindStart()) {        if (FindStart()) {
137          if(UnpackPscuHeader()){          if(UnpackPscuHeader()){
138              const PacketType* type = Header->GetPscuHeader()->GetPacketType();              const PacketType* type = Header->GetPscuHeader()->GetPacketType();
139                //if (filter->CheckPacket(type))
140              AlgorithmMap::iterator i = TechmodelAlgorithmMap.find(type);              AlgorithmMap::iterator i = TechmodelAlgorithmMap.find(type);
141              if (i != TechmodelAlgorithmMap.end()) {              if (i != TechmodelAlgorithmMap.end()) {
142                  TechmodelAlgorithm *EventAlgorithm = i->second;                  TechmodelAlgorithm *EventAlgorithm = i->second;
# Line 146  void EventReader::RunEvent(int EventNumb Line 147  void EventReader::RunEvent(int EventNumb
147                  oss.flush();                  oss.flush();
148                  oss << "No way to read events of type" << type->GetName();                  oss << "No way to read events of type" << type->GetName();
149                  logger->info(oss.str().c_str());                  logger->info(oss.str().c_str());
150              throw Exception("No way to read events of type " + type->GetName());                  throw Exception("No way to read events of type " + type->GetName());
151          }              }
152        } //else {          } //else {
153          //**TO BE DONE**   <<WRONG CRC l --- LOST PACKET>>//              //**TO BE DONE**   <<WRONG CRC l --- LOST PACKET>>//
154          //Have to be defined a "WrongCRC" packet::Type?              //Have to be defined a "WrongCRC" packet::Type?
155          //}              //}
156       }        }
157      } catch (...) {      } catch (...) {
158        //This have to be more detailed. More exceptions type are needed.        //This have to be more detailed. More exceptions type are needed.
159        logger->error("Couldn't read the event. Skipping to the next header.");        logger->error("Couldn't read the event. Skipping to the next header.");
# Line 198  int EventReader::UnpackPscuHeader(void) Line 199  int EventReader::UnpackPscuHeader(void)
199      logger->info(oss.str().c_str());      logger->info(oss.str().c_str());
200    }    }
201    
   
202    if (((BYTE)CM_Compute_CRC16(0, (BYTE*)&buff, 15) == (BYTE)buff[15]) && (PacketId1 == PacketId2)){    if (((BYTE)CM_Compute_CRC16(0, (BYTE*)&buff, 15) == (BYTE)buff[15]) && (PacketId1 == PacketId2)){
203      prevPckCounter = Counter;      prevPckCounter = Counter;
204      prevPckOBT     = OrbitalTime;      prevPckOBT     = OrbitalTime;

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

  ViewVC Help
Powered by ViewVC 1.1.23