PamCut: MiscCuts/PktQualCut/PktQualCut.cpp Source File

- Main Page
- Classes
- Files

- File List
- File Members

# MiscCuts/PktQualCut/PktQualCut.cpp

Go to the documentation of this file.

    00001 /*
    00002  * PktQualCut.cpp
    00003  *
    00004  *  Created on: 10-mar-2009
    00005  *      Author: Sergio Riciarini, Nicola Mori
    00006  */
    00007
    00010 #include "PktQualCut.h"
    00011
    00012 int PktQualCut::Check(PamLevel2 *event) {
    00013
    00014   // Check run
    00015   if (event->GetRunInfo()->ID != _previousRun){
    00016     _previousRun = event->GetRunInfo()->ID;
    00017     _previousPkt = event->GetOrbitalInfo()->pkt_num;
    00018 //    return PKT_NEWRUN;
    00019         return CUTOK;
    00020   }
    00021
    00022   // Check packet number
    00023   if (event->GetOrbitalInfo()->pkt_num <= _previousPkt){
    00024     return PKT_INVALID;
    00025   }
    00026
    00027   // The packet number is good
    00028   _previousPkt = event->GetOrbitalInfo()->pkt_num;
    00029   return CUTOK;
    00030
    00031 }