/[PAMELA software]/PamCut/MiscCuts/OBTPktNumCut/OBTPktNumCut.h
ViewVC logotype

Annotation of /PamCut/MiscCuts/OBTPktNumCut/OBTPktNumCut.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.2.2 - (hide annotations) (download)
Wed Nov 30 17:02:41 2011 UTC (13 years ago) by pam-fi
Branch: V8
CVS Tags: nuclei_reproc
Changes since 1.1.2.1: +5 -1 lines
File MIME type: text/plain
Add a verbose flag.

1 pam-fi 1.1.2.1 /*
2     * OBTPktNumCut.h
3     *
4     * Created on: 18/mar/2010
5     * Author: Nicola Mori
6     */
7    
8     #ifndef OBTPKTNUMCUT_H_
9     #define OBTPKTNUMCUT_H_
10    
11     #include "../../../PamCut/PamCutBase/PamCutBase.h"
12    
13     /*! @brief Event selection by OBT and packet number.
14     *
15     * A list of OBT and packet number couples is checked. Events are discarded if their
16     * OBT and PktNum does not match any entry of the list.
17     * */
18     class OBTPktNumCut: public PamCut {
19    
20     public:
21    
22     /*! @brief Constructor.
23     *
24     * The list parameter define the events to be selected.
25     *
26     * @param cutName The cut's name.
27     * @param list A list of (OBT, PktNum) pairs.
28 pam-fi 1.1.2.2 * @param verbose If true, a message will be print to std output when an event is found. This can be useful
29     * when searching for rare events in many files, to identify which file contains the event
30     * by parsing std output. See #OBTPktNumCut.cpp for the current implementation of this message.
31 pam-fi 1.1.2.1 */
32 pam-fi 1.1.2.2 OBTPktNumCut(const char *cutName, vector<pair<unsigned int, unsigned int> > &list, bool verbose = false);
33 pam-fi 1.1.2.1
34     /*! @brief Constructor.
35     *
36     * The OBT and PktNum are stored in a text file given by listFileName. The file must contain two
37     * columns of numbers, each row containing the event OBT as first entry and the event PktNum as
38     * second.
39     *
40     * @param cutName The cut's name.
41     * @param listFileName The file containing the (OBT, PktNum) pairs.
42     */
43     OBTPktNumCut(const char *cutName, TString listFileName);
44    
45     /*! @brief Destructor. */
46     ~OBTPktNumCut() {
47     }
48    
49     /*! @brief The OBT and packet number check.
50     *
51     * @param event The event to analyze.
52     * @return #CUTOK if the event's OBT and PktNum match one of the pairs specified to the constructor.
53     * @return 0 otherwise.
54     */
55     int Check(PamLevel2 *event);
56    
57     const vector<pair<unsigned int, unsigned int> > &GetList(){
58     return _list;
59     }
60    
61     private:
62    
63     vector<pair<unsigned int, unsigned int> > _list;
64 pam-fi 1.1.2.2 bool _verbose;
65 pam-fi 1.1.2.1 };
66     #endif /* OBTPKTNUMCUT_H_ */

  ViewVC Help
Powered by ViewVC 1.1.23