1 |
loizides |
1.1 |
// $Id: runSimpleExample.C,v 1.9 2009/03/16 07:45:32 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/Validation/interface/MCParticlesValMod.h"
|
8 |
|
|
#endif
|
9 |
|
|
|
10 |
|
|
//--------------------------------------------------------------------------------------------------
|
11 |
|
|
void runMCParticlesVal(const char *files, UInt_t nev=0)
|
12 |
|
|
{
|
13 |
|
|
using namespace mithep;
|
14 |
|
|
gDebugMask = Debug::kAnalysis;
|
15 |
|
|
gDebugLevel = 1;
|
16 |
|
|
|
17 |
|
|
MCParticlesValMod *mod = new MCParticlesValMod;
|
18 |
|
|
|
19 |
|
|
// set up analysis
|
20 |
|
|
Analysis *ana = new Analysis;
|
21 |
|
|
ana->SetSuperModule(mod);
|
22 |
|
|
ana->AddFile(files);
|
23 |
|
|
ana->SetUseHLT(0);
|
24 |
|
|
if (nev>0)
|
25 |
|
|
ana->SetProcessNEvents(nev);
|
26 |
|
|
if (gROOT->IsBatch())
|
27 |
|
|
ana->SetOutputName("mcparticlesval.root");
|
28 |
|
|
|
29 |
|
|
// run the analysis after successful initialisation
|
30 |
|
|
ana->Run(!gROOT->IsBatch());
|
31 |
|
|
}
|