/[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.1 - (hide annotations) (download)
Tue Jun 29 07:47:17 2010 UTC (14 years, 5 months ago) by pam-fi
Branch: V8
CVS Tags: MergedToHEAD_1
Changes since 1.1: +62 -0 lines
File MIME type: text/plain
Added to repository.

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     */
29     OBTPktNumCut(const char *cutName, vector<pair<unsigned int, unsigned int> > &list);
30    
31     /*! @brief Constructor.
32     *
33     * The OBT and PktNum are stored in a text file given by listFileName. The file must contain two
34     * columns of numbers, each row containing the event OBT as first entry and the event PktNum as
35     * second.
36     *
37     * @param cutName The cut's name.
38     * @param listFileName The file containing the (OBT, PktNum) pairs.
39     */
40     OBTPktNumCut(const char *cutName, TString listFileName);
41    
42     /*! @brief Destructor. */
43     ~OBTPktNumCut() {
44     }
45    
46     /*! @brief The OBT and packet number check.
47     *
48     * @param event The event to analyze.
49     * @return #CUTOK if the event's OBT and PktNum match one of the pairs specified to the constructor.
50     * @return 0 otherwise.
51     */
52     int Check(PamLevel2 *event);
53    
54     const vector<pair<unsigned int, unsigned int> > &GetList(){
55     return _list;
56     }
57    
58     private:
59    
60     vector<pair<unsigned int, unsigned int> > _list;
61     };
62     #endif /* OBTPKTNUMCUT_H_ */

  ViewVC Help
Powered by ViewVC 1.1.23