forked from lorenzozana/EdGen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEdProcess.cxx
46 lines (31 loc) · 830 Bytes
/
EdProcess.cxx
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
#include "EdProcess.h"
EdProcess::EdProcess(const char *file, char *file2){
finp = new EdInput(file);
fmodel = new EdModel(finp);
fphy = new EdPhysics(fmodel);
fout = new EdOutput(finp,file2);
return;
}
void EdProcess::Run(){
int nevt = finp->GetNevt();
printf("nevt = %d\n", nevt);
int evt;
int nprnt = finp->GetNprnt();
TString fmtst[3];
fmtst[0] = "ROOT";
fmtst[1] = "ROOT and LUND";
int fmt = finp->Get_fmt();
for( evt = 0; evt < nevt; evt++ ){
if( (evt%nprnt) == 0 ){printf("Event %10d \n", evt);}
fphy->MakeEvent(fout, fmodel);
}
if (fmt == 2 ) { // also LUND format
printf("Creating LUND output \n") ;
fout->MakeFileLUND();
}
fout->Close();
return;
}
EdProcess::~EdProcess(){
return;
}