StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StVirtualTriggerSimu.h
1 #ifndef STAR_StVirtualTriggerSimu
2 #define STAR_StVirtualTriggerSimu
3 
4 // $Id: StVirtualTriggerSimu.h,v 1.7 2016/03/18 22:49:39 zchang Exp $
5 
6 /*****************************************************************************
7  * @class StVirtualTriggerSimu
8  * @author A.Kocoloski
9  *
10  * Abstract base class defining an interface for subdetector trigger simulators.
11  *****************************************************************************/
12 
13 #include "TString.h"
14 
15 enum StTriggerSimuDecision { kNo, kYes, kDoNotCare };
16 
18 {
19 public:
20  StVirtualTriggerSimu() : mSource("MuDst") {}
21  virtual ~StVirtualTriggerSimu() {}
22  virtual bool isTrigger(int trigId);
23 
25  virtual StTriggerSimuDecision triggerDecision(int trigId) = 0;
26 
27  virtual void Init();
28  virtual void InitRun(int runnumber) = 0;
29  virtual void Make() = 0;
30  virtual void Clear();
31 
33  virtual void setMC(int flag) { mMCflag = flag; }
34  virtual void setYear(int year) { mYear = year; }
36  virtual void setSource(const char* source) { mSource = source; }
37 
38 protected:
39  int mMCflag;
40  int mYear;
41  TString mSource;
42  ClassDef(StVirtualTriggerSimu,1)
43 };
44 
45 #endif
46 
47 /*****************************************************************************
48  * $Log: StVirtualTriggerSimu.h,v $
49  * Revision 1.7 2016/03/18 22:49:39 zchang
50  * updating trigger simulator for run12 analysis
51  *
52  * Revision 1.6 2010/01/08 15:18:27 pibero
53  * Default input source is "MuDst" for all subdetectors.
54  *
55  * Revision 1.5 2009/12/22 18:10:57 pibero
56  * Added ability to set input source (MuDst or StEvent) for BBC trigger simulator.
57  *
58  * Revision 1.4 2007/11/08 20:59:34 kocolosk
59  * subdet isTrigger returns a bool
60  * triggerDecision returns enumerator including kDoNotCare
61  *
62  * Revision 1.3 2007/10/22 23:09:48 balewski
63  * split L2 to generic and year specific, not finished
64  *
65  * Revision 1.2 2007/10/12 20:10:24 balewski
66  * cleanup
67  *
68  * Revision 1.1 2007/10/12 17:12:30 kocolosk
69  * rename ABC class for subdetector trigger simulators
70  * StTriggerSimu => StVirtualTriggerSimu
71  *
72  * Revision 1.1 2007/09/24 18:32:06 kocolosk
73  * added ABC class defining an interface for subdetector simulators
74  *
75  *****************************************************************************/
76 
virtual StTriggerSimuDecision triggerDecision(int trigId)=0
like isTrigger(), but returns kDoNotCare if detector isn't a part of the given trigId ...
virtual void setMC(int flag)
0 == real data, 1 or more == Monte Carlo
virtual void setSource(const char *source)
Options are: "MuDst", "StEvent".