ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/TreeMod/src/HLTMod.cc
(Generate patch)

Comparing UserCode/MitAna/TreeMod/src/HLTMod.cc (file contents):
Revision 1.21 by bendavid, Sun May 15 20:40:30 2011 UTC vs.
Revision 1.23 by paus, Wed Mar 28 12:15:38 2012 UTC

# Line 49 | Line 49 | void HLTMod::AddTrigger(const char *expr
49    // "A", "!A", "A&B", "A&!B" or "A&B&C"  
50  
51    string tname(expr);
52 <  std::pair<std::string,std::pair<UInt_t,UInt_t> > element(tname,std::pair<UInt_t,UInt_t>(firstRun,lastRun));
52 >  std::pair<std::string,std::pair<UInt_t,UInt_t> >
53 >    element(tname,std::pair<UInt_t,UInt_t>(firstRun,lastRun));
54    fTrigNames.push_back(element);
55   }
56  
# Line 73 | Line 74 | void HLTMod::AddTrigObjs(UInt_t tid)
74        TIter iter(list->MakeIterator());
75        const TriggerObject *to = dynamic_cast<const TriggerObject*>(iter.Next());
76        while (to) {
77 <        if ( (fObjMode == kAll) ||
78 <             ((fObjMode==kHlt) && (to->IsHLT())) ||
79 <             ((fObjMode==kL1) && (to->IsL1())) )
77 >        if ( (fObjMode == kAll)  ||
78 >             ((fObjMode == kHlt) && (to->IsHLT())) ||
79 >             ((fObjMode == kL1)  && (to->IsL1())) )
80            fMyTrgObjs->Add(to);    
81          to = dynamic_cast<const TriggerObject*>(iter.Next());
82        }
# Line 94 | Line 95 | void HLTMod::BeginRun()
95  
96    if (fPrintTable) {
97      Info("BeginRun", "Get trigger table for run %d", GetEventHeader()->RunNum());
98 +    printf(" Trigger table for run %d:\n",GetEventHeader()->RunNum());
99      fTriggers->Print();
100    }
101    
# Line 119 | Line 121 | void HLTMod::BeginRun()
121          TObjString *s = dynamic_cast<TObjString*>(arr->At(j));
122          if (!s)
123            continue;
124 <        const char *sptr = s->GetString().Data();
124 >        TString st = s->GetString();
125 >        bool wildcard = false;
126 >        if (st.EndsWith("*")) {
127 >          st.ReplaceAll("*","");
128 >          wildcard = true;
129 >        }
130 >        const char *sptr = st.Data();
131          Bool_t invert = kFALSE;
132          if (sptr[0] == '!') {
133            invert = kTRUE; //inverted bit set
134            ++sptr;
135          }
136 <        const TriggerName *tn = fTriggers->Get(sptr);
136 >        const TriggerName *tn = 0;
137 >        if (wildcard) {
138 >          tn = fTriggers->GetWildcard(sptr);
139 >        }
140 >        else {
141 >          tn = fTriggers->Get(sptr);
142 >        }
143          if (!tn) {
144            Warning("BeginRun", "Trigger %s not found.", sptr);
145            continue;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines