source: fact/tools/marsmacros/mc2csv/mmc2csv.C@ 14612

Last change on this file since 14612 was 14612, checked in by Jens Buss, 12 years ago
corrected paths
  • Property svn:executable set to *
File size: 1.5 KB
Line 
1//--------------------------------------------------------------------------------
2//
3//
4//
5#include <TSystem.h>
6#include <TString.h>
7#include <TStyle.h>
8//#include <TCanvas.h>
9//#include <TMath.h>
10//#include <TFile.h>
11//#include <TH1.h>
12//#include <TH2F.h>
13//#include <TF1.h>
14//#include <TTree.h>
15
16#include <endian.h>
17
18
19//#include "MStatusDisplay.h"
20//#include "MStatusArray.h"
21//#include "MRawEvtData.h"
22//#include "MArrayB.h"
23
24//#include <stdio.h>
25//#include <iostream.h>
26
27#include "MonteCarlo.h"
28
29using namespace std;
30using namespace TMath;
31
32
33int mmc2csv(
34 TString rootFile = "/home_nfs/isdc/jbbuss/FACT-MC/00002249.001_D_MonteCarlo000.root",
35 TString csvDestination = "/home_nfs/isdc/jbbuss/FACT-MC",
36 int verbLvl = 0
37 )
38{
39
40 cout << "...loading MC file" << endl;
41 TString temp = rootFile;
42// if (!gSystem->BaseName(csvFile)){
43// TString csvFile = gSystem->DirName(csvLocation);
44
45 temp = temp.Remove(
46 rootFile.Last('.'),
47 rootFile.Length() - rootFile.Last('.')
48 );
49 csvDestination += "/";
50 csvDestination += gSystem->BaseName(temp);
51 csvDestination += ".csv";
52// }
53
54// cout << csvDestination << endl ;
55
56 MonteCarlo MC( rootFile );
57
58 cout << "...setting verbosity Level" << endl;
59 MC.SetVerbosityLevel(verbLvl);
60
61 cout << "...converting mc to csv" << endl;
62 MC.WriteMc2Csv(csvDestination);
63
64return 0;
65
66}
67
68
Note: See TracBrowser for help on using the repository browser.