/[PAMELA software]/chewbacca/PamOffLineSW/techmodel/EventReader.cpp
ViewVC logotype

Diff of /chewbacca/PamOffLineSW/techmodel/EventReader.cpp

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

revision 1.1 by mocchiut, Tue Sep 23 07:20:24 2008 UTC revision 1.3 by mocchiut, Fri Jul 24 13:53:45 2009 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Author: messineo $   * $Author: mocchiut $
3   * $Date: 2008-03-12 13:48:30 $   * $Date: 2008/11/04 09:44:36 $
4   * $Revision: 1.21 $   * $Revision: 1.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 113  void EventReader::Init(PamelaRun *run) { Line 113  void EventReader::Init(PamelaRun *run) {
113              3                    CALIBRATION PACKET with error but used              3                    CALIBRATION PACKET with error but used
114             -1                    CRC exception  packet DISCARDED             -1                    CRC exception  packet DISCARDED
115             -2                    FATAL exception packet DISCARDED //never happen             -2                    FATAL exception packet DISCARDED //never happen
116             -3                    No way to read events of this type. packet DISCARDED( es CalibCal)             -3                    No way to read events of this type. packet DISCARDED( es CalibCal --old)
117          //in PacketUser I will put      ret = 10          //in PacketUser I will put      ret = 10
118           ret = 10 if the packet is good but comes from a cadre with VRL problems           ret = 10 if the packet is good but comes from a cadre with VRL problems
119                    
# Line 190  int EventReader::PKT_RunEvent(char* head Line 190  int EventReader::PKT_RunEvent(char* head
190          {          {
191                  ret=-3;                  ret=-3;
192                  oss.str("");                  oss.str("");
193                  oss << " No way to read events of type  " << type->GetName().c_str()<<". The Packet is skipped ";                    //              oss << " No way to read events of type  " << type->GetName().c_str()<<". The Packet is skipped ";  
194                    oss << " No way to read events of type  " << type->GetName()<<". The Packet is skipped ";  
195                  oss << " Return "<<ret;                  oss << " Return "<<ret;
196                  msg=oss.str();                  msg=oss.str();
197                  PamOffLineSW::mainLogUtil->logWarning(msg);                    PamOffLineSW::mainLogUtil->logWarning(msg);  
# Line 211  void EventReader::PKT_UnpackPscuHeader(c Line 212  void EventReader::PKT_UnpackPscuHeader(c
212    unsigned int  OrbitalTime  = (((UINT32)buff[8]<<24)&0xFF000000) + (((UINT32)buff[9]<<16)&0x00FF0000) +  (((UINT32)buff[10]<<8)&0x0000FF00) + (((UINT32)buff[11])&0x000000FF);    unsigned int  OrbitalTime  = (((UINT32)buff[8]<<24)&0xFF000000) + (((UINT32)buff[9]<<16)&0x00FF0000) +  (((UINT32)buff[10]<<8)&0x0000FF00) + (((UINT32)buff[11])&0x000000FF);
213    unsigned int  PacketLenght = (((UINT32)buff[12]<<16)&0x00FF0000) +  (((UINT32)buff[13]<<8)&0x0000FF00) + (((UINT32)buff[14])&0x000000FF);    unsigned int  PacketLenght = (((UINT32)buff[12]<<16)&0x00FF0000) +  (((UINT32)buff[13]<<8)&0x0000FF00) + (((UINT32)buff[14])&0x000000FF);
214    unsigned char CRC          = buff[15];    unsigned char CRC          = buff[15];
215    unsigned char FileOffset   = 0;// ??    //  unsigned char FileOffset   = 0;// ??
216    
217    Header->GetPscuHeader()->SetPacketId(PacketId1, PacketId2);    Header->GetPscuHeader()->SetPacketId(PacketId1, PacketId2);
218    Header->GetPscuHeader()->SetCounter(Counter);    Header->GetPscuHeader()->SetCounter(Counter);
# Line 231  void EventReader::PKT_UnpackPscuHeader(c Line 232  void EventReader::PKT_UnpackPscuHeader(c
232   */   */
233  std::string EventReader::GetVersionInfo(void) const {  std::string EventReader::GetVersionInfo(void) const {
234          return          return
235      "$Header: /repository/PamOffLineSW/techmodel/EventReader.cpp,v 1.21 2008-03-12 13:48:30 messineo Exp $\n";      "$Header: /afs/ba.infn.it/user/pamela/src/CVS/chewbacca/PamOffLineSW/techmodel/EventReader.cpp,v 1.2 2008/11/04 09:44:36 mocchiut Exp $\n";
236  }  }
237    
238    

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

  ViewVC Help
Powered by ViewVC 1.1.23