Revision: | 1.1 |
Committed: | Wed Dec 9 09:10:03 2009 UTC (15 years, 4 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, HEAD |
Branch point for: | Mit_025c_branch |
Log Message: | merge macro |
# | User | Rev | Content |
---|---|---|---|
1 | loizides | 1.1 | // $Id: runSkimmingExample.C,v 1.6 2009/08/11 15:32:46 loizides Exp $ |
2 | |||
3 | #if !defined(__CINT__) || defined(__MAKECINT__) | ||
4 | #include <TSystem.h> | ||
5 | #include <TRandom.h> | ||
6 | #include <TParameter.h> | ||
7 | #include "MitAna/DataUtil/interface/Debug.h" | ||
8 | #include "MitAna/TreeMod/interface/Analysis.h" | ||
9 | #include "MitAna/TreeMod/interface/OutputMod.h" | ||
10 | #endif | ||
11 | |||
12 | //-------------------------------------------------------------------------------------------------- | ||
13 | void merge(const char *files, | ||
14 | const char *prefix="mergetest", | ||
15 | UInt_t nev=0) | ||
16 | { | ||
17 | using namespace mithep; | ||
18 | gDebugMask = Debug::kAnalysis; | ||
19 | gDebugLevel = 1; | ||
20 | |||
21 | OutputMod *omod = new OutputMod; | ||
22 | omod->SetFileName(prefix); | ||
23 | omod->Keep("*"); | ||
24 | |||
25 | Analysis *ana = new Analysis; | ||
26 | ana->SetSuperModule(omod); | ||
27 | if (nev) | ||
28 | ana->SetProcessNEvents(nev); | ||
29 | ana->AddFile(files); | ||
30 | |||
31 | // run the analysis after successful initialisation | ||
32 | ana->Run(0); | ||
33 | } |