/[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.4 by mocchiut, Tue Aug 4 13:58:12 2009 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Author: messineo $   * $Author: mocchiut $
3   * $Date: 2008-03-12 13:48:30 $   * $Date: 2009/07/24 13:53:45 $
4   * $Revision: 1.21 $   * $Revision: 1.3 $
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 184  int EventReader::PKT_RunEvent(char* head Line 184  int EventReader::PKT_RunEvent(char* head
184                  // catch (NotExistingAlgorithmException exc) {}                  // catch (NotExistingAlgorithmException exc) {}
185    
186                  Run->FillTrees(type);                  Run->FillTrees(type);
187                    //              cout << Header->GetCounter()->Get(type) << endl;
188                  Header->GetCounter()->Increment(type);                  Header->GetCounter()->Increment(type);
189                    //              cout << Header->GetCounter()->Get(type) << endl;
190          }          }
191          else          else
192          {          {
193                  ret=-3;                  ret=-3;
194                  oss.str("");                  oss.str("");
195                  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 ";  
196                    oss << " No way to read events of type  " << type->GetName()<<". The Packet is skipped ";  
197                  oss << " Return "<<ret;                  oss << " Return "<<ret;
198                  msg=oss.str();                  msg=oss.str();
199                  PamOffLineSW::mainLogUtil->logWarning(msg);                    PamOffLineSW::mainLogUtil->logWarning(msg);  
# Line 211  void EventReader::PKT_UnpackPscuHeader(c Line 214  void EventReader::PKT_UnpackPscuHeader(c
214    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);
215    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);
216    unsigned char CRC          = buff[15];    unsigned char CRC          = buff[15];
217    unsigned char FileOffset   = 0;// ??    //  unsigned char FileOffset   = 0;// ??
218    
219    Header->GetPscuHeader()->SetPacketId(PacketId1, PacketId2);    Header->GetPscuHeader()->SetPacketId(PacketId1, PacketId2);
220    Header->GetPscuHeader()->SetCounter(Counter);    Header->GetPscuHeader()->SetCounter(Counter);
# Line 231  void EventReader::PKT_UnpackPscuHeader(c Line 234  void EventReader::PKT_UnpackPscuHeader(c
234   */   */
235  std::string EventReader::GetVersionInfo(void) const {  std::string EventReader::GetVersionInfo(void) const {
236          return          return
237      "$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.3 2009/07/24 13:53:45 mocchiut Exp $\n";
238  }  }
239    
240    

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

  ViewVC Help
Powered by ViewVC 1.1.23