Revision: | 1.8 |
Committed: | Sun May 15 20:40:30 2011 UTC (13 years, 11 months ago) by bendavid |
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_021, Mit_021pre2, HEAD |
Branch point for: | Mit_025c_branch |
Changes since 1.7: | +4 -3 lines |
Log Message: | support more than 256 hlt paths |
# | Content |
---|---|
1 | // $Id: runHLTExample.C,v 1.7 2010/03/30 12:10:08 bendavid Exp $ |
2 | |
3 | #if !defined(__CINT__) || defined(__MAKECINT__) |
4 | #include <TROOT.h> |
5 | #include "MitAna/DataUtil/interface/Debug.h" |
6 | #include "MitAna/TreeMod/interface/Analysis.h" |
7 | #include "MitAna/TreeMod/interface/HLTMod.h" |
8 | #include "MitAna/PhysicsMod/interface/HLTExampleMod.h" |
9 | #endif |
10 | |
11 | //-------------------------------------------------------------------------------------------------- |
12 | void runHLTExample(const char *trigger="HLT_Mu15_v1", |
13 | //const char *files = "XX-MITDATASET-XX_000.root", |
14 | const char *files = "/castor/cern.ch/user/p/paus/filefi/020/p11-h160ww2l-gf-v1g1-pu/342631BD-F250-E011-9C32-00A0D1EE8B54.root", |
15 | Int_t nEvs = 0) |
16 | { |
17 | using namespace mithep; |
18 | gDebugMask = Debug::kAnalysis; |
19 | gDebugLevel = 1; |
20 | |
21 | HLTMod *hltmod = new HLTMod; |
22 | hltmod->SetPrintTable(kTRUE); |
23 | hltmod->AddTrigger(trigger); |
24 | hltmod->SetTrigObjsName("myhltobjs"); |
25 | |
26 | HLTExampleMod *hltexmod = new HLTExampleMod; |
27 | hltexmod->SetTrigObjsName("myhltobjs"); |
28 | hltmod->Add(hltexmod); |
29 | |
30 | // set up analysis |
31 | Analysis *ana = new Analysis; |
32 | if (0) { |
33 | hltmod->SetBitsName("HLTBits"); |
34 | ana->SetHLTTreeName("HLT"); |
35 | ana->SetHLTObjsName("HLTObjects"); |
36 | } |
37 | if (nEvs) |
38 | ana->SetProcessNEvents(nEvs); |
39 | ana->SetSuperModule(hltmod); |
40 | ana->AddFile(files); |
41 | if (gROOT->IsBatch()) |
42 | ana->SetOutputName("mit-hlt-hist.root"); |
43 | |
44 | // run the analysis after successful initialisation |
45 | ana->Run(!gROOT->IsBatch()); |
46 | |
47 | cout << "HLTMod: Accepted " << hltmod->GetNAccepted() |
48 | << " of " << hltmod->GetNEvents() << " events" << endl; |
49 | } |