Revision: | 1.3 |
Committed: | Wed Dec 2 20:27:42 2009 UTC (15 years, 5 months ago) by loizides |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012h, Mit_012g, Mit_012f, Mit_012e, Mit_012d, HEAD |
Branch point for: | Mit_025c_branch |
Changes since 1.2: | +3 -3 lines |
Log Message: | Updated L1 mask to 128 bits |
# | User | Rev | Content |
---|---|---|---|
1 | loizides | 1.1 | //-------------------------------------------------------------------------------------------------- |
2 | loizides | 1.3 | // $Id: L1Mod.h,v 1.2 2009/11/24 15:58:12 loizides Exp $ |
3 | loizides | 1.1 | // |
4 | // L1Mod | ||
5 | // | ||
6 | // This module allows to select events according to given L1 trigger bits. The trigger bits | ||
7 | // are selected via their corresponding L1 trigger name. | ||
8 | // The trigger name is added to the list of accepted triggers using AddTrigger(). Each member of | ||
9 | // this list will be logically "ored" to the search mask (see description of AddTrigger()). | ||
10 | // L1Mod will abort processing the chain of sub-modules if the trigger bits did not | ||
11 | // match the given trigger mask, unless you call SetAbortIfNotAccepted(kFALSE). | ||
12 | // For convenience L1Mod defines two virtual functions, OnAccepted() and OnFailed() | ||
13 | // that can be implemented in derived classes. OnAccepted() will be called if the event passes | ||
14 | // the trigger mask, on Failed() if it did not. | ||
15 | // | ||
16 | // Authors: C.Loizides | ||
17 | //-------------------------------------------------------------------------------------------------- | ||
18 | |||
19 | #ifndef MITANA_TREEMOD_L1MOD_H | ||
20 | #define MITANA_TREEMOD_L1MOD_H | ||
21 | |||
22 | #include <string> | ||
23 | #include <TString.h> | ||
24 | #include "MitAna/TreeMod/interface/BaseMod.h" | ||
25 | |||
26 | namespace mithep | ||
27 | { | ||
28 | class TriggerTable; | ||
29 | class L1TriggerMask; | ||
30 | |||
31 | class L1Mod : public BaseMod { | ||
32 | public: | ||
33 | L1Mod(const char *name="L1Mod", const char *title="L1 trigger module"); | ||
34 | ~L1Mod(); | ||
35 | |||
36 | void AddTrigger(const char *expr); | ||
37 | const char *GetBitsName() const { return fBitsName; } | ||
38 | Int_t GetNEvents() const { return fNEvents; } | ||
39 | Int_t GetNAccepted() const { return fNAcceped; } | ||
40 | Int_t GetNFailed() const { return fNFailed; } | ||
41 | void SetAbortIfNotAccepted(Bool_t b) { fAbort = b; } | ||
42 | void SetBitsName(const char *n) { fBitsName = n; } | ||
43 | void SetIgnoreBits(Bool_t b) { fIgnoreBits = b; } | ||
44 | void SetPrintTable(Bool_t b) { fPrintTable = b; } | ||
45 | |||
46 | protected: | ||
47 | void BeginRun(); | ||
48 | virtual void OnAccepted() {/*could be implemented in derived classes*/} | ||
49 | virtual void OnFailed() {/*could be implemented in derived classes*/} | ||
50 | void Process(); | ||
51 | void SlaveBegin(); | ||
52 | void SlaveTerminate(); | ||
53 | |||
54 | Bool_t fAbort; //=true then abort (sub-)modules if not accepted | ||
55 | Bool_t fPrintTable; //=true then print L1 trigger table in BeginRun | ||
56 | Bool_t fIgnoreBits; //=true then try to get trigger objects (def=0) | ||
57 | TString fBitsName; //trigger bits branch name | ||
58 | std::vector<std::string> fTrigNames; //trigger names requested for test mask | ||
59 | const L1TriggerMask *fBits; //!trigger bits branch | ||
60 | loizides | 1.3 | std::vector<BitMask128> fTrigBitsAnd; //!trigger bits used in mask |
61 | std::vector<BitMask128> fTrigBitsCmp; //!trigger bits used for comparison | ||
62 | loizides | 1.1 | BitMask256 fBitsDone; //!bits for which events are accepted |
63 | const TriggerTable *fTriggers; //!imported published L1 trigger table | ||
64 | Int_t fNEvents; //!number of processed events | ||
65 | Int_t fNAcceped; //!number of accepted events | ||
66 | Int_t fNFailed; //!number of failed events | ||
67 | |||
68 | ClassDef(L1Mod, 1) // L1 TAM module | ||
69 | }; | ||
70 | } | ||
71 | #endif |