ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/TreeMod/interface/L1Mod.h
Revision: 1.2
Committed: Tue Nov 24 15:58:12 2009 UTC (15 years, 5 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_012c
Changes since 1.1: +1 -4 lines
Log Message:
Remove algo setter

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.2 // $Id: L1Mod.h,v 1.1 2009/11/24 14:27:32 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     std::vector<BitMask64 > fTrigBitsAnd; //!trigger bits used in mask
61     std::vector<BitMask64> fTrigBitsCmp; //!trigger bits used for comparison
62     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