StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTriggerFilterMaker.h
1 #ifndef ST_TRIGGER_FILTER_MAKER_HH
2 #define ST_TRIGGER_FILTER_MAKER_HH
3 
4 // $Id: StTriggerFilterMaker.h,v 1.4 2015/09/09 20:29:39 akio Exp $
5 
6 /*****************************************************************************
7  * @class StTriggerFilterMaker
8  * @author A.Kocoloski
9  *
10  * Privileged Maker which skips events unless they match supplied trigger IDs.
11  *****************************************************************************/
12 
13 #ifndef StMaker_H
14 #include "StMaker.h"
15 #endif
16 
17 #include <vector>
18 using std::vector;
19 
20 class StTriggerFilterMaker : public StMaker {
21 public:
22  StTriggerFilterMaker(const char *name = "triggerFilter");
23  virtual ~StTriggerFilterMaker();
24 
25  //virtual void Clear(const char *option="");
26  virtual Int_t Init();
27  //virtual Int_t InitRun(int runnumber);
28  virtual Int_t Make();
29  //virtual Int_t Finish();
30 
31  void addTrigger(unsigned int trigId) { mGoodTriggers.push_back(trigId); }
32  void addVetoTrigger(unsigned int trigId) { mVetoTriggers.push_back(trigId); }
33  void addTofUpperLimit(unsigned int thr) {mTofUpperLimit=thr;}
34 
35  void printTriggerId(int v=1) {mPrint=v;}
36 
37  const vector<unsigned int> getTriggers() const {return mGoodTriggers;}
38  const vector<unsigned int> getVetoTriggers() const {return mGoodTriggers;}
39 
40  virtual const char* GetCVS() const
41  {static const char cvs[]="Tag $Name: $ $Id: StTriggerFilterMaker.h,v 1.4 2015/09/09 20:29:39 akio Exp $ built " __DATE__ " " __TIME__; return cvs;}
42 
43 private:
44  vector<unsigned int> mGoodTriggers;
45  vector<unsigned int> mVetoTriggers;
46  unsigned int mTofUpperLimit=0;
47  int mPrint;
48 
49  ClassDef(StTriggerFilterMaker,1)
50 };
51 
52 #endif
53 
54 /*****************************************************************************
55  * $Log: StTriggerFilterMaker.h,v $
56  * Revision 1.4 2015/09/09 20:29:39 akio
57  * Adding Vetoing TriggerId
58  * Also adding printing if option is set
59  *
60  * Revision 1.3 2014/08/06 11:43:40 jeromel
61  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
62  *
63  * Revision 1.2 2008/07/31 18:02:14 mattheww
64  * Added method to get trigger list
65  *
66  * Revision 1.1 2008/01/23 04:45:08 kocolosk
67  * Privileged Maker which skips events unless they fired any one of a set of supplied trigIDs
68  *
69  *****************************************************************************/