StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StEStructPool
macros
selectAllDEtaM3.C
1
void
selectAllDEtaM3(
const
char
* dirname){
2
3
// -- example for recombining histograms by selection in new root file
4
//
5
// root.exe -q -b selectASNS.C'("dirContainingFinal.rootFile")
6
//
7
8
TString dir(dirname);
9
dir+=
"/final.root"
;
10
gSystem->Load(
"StEStructPoolSupport.so"
);
11
12
StEStructHAdd
adder;
13
14
TFile * tf=
new
TFile(dir.Data());
15
16
if
(!tf){
17
cout<<
"error opening file "
<<endl;
18
return ;
19
};
20
21
//--> do all of the following
22
const
char
* oname[]={
"LDEall"
,
"LDEallAS"
,
"LDEallNS"
,
"SDEall"
,
"SDEallAS"
,
"SDEallNS"
};
23
24
25
const
int
_map[6][8]= { 0, 3, 4, 7, 8,11,12,15,
26
0, 4, 8,12, 0, 0, 0, 0,
27
3, 7,11,15, 0, 0, 0, 0,
28
1, 2, 5, 6, 9,10,13,14,
29
1, 5, 9,13, 0, 0, 0, 0,
30
2, 6,10,14, 0, 0, 0, 0};
31
32
int
num[6]={8,4,4,8,4,4};
33
34
35
for
(
int
k=0;k<6;k++){
36
int
nin = num[k];
37
int
* ndata=_map[k];
38
for
(
int
i=0;i<8;i++) cout<<ndata[i]<<
","
;
39
cout<<
" = "
<<nin<<endl;
40
41
TString fname(dirname);
42
fname+=
"/"
;
43
fname+=oname[k];
44
fname+=
".root"
;
45
adder.addCuts(fname.Data(),tf,ndata,nin);
46
}
47
48
/*
49
int nas[16];//={0,12,4,5,8,9,12,13};
50
int numas=16;
51
for(int i=0;i<numas;i++)nas[i]=i;
52
TString fname(dirname); fname+="/all";
53
fname+=".root";
54
adder.addCuts(fname.Data(),tf,nas,numas);
55
*/
56
57
};
58
59
StEStructHAdd
Definition:
StEStructHAdd.h:20
Generated by
1.8.5