11 #include "Riostream.h"
22 void MergeRootfile( TDirectory *target, TList *sourcelist );
24 void haddWanaSL11bX() {
44 void haddWanaSL11bY() {
45 haddWana(
"production2009_500Gev_c_1");
46 haddWana(
"production2009_500Gev_c_2");
47 haddWana(
"production2009_500Gev_c_all");
50 void haddWanaSL11b() {
55 haddWana(
"run9setABCD");
58 void haddWana(
char *set,TString iPath=
"/star/data01/pwg/stevens4/wAnalysis/xSecPaper/sl11b/data/") {
62 if(strstr(
"F10505",set)>0) {
63 char *runL=
" R10096141 R10097003 R10097004 R10097005 R10097008";
64 }
else if(strstr(
"run9setA",set)>0) {
65 char *runL=
"R10076134 R10076136 R10076152 R10076153 R10076154 R10076161 R10078077 R10078078 R10078081 R10078082 R10078092 R10078093 R10078094 R10079002 R10079004 R10079005 R10079006 R10079007 R10079015 R10079016 R10079017 R10079027 R10079028 R10079030 R10079031 R10079033 R10079034 R10079035 R10079040 R10079042 R10079045 R10079046 R10079047 R10079049 R10079050 R10079057 R10079059 R10079060 R10079061 R10079062 R10079063 R10079069 R10079070 R10079071 R10079074 R10079078 R10079079 R10079080 R10079081 R10079129 R10079130 R10079131 R10079135 R10079137 R10079138 R10079139 R10080019 R10080020 R10080022 R10080040 R10080042 R10080061 R10080062 R10080076 R10080077 R10080078 R10080080 R10080081 R10081007 R10081013 R10081026 R10081027 R10081047 R10081053 R10081055 R10081056 R10081096 R10081102 R10081104 R10081107 R10081108 R10081110 R10081111 R10081112 R10081115 R10081117 R10082003 R10082005 R10082008 R10082011 R10082018 R10082021 R10082022 R10082027 R10082029 R10082031 R10082032 R10082035 R10082043 R10082071 R10082072 R10082073 R10082074 R10082075 R10082076 R10082077 R10082078 R10082083 R10082085 R10082091 R10082092 R10082093 R10082095 R10083013 R10083018 R10083019 R10083026 R10083027 R10083028 R10083032 R10083033 R10083034 R10083037 R10083040 R10083041 R10083045 R10083047 R10083052 R10083053 R10083054 R10083055 R10083056 R10083058 R10084010 R10084011 R10084021 R10084022 R10084024 R10085016 R10085017 R10085018 R10085019 R10085023 R10085024 R10085025 R10085026 R10085027 R10085028 R10085029 R10085030 R10085031 R10085032 R10085038 R10085039 R10085104 R10085107 R10085108 R10085109 R10085113 R10085114 R10085115 R10085131 R10085132 R10085133 R10085134 R10085135 R10085136 R10085140 R10086001 R10086007 R10086008 R10086015 R10086022 R10086023 R10086024 R10086037 R10086043 R10086044 R10086046";
66 }
else if(strstr(
"run9setB",set)>0) {
67 char *runL=
"R10087001 R10087009 R10087011 R10087012 R10087018 R10087020 R10087021 R10087022 R10087023 R10087025 R10087028 R10087031 R10087032 R10087033 R10087034 R10087035 R10087036 R10087037 R10087041 R10087051 R10087052 R10087053 R10087054 R10087057 R10087058 R10087059 R10087062 R10087063 R10087065 R10087067 R10087069 R10087070 R10087071 R10087077 R10087078 R10087082 R10087084 R10087085 R10087088 R10087094 R10087096 R10087097 R10087114 R10087117 R10087119 R10087125 R10087126 R10088001 R10088010 R10088011 R10088013 R10088022 R10088024 R10088026 R10088027 R10088028 R10088029 R10088030 R10088031 R10088036 R10088058 R10088062 R10088063 R10088069 R10088070 R10088071 R10088075 R10088077 R10088081 R10088084 R10088085 R10088096 R10088102 R10088110 R10088111 R10088112 R10088113 R10088120 R10088121 R10089001 R10089004 R10089008 R10089010 R10089011 R10089015 R10089016 R10089019 R10089021 R10089023 R10089079 R10089080 R10089081 R10090001 R10090004 R10090005 R10090008 R10090013 R10090015 R10090017 R10090018 R10090019 R10090020 R10090022 R10090026 R10090027 R10090037 R10090038 R10090040 R10090042 R10090046 R10090047 R10090072 R10090074 R10090076 R10090079 R10090080 R10090081 R10090089 R10090095 R10090100 R10090108 R10090109 R10090111 R10090112 R10091089 R10091090 R10092002 R10092004 R10092009 R10092011 R10092021 R10092022 R10092023 R10092024 R10092027 R10092028 R10092029 R10092030 R10092031 R10092033 R10092034 R10092036 R10092037 R10092038 R10092039 R10092040 R10092042 R10092046 R10092047 R10092048 R10092049 R10092050 R10092084 R10092098 R10092102 R10092105 R10092107 R10093082 R10093083 R10093084 R10093131 R10094003 R10094005 R10094006 R10094007 R10094016 R10094019 R10094021 R10094022 R10094023 R10094024 R10094063 R10094067 R10094071 R10094073 R10094078 R10094084 R10094088 R10094089 R10094090 R10094092 R10094095 R10094096 R10094098 R10094099 R10094100 R10095022 R10095023 R10095024 R10095030 R10095036 R10095037 R10095039 R10095040 R10095041 R10095045 R10095046 R10095047 R10095048 R10095049 R10095050 R10095051 R10095052 R10095056 R10095057 R10095120 R10095121 R10095122 R10095125 R10096001 R10096002 R10096005 R10096006 R10096007 R10096008 R10096009 R10096014 R10096015 R10096019 R10096024 R10096025 R10096026 R10096027";
68 }
else if(strstr(
"run9setB_highHV",set)>0) {
69 char *runL=
"R10087001 R10087009 R10087011 R10087012 R10087018 R10087020 R10087021 R10087022 R10087023 R10087025 R10087028 R10087031 R10087032 R10087033 R10087034 R10087035 R10087036 R10087037 R10087041 R10087051 R10087052 R10087053 R10087054 R10087057 R10087058 R10087059 R10087062 R10087063 R10087065 R10087067 R10087069 R10087070 R10087071 R10087077 R10087078 R10087082 R10087084 R10087085 R10087088 R10087094 R10087096 R10087097 R10087114 R10087117 R10087119 R10087125 R10087126 R10088001 R10088010 R10088011 R10088013 R10088022 R10088024 R10088026 R10088027 R10088028 R10088029 R10088030 R10088031 R10088036 R10088058 R10088062 R10088063 R10088069 R10088070 R10088071 R10088075 R10088077 R10088081 R10088084 R10088085 R10088096 R10088102 R10088110 R10088111 R10088112 R10088113 R10088120 R10088121 R10089001 R10089004 R10089008 R10089010 R10089011 R10089015 R10089016 R10089019 R10089021 R10089023 R10089079 R10089080 R10089081 R10090001 R10090004 R10090005 R10090008 R10090013 R10090015 R10090017 R10090018 R10090019 R10090020 R10090022 R10090026 R10090027 R10090037 R10090038 R10090040 R10090042 R10090046 R10090047 R10090072 R10090074 R10090076 R10090079 R10090080 R10090081 R10090089 R10090095 R10090100 R10090108 R10090109 R10090111 R10090112 R10091089 R10091090 R10092002 R10092004 R10092009 R10092011 R10092021 R10092022 R10092023 R10092024 R10092027 R10092028 R10092029 R10092030 R10092031 R10092033 R10092034 R10092036 R10092037 R10092038 R10092039 R10092040 R10092042 R10092046 R10092047 R10092048 R10092049 R10092050 R10092084 R10092098 R10092102 R10092105 R10092107 R10093082 R10093083 R10093084 R10093131";
70 }
else if(strstr(
"run9setB_lowHV",set)>0) {
71 char *runL=
" R10094003 R10094005 R10094006 R10094007 R10094016 R10094019 R10094021 R10094022 R10094023 R10094024 R10094063 R10094067 R10094071 R10094073 R10094078 R10094084 R10094088 R10094089 R10094090 R10094092 R10094095 R10094096 R10094098 R10094099 R10094100 R10095022 R10095023 R10095024 R10095030 R10095036 R10095037 R10095039 R10095040 R10095041 R10095045 R10095046 R10095047 R10095048 R10095049 R10095050 R10095051 R10095052 R10095056 R10095057 R10095120 R10095121 R10095122 R10095125 R10096001 R10096002 R10096005 R10096006 R10096007 R10096008 R10096009 R10096014 R10096015 R10096019 R10096024 R10096025 R10096026 R10096027";
72 }
else if(strstr(
"run9setC",set)>0) {
73 char *runL=
" R10096141 R10097003 R10097004 R10097005 R10097008 R10097012 R10097016 R10097019 R10097021 R10097022 R10097026 R10097028 R10097029 R10097030 R10097038 R10097040 R10097044 R10097045 R10097087 R10097089 R10097091 R10097102 R10097104 R10097106 R10097108 R10097110 R10097117 R10097118 R10097137 R10097140 R10097145 R10097146 R10097149 R10097153 R10098029 R10098035 R10098038 R10098040 R10098045 R10099028 R10099029 R10099055 R10099057 R10099066 R10099067 R10099071 R10099073 R10099074 R10099076 R10099077 R10099078 R10099185 R10099186 R10099187 R10099188 R10099189 R10099194 R10099195 R10100005 R10100006 R10100008 R10100013 R10100014 R10100015 R10100016 R10100017 R10100021 R10100028 R10100029 R10100032 R10100067 R10100068 R10100070 R10100071 R10100072 R10100077 R10100079 R10100081 R10100093 R10100095 R10100098 R10100164 R10100165 R10100166 R10100167 R10100169 R10100172 R10100175 R10100176 R10100177 R10100178 R10100179 R10100180 R10101001 R10101005 R10101006 R10101008 R10101009 R10101011 R10101016 R10101017 R10101018 R10101019 R10101020";
74 }
else if(strstr(
"run9setD",set)>0) {
75 char *runL=
"R10101028 R10101029 R10101030 R10101037 R10101038 R10101039 R10101040 R10101059 R10101060 R10101061 R10101064 R10101065 R10101069 R10101070 R10101071 R10101074 R10101075 R10101076 R10101078 R10101081 R10101082 R10101083 R10101086 R10101088 R10101089 R10101090 R10101091 R10101092 R10101093 R10101094 R10102003 R10102031 R10102033 R10102036 R10102037 R10102039 R10102045 R10102046 R10102048 R10102050 R10102051 R10102055 R10102056 R10102062 R10102063 R10102065 R10102066 R10102069 R10102070 R10102094 R10102095 R10102096 R10102098 R10102100 R10102104 R10102105 R10102107 R10102108 R10102109 R10102110 R10102112 R10103001 R10103007 R10103008 R10103010 R10103011 R10103012 R10103015 R10103016 R10103017 R10103018 R10103027 R10103028 R10103031 R10103033 R10103034 R10103041 R10103042";
76 }
else if(strstr(
"run9setABCD",set)>0) {
77 char *runL=
"run9setA run9setB run9setC run9setD ";
78 }
else if(strstr(
"production2009_500Gev_c_1",set)>0) {
79 char *runL=
"R10085131 R10085132 R10085133 R10085134 R10085135 R10085136 R10085140 R10086001 R10086007 R10086008 R10086015 R10086022 R10086023 R10086024 R10086037 R10086043 R10086044 R10086046 R10087001 R10087009 R10087011 R10087012 R10087018 R10087020 R10087021 R10087022 R10087023 R10087025 R10087028 R10087031 R10087032 R10087033 R10087034 R10087035 R10087036 R10087037 R10087041 R10087051 R10087052 R10087053 R10087054 R10087057 R10087058 R10087059 R10087062 R10087063 R10087065 R10087067 R10087069 R10087070 R10087071 R10087077 R10087078 R10087082 R10087084 R10087085 R10087088 R10087094 R10087096 R10087097 R10087114 R10087117 R10087119 R10087125 R10087126 R10088001 R10088010 R10088011 R10088013 R10088022 R10088024 R10088026 R10088027 R10088028 R10088029 R10088030 R10088031 R10088036 R10088058 R10088062 R10088063 R10088069 R10088070 R10088071 R10088075 R10088077 R10088081 R10088084 R10088085 R10088096 R10088102 R10088110 R10088111 R10088112 R10088113 R10089008 R10089010 R10089011 R10089015 R10089016 R10089019 R10089021 R10089023 R10090001 R10090004 R10090005 R10090008 R10090013 R10090015 R10090017 R10090018 R10090019 R10090020 R10090022 R10090026 R10090027 R10090037 R10090038 R10090040 R10090042 R10090046 R10090047 R10090072 R10090074 R10090076 R10090079 R10090080 R10090081 R10090089 R10090095 R10090100 R10090108 R10090109 R10090111 R10090112 R10091089 R10091090 R10092002 R10092004 R10092009 R10092011 R10092021 R10092022 R10092023 R10092024 R10092027 R10092028 R10092029 R10092030 R10092031 R10092033 R10092034 R10092036 R10092037 R10092038 R10092039 R10092040 R10092042 R10092046 R10092047 R10092048 R10092049 R10092050 R10092084 R10092098 R10092102 R10092105 R10092107 R10093082 R10093083 R10093084 R10093131 R10094003 R10094005 R10094006 R10094007 R10094016 R10094019 R10094021 R10094022 R10094023 R10094024 R10094063 R10094067 R10094071 R10094073 R10094078 R10094084 R10094088 R10094089 R10094090 R10094092 R10094095 R10094096 R10094098 R10094099 R10094100 R10095022 R10095023 R10095024 R10095030 R10095036 R10095037 R10095039 R10095040 R10095041 R10095045 R10095046 R10095047 R10095048 R10095049 R10095050 R10095051 R10095052 R10095056 R10095057 R10095120 R10095121 R10095122 R10095125";
80 }
else if(strstr(
"production2009_500Gev_c_2",set)>0) {
81 char *runL=
"R10096001 R10096002 R10096005 R10096006 R10096007 R10096008 R10096009 R10096014 R10096015 R10096019 R10096024 R10096025 R10096026 R10096027 R10096141 R10097003 R10097004 R10097005 R10097008 R10097012 R10097016 R10097019 R10097021 R10097022 R10097026 R10097028 R10097029 R10097030 R10097038 R10097040 R10097044 R10097045 R10097087 R10097089 R10097091 R10097102 R10097104 R10097106 R10097108 R10097110 R10097117 R10097118 R10097137 R10097140 R10097145 R10097146 R10097149 R10097153 R10098029 R10098035 R10098038 R10098040 R10098045 R10099028 R10099029 R10099055 R10099057 R10099066 R10099067 R10099071 R10099073 R10099074 R10099076 R10099077 R10099078 R10099185 R10099186 R10099187 R10099188 R10099189 R10099194 R10099195 R10100005 R10100006 R10100008 R10100013 R10100014 R10100015 R10100016 R10100017 R10100021 R10100028 R10100029 R10100032 R10100067 R10100068 R10100070 R10100071 R10100072 R10100077 R10100079 R10100081 R10100093 R10100095 R10100098 R10100164 R10100165 R10100166 R10100167 R10100169 R10100172 R10100175 R10100176 R10100177 R10100178 R10100179 R10100180 R10101001 R10101005 R10101006 R10101008 R10101009 R10101011 R10101016 R10101017 R10101018 R10101019 R10101020 R10101028 R10101029 R10101030 R10101037 R10101038 R10101039 R10101040 R10101059 R10101060 R10101061 R10101064 R10101065 R10101069 R10101070 R10101071 R10101074 R10101075 R10101076 R10101078 R10101081 R10101082 R10101083 R10101086 R10101088 R10101089 R10101090 R10101091 R10101092 R10101093 R10101094 R10102003 R10102031 R10102033 R10102036 R10102037 R10102039 R10102045 R10102046 R10102048 R10102050 R10102051 R10102055 R10102056 R10102062 R10102063 R10102065 R10102066 R10102069 R10102070 R10102094 R10102095 R10102096 R10102098 R10102100 R10102104 R10102105 R10102107 R10102108 R10102109 R10102110 R10102112 R10103001 R10103007 R10103008 R10103010 R10103011 R10103012 R10103015 R10103016 R10103017 R10103018 R10103027 R10103028 R10103031 R10103033 R10103034 R10103041 R10103042";
82 }
else if(strstr(
"production2009_500Gev_c_all",set)>0) {
83 char *runL=
"production2009_500Gev_c_1 production2009_500Gev_c_2";
84 }
else if(strstr(
"jamie_1",set)>0) {
85 char *runL=
"R10085113 R10085114 R10085115 R10085131 R10085132 R10085133 R10085134 R10085135 R10085136 R10085140 R10086001 R10086007 R10086008 R10086015 R10086022 R10086023 R10086024 R10086037 R10086043 R10086044 R10086046 R10087009 R10087011 R10087012 R10087018 R10087020 R10087021 R10087022 R10087023 R10087025 R10087028 R10087031 R10087032 R10087033 R10087034 R10087035 R10087036 R10087037 R10087041 R10087051 R10087052 R10087053 R10087054 R10087057 R10087058 R10087059 R10087062 R10087063 R10087065 R10087067 R10087069 R10087070 R10087071 R10087077 R10087082 R10087084 R10087085 R10087088 R10087094 R10087096 R10087097 R10088010 R10088011 R10088013 R10088022 R10088024 R10088026 R10088027 R10088028 R10088029 R10088030 R10088031 R10088036 R10088058 R10088062 R10088063 R10088069 R10088070 R10088071 R10088077 R10088081 R10088084 R10088085 R10088096 R10088102 R10088111 R10088113 R10089008 R10089010 R10089011 R10089015 R10089016 R10089019 R10089021 R10089023 R10089080 R10089081 R10090001 R10090004 R10090005 R10090013 R10090015 R10090017 R10090018 R10090019 R10090020 R10090022 R10090026 R10090027 R10090037 R10090038 R10090040 R10090042 R10090046 R10090047 R10090072 R10090074 R10090076 R10090079 R10090080 R10090081 R10090089 R10090095 R10090100 R10090108 R10090109 R10090111 R10090112 R10092004 R10092009 R10092011 R10092021 R10092024 R10092027 R10092028 R10092029 R10092030 R10092031 R10092033 R10092034 R10092036 R10092037 R10092038 R10092039 R10092040 R10092042 R10092046 R10092047 R10092048 R10092049 R10092050 R10092105 R10092107 R10093082 R10093083 R10093084 R10094003 R10094005 R10094006 R10094007 R10094019 R10094021 R10094022 R10094023 R10094024 R10094063 R10094067 R10094071 R10094073 R10094078 R10094084 R10094088 R10094089 R10094090 R10094092 R10094095 R10094096 R10094098 R10094099 R10095022 R10095024 R10095030 R10095036 R10095037 R10095039 R10095040 R10095041 R10095045 R10095046 R10095047 R10095048 R10095049 R10095050 R10095051 R10095052 R10095120 R10095121 R10095125";
86 }
else if(strstr(
"jamie_2",set)>0) {
87 char *runL=
"R10096001 R10096002 R10096005 R10096006 R10096007 R10096008 R10096009 R10096014 R10096015 R10096019 R10096025 R10096026 R10096027 R10096141 R10097008 R10097016 R10097019 R10097021 R10097022 R10097026 R10097029 R10097030 R10097038 R10097040 R10097044 R10097045 R10097087 R10097089 R10097102 R10097104 R10097106 R10097108 R10097110 R10097137 R10097140 R10098029 R10098035 R10098038 R10098040 R10098045 R10099185 R10099186 R10099187 R10099188 R10099189 R10099194 R10099195 R10100006 R10100008 R10100013 R10100014 R10100015 R10100016 R10100017 R10100021 R10100028 R10100029 R10100032 R10100068 R10100070 R10100071 R10100072 R10100077 R10100079 R10100081 R10100093 R10100095 R10100098 R10100164 R10100165 R10100166 R10100169 R10100172 R10100175 R10100176 R10100178 R10100179 R10100180 R10101001 R10101006 R10101008 R10101009 R10101011 R10101016 R10101018 R10101019 R10101020 R10101029 R10101030 R10101037 R10101038 R10101039 R10101040 R10101059 R10101060 R10101061 R10101064 R10101065 R10101069 R10101070 R10101071 R10101074 R10101078 R10101081 R10101083 R10101086 R10101088 R10101089 R10101090 R10101091 R10101092 R10101094 R10102003 R10102031 R10102033 R10102036 R10102037 R10102039 R10102045 R10102046 R10102048 R10102050 R10102051 R10102055 R10102056 R10102062 R10102063 R10102065 R10102066 R10102069 R10102070 R10102094 R10102095 R10102096 R10102098 R10102100 R10102104 R10102105 R10102107 R10102108 R10102109 R10102110 R10102112 R10103001 R10103007 R10103008 R10103010 R10103011 R10103012 R10103015 R10103016 R10103017 R10103018 R10103027 R10103028 R10103031 R10103034 R10103041 R10103042";
88 }
else if(strstr(
"jamie_all",set)>0) {
89 char *runL=
"jamie_1 jamie_2";
90 }
else if(strstr(
"higherTpcHV",set)>0) {
91 char *runL=
"run9setA run9setB_highHV";
92 }
else if(strstr(
"lowerTpcHV",set)>0) {
93 char *runL=
"run9setB_lowHV run9setC run9setD";
94 }
else if(strstr(
"zdcRateLow",set)>0) {
95 char *runL=
"zdcRateLow1 zdcRateLow2";
96 }
else if(strstr(
"zdcRateLow1",set)>0) {
97 char *runL=
"R10079057 R10079059 R10079060 R10079061 R10079062 R10079063 R10079069 R10079070 R10079071 R10079074 R10079078 R10079079 R10079080 R10079081 R10087119 R10076161 R10076154 R10076153 R10076152 R10090047 R10076136 R10076134 R10090046 R10086046 R10090042 R10086044 R10086043 R10086037 R10090111 R10086024 R10086023 R10086022 R10090040 R10090109 R10090108 R10090112 R10086015 R10090100 R10082095 R10086008 R10082091 R10092050 R10078094 R10082092 R10082093 R10078093 R10082083 R10082085 R10092049 R10086007 R10079017 R10092048 R10078092 R10079016 R10090038 R10082078 R10079015 R10090095 R10082077 R10092047 R10082076 R10086001 R10082075 R10092046 R10082074 R10079007 R10078081 R10078082 R10082073 R10085140 R10079006 R10082072 R10085136 R10079005 R10078078 R10079004 R10090037 R10078077 R10092042 R10088036 R10081056 R10080081 R10082071 R10079002 R10090089 R10085135 R10081055 R10080080 R10081053 R10090017 R10090018 R10090019 R10090020 R10090022 R10090026 R10090027 R10092040 R10092039 R10088031 R10088085 R10085134 R10085039 R10080078 R10092038 R10085038 R10094100 R10090015 R10080077 R10085133 R10085132 R10088030 R10088029 R10092037 R10080076 R10081047 R10085131 R10088084 R10094099 R10092036 R10083058 R10087097 R10088028 R10087078 R10092034 R10088027 R10087094 R10087041 R10083052 R10087096 R10088026 R10094098 R10083056 R10083055 R10080062 R10088081 R10092033 R10083054 R10092031 R10090013 R10088024 R10080061 R10083053 R10094096 R10087077 R10088022 R10087088 R10085032 R10087037 R10083047 R10089023 R10092030 R10087036 R10094095 R10083045 R10085031 R10092029 R10089021 R10088077 R10087035 R10087085 R10097045 R10087034 R10094092 R10090008 R10085030 R10087084 R10082043 R10089019 R10087033 R10081027 R10085029 R10087082 R10083041 R10087032 R10092028 R10090005 R10081026 R10097044 R10094090 R10083040 R10090004 R10088013 R10085028 R10087031 R10089016 R10082035 R10088075 R10092027 R10099078 R10096027 R10088011 R10089015 R10094089 R10085115 R10082032 R10085027 R10088010 R10083037 R10087071 R10089011 R10087028 R10092024 R10082031 R10099077 R10097040 R10092023 R10094088 R10099076 R10085113 R10096026 R10085114 R10103018 R10092022 R10088001 R10092021 R10079050 R10085026 R10089010 R10088071 R10099074 R10082029 R10097038 R10094084 R10079049 R10087070 R10085025 R10083034 R10088070 R10081013 R10083033 R10089008 R10099073 R10096025 R10087025 R10082027 R10103017 R10087023 R10079047 R10087022 R10094078 R10087069 R10079046 R10085024 R10085023 R10099071 R10096024 R10088069 R10083032 R10103016 R10079045 R10097030 R10087021 R10090081 R10099067 R10097029 R10103015 R10082022 R10089004 R10087067 R10085109 R10096019 R10100032 R10103042 R10089001 R10082021 R10081007 R10087020 R10085108 R10079042 R10095057 R10082018 R10103012 R10085018 R10085107 R10079040 R10083028 R10090080 R10080042 R10085019 R10095056 R10087065 R10097028 R10100029 R10103041 R10083027 R10087126 R10099066 R10088121 R10094073 R10103011 R10090079";
98 }
else if(strstr(
"zdcRateLow2",set)>0) {
99 char *runL=
"R10083026 R10103010 R10103008 R10080040 R10088120 R10100028 R10087125 R10096015 R10087018 R10085017 R10096014 R10094071 R10084024 R10087063 R10097026 R10094024 R10087062 R10085016 R10094067 R10095052 R10102070 R10085104 R10097153 R10082011 R10095051 R10103007 R10094023 R10084022 R10095050 R10102069 R10088113 R10090076 R10097149 R10098045 R10099057 R10083019 R10079035 R10097022 R10088063 R10094022 R10097146 R10083018 R10084021 R10096009 R10079034 R10092011 R10097145 R10094021 R10095049";
100 }
else if(strstr(
"zdcRateHigh",set)>0) {
101 char *runL=
"R10082008 R10087059 R10101020 R10099055 R10090001 R10097021 R10103034 R10088112 R10102003 R10103033 R10079033 R10095048 R10097140 R10088062 R10101019 R10090074 R10079031 R10096008 R10088111 R10102066 R10094063 R10094019 R10102065 R10083013 R10095047 R10098040 R10101018 R10087117 R10092009 R10101017 R10096007 R10095046 R10103031 R10079030 R10101094 R10082005 R10101093 R10093084 R10101016 R10093082 R10088110 R10102063 R10095045 R10103001 R10098038 R10094016 R10097019 R10100021 R10093083 R10079028 R10087012 R10097137 R10087058 R10101092 R10096006 R10101011 R10102062 R10087011 R10096005 R10087114 R10090072 R10101009 R10082003 R10079027 R10098035 R10095041 R10087057 R10101091 R10102112 R10097016 R10088058 R10087009 R10101090 R10084011 R10092004 R10100017 R10095040 R10081117 R10096002 R10100098 R10103028 R10094007 R10102056 R10081115 R10101089 R10101008 R10097118 R10100016 R10095039 R10102110 R10102055 R10101006 R10088102 R10097117 R10102109 R10101088 R10100095 R10101005 R10084010 R10092002 R10094006 R10096001 R10100093 R10087054 R10095037 R10099029 R10102051 R10080022 R10094005 R10098029 R10100015 R10095036 R10079139 R10101086 R10099028 R10102108 R10097012 R10101001 R10079138 R10097110 R10100014 R10102107 R10092107 R10091090 R10095125 R10097108 R10094003 R10102050 R10079137 R10087053 R10080020 R10100180 R10092105 R10100013 R10087001 R10081112 R10102105 R10100179 R10101083 R10088096 R10097106 R10100081 R10081111 R10079135 R10097008 R10102048 R10101082 R10100008 R10095030 R10097104 R10091089 R10087052 R10092102 R10102045 R10101081 R10097102 R10081110 R10080019 R10095122 R10102104 R10092098 R10102046 R10100079 R10100006 R10101078 R10093131 R10097005 R10100178 R10095121 R10103027 R10100177 R10081108 R10100077 R10097004 R10101076 R10087051 R10081107 R10079131 R10100005 R10095120 R10097003 R10095024 R10095023 R10100176 R10089081 R10079130 R10101075 R10102100 R10100072 R10089080 R10081104 R10079129 R10100175 R10101074 R10095022 R10102039 R10092084 R10102098 R10089079 R10100172 R10100071 R10102037 R10101071 R10097091 R10081102 R10101040 R10102036 R10096141 R10099195 R10100070 R10101070 R10102096 R10099194 R10102095 R10097089 R10101039 R10100068 R10100169 R10101069 R10100067 R10101038 R10101037 R10100167 R10097087 R10102033 R10101065 R10099189 R10081096 R10102094 R10100166 R10099188 R10101064 R10100165 R10102031 R10101061 R10099187 R10101030 R10100164 R10101060 R10099186 R10101029 R10101059 R10099185 R10101028";
102 }
else if(strstr(
"zdcRateA",set)>0) {
103 char *runL=
"R10079057 R10079059 R10079060 R10079061 R10079062 R10079063 R10079069 R10079070 R10079071 R10079074 R10079078 R10079079 R10079080 R10079081 R10087119 R10076161 R10076154 R10076153 R10076152 R10090047 R10076136 R10076134 R10090046 R10086046 R10090042 R10086044 R10086043 R10086037 R10090111 R10086024 R10086023 R10086022 R10090040 R10090109 R10090108 R10090112 R10086015 R10090100 R10082095 R10086008 R10082091 R10092050 R10078094 R10082092 R10082093 R10078093 R10082083 R10082085 R10092049 R10086007 R10079017 R10092048 R10078092 R10079016 R10090038 R10082078 R10079015 R10090095 R10082077 R10092047 R10082076 R10086001 R10082075 R10092046 R10082074 R10079007 R10078081 R10078082 R10082073 R10085140 R10079006 R10082072 R10085136 R10079005 R10078078 R10079004 R10090037 R10078077 R10092042 R10088036 R10081056 R10080081 R10082071 R10079002 R10090089 R10085135 R10081055 R10080080 R10081053 R10090017 R10090018 R10090019 R10090020 R10090022 R10090026 R10090027 R10092040 R10092039 R10088031 R10088085 R10085134 R10085039 R10080078 R10092038 R10085038 R10094100 R10090015 R10080077 R10085133 R10085132 R10088030 R10088029 R10092037 R10080076 R10081047 R10085131 R10088084 R10094099 R10092036 R10083058 R10087097 R10088028 R10087078 R10092034 R10088027 R10087094 R10087041 R10083052 R10087096 R10088026 R10094098 R10083056 R10083055 R10080062 R10088081 R10092033 R10083054 R10092031 R10090013 R10088024 R10080061 R10083053 R10094096 R10087077 R10088022 R10087088 R10085032 R10087037 R10083047 R10089023 R10092030 R10087036 R10094095 R10083045 R10085031 R10092029 R10089021 R10088077 R10087035 R10087085 R10097045 R10087034 R10094092 R10090008 R10085030 R10087084 R10082043 R10089019 R10087033 R10081027 R10085029 R10087082 R10083041 R10087032 R10092028 R10090005 R10081026 R10097044 R10094090 R10083040 R10090004 R10088013 R10085028 R10087031 R10089016 R10082035 R10088075 R10092027 R10099078 R10096027 R10088011 R10089015 R10094089 R10085115 R10082032 R10085027 R10088010 R10083037 R10087071 R10089011 R10087028 R10092024 R10082031 R10099077 R10097040 R10092023 R10094088 R10099076 R10085113 R10096026 R10085114 R10103018 R10092022 R10088001 R10092021 R10079050 R10085026 R10089010 R10088071 R10099074 R10082029 R10097038 R10094084 R10079049 R10087070 R10085025 R10083034 R10088070 R10081013 R10083033 R10089008 R10099073 R10096025 R10087025 R10082027 R10103017 R10087023 R10079047 R10087022 R10094078 R10087069 R10079046 R10085024 R10085023 R10099071 R10096024 R10088069 R10083032 R10103016 R10079045 R10097030 R10087021 R10090081 R10099067 R10097029 R10103015 R10082022 R10089004 R10087067 R10085109 R10096019 R10100032 R10103042 R10089001 R10082021";
104 }
else if(strstr(
"zdcRateB",set)>0) {
105 char *runL=
"R10081007 R10087020 R10085108 R10079042 R10095057 R10082018 R10103012 R10085018 R10085107 R10079040 R10083028 R10090080 R10080042 R10085019 R10095056 R10087065 R10097028 R10100029 R10103041 R10083027 R10087126 R10099066 R10088121 R10094073 R10103011 R10090079 R10083026 R10103010 R10103008 R10080040 R10088120 R10100028 R10087125 R10096015 R10087018 R10085017 R10096014 R10094071 R10084024 R10087063 R10097026 R10094024 R10087062 R10085016 R10094067 R10095052 R10102070 R10085104 R10097153 R10082011 R10095051 R10103007 R10094023 R10084022 R10095050 R10102069 R10088113 R10090076 R10097149 R10098045 R10099057 R10083019 R10079035 R10097022 R10088063 R10094022 R10097146 R10083018 R10084021 R10096009 R10079034 R10092011 R10097145 R10094021 R10095049 R10082008 R10087059 R10101020 R10099055 R10090001 R10097021 R10103034 R10088112 R10102003 R10103033 R10079033 R10095048 R10097140 R10088062 R10101019 R10090074 R10079031 R10096008 R10088111 R10102066 R10094063 R10094019 R10102065 R10083013 R10095047 R10098040 R10101018 R10087117 R10092009 R10101017 R10096007 R10095046 R10103031 R10079030 R10101094 R10082005 R10101093 R10093084 R10101016 R10093082 R10088110 R10102063 R10095045 R10103001 R10098038 R10094016 R10097019 R10100021 R10093083 R10079028 R10087012 R10097137 R10087058 R10101092 R10096006 R10101011 R10102062 R10087011 R10096005 R10087114 R10090072 R10101009 R10082003 R10079027 R10098035 R10095041 R10087057 R10101091 R10102112 R10097016";
106 }
else if(strstr(
"zdcRateC",set)>0) {
107 char *runL=
"R10088058 R10087009 R10101090 R10084011 R10092004 R10100017 R10095040 R10081117 R10096002 R10100098 R10103028 R10094007 R10102056 R10081115 R10101089 R10101008 R10097118 R10100016 R10095039 R10102110 R10102055 R10101006 R10088102 R10097117 R10102109 R10101088 R10100095 R10101005 R10084010 R10092002 R10094006 R10096001 R10100093 R10087054 R10095037 R10099029 R10102051 R10080022 R10094005 R10098029 R10100015 R10095036 R10079139 R10101086 R10099028 R10102108 R10097012 R10101001 R10079138 R10097110 R10100014 R10102107 R10092107 R10091090 R10095125 R10097108 R10094003 R10102050 R10079137 R10087053 R10080020 R10100180 R10092105 R10100013 R10087001 R10081112 R10102105 R10100179 R10101083 R10088096 R10097106 R10100081 R10081111 R10079135 R10097008 R10102048 R10101082 R10100008 R10095030 R10097104 R10091089 R10087052 R10092102 R10102045 R10101081 R10097102 R10081110 R10080019 R10095122 R10102104 R10092098 R10102046 R10100079 R10100006 R10101078 R10093131 R10097005 R10100178 R10095121 R10103027 R10100177 R10081108 R10100077 R10097004 R10101076 R10087051 R10081107 R10079131 R10100005 R10095120 R10097003 R10095024 R10095023 R10100176 R10089081 R10079130 R10101075 R10102100 R10100072 R10089080 R10081104 R10079129 R10100175 R10101074 R10095022 R10102039 R10092084 R10102098 R10089079 R10100172 R10100071 R10102037 R10101071 R10097091 R10081102 R10101040 R10102036 R10096141 R10099195 R10100070 R10101070 R10102096 R10099194 R10102095 R10097089 R10101039 R10100068 R10100169 R10101069 R10100067 R10101038 R10101037 R10100167 R10097087 R10102033 R10101065 R10099189 R10081096 R10102094 R10100166 R10099188 R10101064 R10100165 R10102031 R10101061 R10099187 R10101030 R10100164 R10101060 R10099186 R10101029 R10101059 R10099185 R10101028";
108 }
else if(strstr(
"run9setP1",set)>0) {
109 char *runL=
"R10083013 R10083018 R10083019 R10083026 R10083027 R10083028 R10083032 R10083033 R10083034 R10083037 R10083040 R10083041 R10083045 R10083047 R10083052 R10083053 R10083054 R10083055 R10083056 R10083058 R10087051 R10087052 R10087053 R10087054 R10087057 R10087058 R10087059 R10087062 R10087063 R10087065 R10087067 R10087069 R10087070 R10087071 R10087077 R10087078 R10087082 R10087084 R10087085 R10087088 R10087094 R10087096 R10087097 R10093131 R10094003 R10094005 R10094006 R10094007 R10094016 R10094019 R10094021 R10094022 R10094023 R10094024 R10097087 R10097089 R10097091 R10097102 R10097104 R10097106 R10097108 R10097110 R10097117 R10097118 R10097137 R10097140 R10097145 R10097146 R10097149 R10097153 R10100067 R10100068 R10100070 R10100071 R10100072 R10100077 R10100079 R10100081 R10100093 R10100095 R10100098 R10102031 R10102033 R10102036 R10102037 R10102039 R10102045 R10102046 R10102048 R10102050 R10102051 R10102055 R10102056 R10102062 R10102063 R10102065 R10102066 R10102069 R10102070";
110 }
else if(strstr(
"run9setP2",set)>0) {
111 char *runL=
"R10084010 R10084011 R10084021 R10084022 R10084024 R10085016 R10085017 R10085018 R10085019 R10085023 R10085024 R10085025 R10085026 R10085027 R10085028 R10085029 R10085030 R10085031 R10085032 R10085038 R10085039 R10087114 R10087117 R10087119 R10087125 R10087126 R10088001 R10088010 R10088011 R10088013 R10088022 R10088024 R10088026 R10088027 R10088028 R10088029 R10088030 R10088031 R10088036 R10089079 R10089080 R10089081 R10090001 R10090004 R10090005 R10090008 R10090013 R10090015 R10090017 R10090018 R10090019 R10090020 R10090022 R10090026 R10090027 R10091089 R10091090 R10092002 R10092004 R10092009 R10092011 R10092021 R10092022 R10092023 R10092024 R10092027 R10092028 R10092029 R10092030 R10092031 R10092033 R10092034 R10092036 R10092037 R10092038 R10092039 R10092040 R10092042 R10092046 R10092047 R10092048 R10092049 R10092050 R10094063 R10094067 R10094071 R10094073 R10094078 R10094084 R10094088 R10094089 R10094090 R10094092 R10094095 R10094096 R10094098 R10094099 R10094100 R10098029 R10098035 R10098038 R10098040 R10098045 R10100164 R10100165 R10100166 R10100167 R10100169 R10100172 R10100175 R10100176 R10100177 R10100178 R10100179 R10100180 R10101001 R10101005 R10101006 R10101008 R10101009 R10101011 R10101016 R10101017 R10101018 R10101019 R10101020 R10102094 R10102095 R10102096 R10102098 R10102100 R10102104 R10102105 R10102107 R10102108 R10102109 R10102110 R10102112 R10103001 R10103007 R10103008 R10103010 R10103011 R10103012 R10103015 R10103016 R10103017 R10103018 R10103027 R10103028 R10103031 R10103033 R10103034 R10103041 R10103042";
112 }
else if(strstr(
"run9setP3",set)>0) {
113 char *runL=
"R10081007 R10081013 R10081026 R10081027 R10081047 R10081053 R10081055 R10081056 R10085104 R10085107 R10085108 R10085109 R10085113 R10085114 R10085115 R10085131 R10085132 R10085133 R10085134 R10085135 R10085136 R10085140 R10086001 R10086007 R10086008 R10086015 R10086022 R10086023 R10086024 R10086037 R10086043 R10086044 R10086046 R10088058 R10088062 R10088063 R10088069 R10088070 R10088071 R10088075 R10088077 R10088081 R10088084 R10088085 R10092084 R10092098 R10092102 R10092105 R10092107 R10095022 R10095023 R10095024 R10095030 R10095036 R10095037 R10095039 R10095040 R10095041 R10095045 R10095046 R10095047 R10095048 R10095049 R10095050 R10095051 R10095052 R10095056 R10095057 R10095120 R10095121 R10095122 R10095125 R10096001 R10096002 R10096005 R10096006 R10096007 R10096008 R10096009 R10096014 R10096015 R10096019 R10096024 R10096025 R10096026 R10096027 R10099028 R10099029 R10099055 R10099057 R10099066 R10099067 R10099071 R10099073 R10099074 R10099076 R10099077 R10099078 ";
114 }
else if(strstr(
"run9setP4",set)>0) {
115 char *runL=
"R10081096 R10081102 R10081104 R10081107 R10081108 R10081110 R10081111 R10081112 R10081115 R10081117 R10082003 R10082005 R10082008 R10082011 R10082018 R10082021 R10082022 R10082027 R10082029 R10082031 R10082032 R10082035 R10082043 R10082071 R10082072 R10082073 R10082074 R10082075 R10082076 R10082077 R10082078 R10082083 R10082085 R10082091 R10082092 R10082093 R10082095 R10087001 R10087009 R10087011 R10087012 R10087018 R10087020 R10087021 R10087022 R10087023 R10087025 R10087028 R10087031 R10087032 R10087033 R10087034 R10087035 R10087036 R10087037 R10087041 R10088096 R10088102 R10088110 R10088111 R10088112 R10088113 R10088120 R10088121 R10089001 R10089004 R10089008 R10089010 R10089011 R10089015 R10089016 R10089019 R10089021 R10089023 R10090072 R10090074 R10090076 R10090079 R10090080 R10090081 R10090089 R10090095 R10090100 R10090108 R10090109 R10090111 R10090112 R10093082 R10093083 R10093084 R10096141 R10097003 R10097004 R10097005 R10097008 R10097012 R10097016 R10097019 R10097021 R10097022 R10097026 R10097028 R10097029 R10097030 R10097038 R10097040 R10097044 R10097045 R10099185 R10099186 R10099187 R10099188 R10099189 R10099194 R10099195 R10100005 R10100006 R10100008 R10100013 R10100014 R10100015 R10100016 R10100017 R10100021 R10100028 R10100029 R10100032 R10101059 R10101060 R10101061 R10101064 R10101065 R10101069 R10101070 R10101071 R10101074 R10101075 R10101076 R10101078 R10101081 R10101082 R10101083 R10101086 R10101088 R10101089 R10101090 R10101091 R10101092 R10101093 R10101094 R10102003";
116 }
else if(strstr(
"run9setP1234",set)>0) {
117 char *runL=
"run9setP1 run9setP2 run9setP3 run9setP4";
118 }
else if(strstr(
"setXX",set)>0) {
121 printf(
" hadd: set=%s= NOT found, quit\n",set);
return; }
122 printf(
" hadd: set=%s= path=%s= ...\n",set,iPath.Data());
124 Target = TFile::Open( out+
".wana.hist.root",
"RECREATE" );
125 FileList =
new TList();
126 printf(
"sum Output '%s' \n",Target->GetName());
128 char *run=strtok(runL,
" ");
131 printf(
"add run %d '%s' \n",i++,run);
132 if(isAPS2010pol && strstr(set,
"run9setP")>0 ) {
133 int irun=atoi(run+1);
134 if(irun>=10083013 && irun<=10083058) { printf(
"\tdrop %s from F10415\n",run);
continue;}
135 if(irun>=10098015 && irun<=10098015) { printf(
"\tdrop %s from F10508\n",run);
continue;}
137 TString fullName=iPath+run+
".wana.hist.root";
138 FileList->Add( TFile::Open(fullName));
139 }
while(run=strtok(0,
" "));
141 MergeRootfile( Target, FileList );
142 printf(
"finished Output '%s' \n",Target->GetName());
146 void MergeRootfile( TDirectory *target, TList *sourcelist ) {
148 cout <<
"Target path: " << target->GetPath() << endl;
149 TString path( (
char*)strstr( target->GetPath(),
":" ) );
152 TFile *first_source = (TFile*)sourcelist->First();
153 first_source->cd( path );
154 TDirectory *current_sourcedir = gDirectory;
158 TChain *globChain = 0;
159 TIter nextkey( current_sourcedir->GetListOfKeys() );
161 while ( (key = (TKey*)nextkey())) {
162 const char *name=key->GetName();
164 if(nh%100==0) printf(
"nh=%d addingX %s\n",nh,name);
167 first_source->cd( path );
168 TObject *obj = key->ReadObj();
170 if ( obj->IsA()->InheritsFrom(
"TH1" ) ) {
178 TFile *nextsource = (TFile*)sourcelist->After( first_source );
179 while ( nextsource ) {
182 nextsource->cd( path );
183 TH1 *h2 = (TH1*)gDirectory->Get( h1->GetName() );
190 nextsource = (TFile*)sourcelist->After( nextsource );
193 else if ( obj->IsA()->InheritsFrom(
"TTree" ) ) {
196 const char* obj_name= obj->GetName();
198 globChain =
new TChain(obj_name);
199 globChain->Add(first_source->GetName());
200 TFile *nextsource = (TFile*)sourcelist->After( first_source );
203 while ( nextsource ) {
205 globChain->Add(nextsource->GetName());
206 nextsource = (TFile*)sourcelist->After( nextsource );
209 }
else if ( obj->IsA()->InheritsFrom(
"TDirectory" ) ) {
212 cout <<
"Found subdirectory " << obj->GetName() << endl;
216 TDirectory *newdir = target->mkdir( obj->GetName(), obj->GetTitle() );
221 MergeRootfile( core,newdir, sourcelist );
226 cout <<
"Unknown object type, name: "
227 << obj->GetName() <<
" title: " << obj->GetTitle() << endl;
238 if(obj->IsA()->InheritsFrom(
"TTree" ))
239 globChain->Write( key->GetName() );
241 obj->Write( key->GetName() );