-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cc
executable file
·65 lines (53 loc) · 1.38 KB
/
main.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include <iostream>
#include <vector>
#include <fstream>
#include <string>
#include <algorithm>
#include <stdio.h>
#include <TString.h>
#include <TSystem.h>
#include <TFile.h>
#include <TTree.h>
#include <TMinuit.h>
//#include <pthread.h>
//#include <unistd.h>
//#include "TThread.h"
#include "AnaInput.h"
#include "TestRun.h"
//#include "mtest.h"
using namespace std;
int main( int argc, const char* argv[] ) {
string datacardfile = ( argc > 1 ) ? argv[1] : "DataCard.txt";
//AnaInput *Input = new AnaInput( datacardfile );
AnaInput *Input = AnaInput::Instance() ;
Input->SetDatacard( datacardfile ) ;
// method to read root files
string mesFileName ;
Input->GetParameters( "TheMES", &mesFileName );
int module = -1 ;
Input->GetParameters( "Module", & module ) ;
if ( module == 0 ) {
TestRun *tRun = new TestRun( datacardfile ) ;
//tRun->ReadMES( mesFileName );
tRun->TestPlot( mesFileName );
delete tRun ;
}
if ( module == 1 ) {
TestRun *tRun = new TestRun( datacardfile ) ;
tRun->RootMethod();
delete tRun ;
}
if ( module == 2 ) {
TestRun *tRun = new TestRun( datacardfile ) ;
tRun->RawData();
delete tRun ;
}
if ( module == 3 ) {
TestRun *tRun = new TestRun( datacardfile ) ;
tRun->BackgroundTune();
delete tRun ;
}
delete Input ;
cout<<" Finished !!!"<<endl ;
return 0;
}