BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
getCurConstPar_dEdXCal.cxx
Go to the documentation of this file.
1//void getPar(string filename)
2{
3 //TFile* f=new TFile(filename.c_str());
4 TFile* f=new TFile("../CurConstRoot/DedxCurConst_data_minrun-maxrun_bossversion.root");
5 TTree *curve = (TTree*) f->Get("curve");
6 TTree *sigma = (TTree*) f->Get("sigma");
7
8 double Curve[100];
9 //double* Curve;
10 double Sigma[100];
12
13 curve->SetBranchAddress("CurveSize",&CurveSize);
14 curve->SetBranchAddress("curve",Curve);
15 sigma->SetBranchAddress("SigmaSize",&SigmaSize);
16 sigma->SetBranchAddress("sigma",Sigma);
17
18 // cout<<"AS!!!!!"<<endl;
19
20 //int n = curve->GetEntries();
21 ofstream file("test_data.dat");
22 curve->GetEntry(0);
23
24 //cout<<CurveSize<<" sucess!"<<endl;
25 // cout<<curve->GetEntries()<<" sucess!"<<endl;
26 //double cur;
27 for(int i=0;i<CurveSize;i++)
28 {
29 // curve->GetEntry(i);
30 // file1<<i<<" "<<CurveSize<<endl;
31// cout<<Curve[i]<<endl;
32 // cur = Curve[i];
33 file<<i<<" "<<Curve[i]<<endl;
34 }
35 //file1.close();
36
37 //cout<<"AS!!!!!"<<endl;
38
39 //int m = sigma->GetEntries();
40 // ofstream file2("/ihepbatch/besd26/anff/Calib/sigma_jpsi.dat");
41 sigma->GetEntry(0);
42 for(int i=0;i<SigmaSize;i++)
43 {
44 //sigma->GetEntry(i);
45 file<<i<<" "<<Sigma[i]<<endl;
46 // file2<<SigmaSize<<" "<<Sigma<<endl;
47 }
48 // cout<<"AS!!!!!"<<endl;
49
50 file.close();
51}
52
char * file
Definition: DQA_TO_DB.cxx:15
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
TTree * sigma
double Curve[100]
double Sigma[100]
TTree * curve