1 |
loizides |
1.5 |
// $Id: runFullExample.C,v 1.4 2008/11/25 14:31:19 loizides Exp $
|
2 |
bendavid |
1.1 |
|
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 |
loizides |
1.4 |
#include "MitAna/PhysicsMod/interface/FullExampleMod.h"
|
8 |
bendavid |
1.1 |
#endif
|
9 |
|
|
|
10 |
|
|
//--------------------------------------------------------------------------------------------------
|
11 |
|
|
void runFullExample(const char *files = "mit-full_000.root")
|
12 |
|
|
{
|
13 |
|
|
using namespace mithep;
|
14 |
|
|
gDebugMask = Debug::kAnalysis;
|
15 |
|
|
gDebugLevel = 1;
|
16 |
|
|
|
17 |
|
|
// set up the modules
|
18 |
|
|
FullExampleMod *mod = new FullExampleMod;
|
19 |
|
|
|
20 |
|
|
// set up analysis
|
21 |
|
|
Analysis *ana = new Analysis;
|
22 |
bendavid |
1.3 |
ana->SetUseHLT(false);
|
23 |
bendavid |
1.1 |
ana->SetSuperModule(mod);
|
24 |
|
|
ana->AddFile(files);
|
25 |
loizides |
1.5 |
if (gROOT->IsBatch())
|
26 |
|
|
ana->SetOutputName("mit-full-hist.root");
|
27 |
bendavid |
1.1 |
|
28 |
|
|
// run the analysis after successful initialisation
|
29 |
loizides |
1.5 |
ana->Run(!gROOT->IsBatch());
|
30 |
bendavid |
1.1 |
}
|