ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/macros/examples/runSimpleExample.C
Revision: 1.8
Committed: Tue Nov 25 14:31:19 2008 UTC (16 years, 5 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_008pre1, Mit_006b, Mit_006a
Changes since 1.7: +2 -2 lines
Log Message:
Cleanup

File Contents

# Content
1 // $Id: runSimpleExample.C,v 1.7 2008/11/25 14:00:25 loizides 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/PhysicsMod/interface/SimpleExampleMod.h"
8 #endif
9
10 //--------------------------------------------------------------------------------------------------
11 void runSimpleExample(const char *files = "mit-gen_000.root")
12 {
13 using namespace mithep;
14 gDebugMask = Debug::kAnalysis;
15 gDebugLevel = 1;
16
17 SimpleExampleMod *smod = new SimpleExampleMod;
18
19 // set up analysis
20 Analysis *ana = new Analysis;
21 ana->SetSuperModule(smod);
22 ana->AddFile(files);
23 if (gROOT->IsBatch())
24 ana->SetOutputName("mit-example-hist.root");
25
26 // run the analysis after successful initialisation
27 ana->Run(!gROOT->IsBatch());
28 }