11 if(gSystem->Getenv(
"CWB_MERGE_LABEL")==NULL) {
12 cout <<
"cwb_setchunk Error : environment CWB_MERGE_LABEL is not defined!!!" << endl;
exit(1);
14 cwb_merge_label=
TString(gSystem->Getenv(
"CWB_MERGE_LABEL"));
18 if(cwb_merge_label[0]!=
'M') {
20 cout <<
"cwb_setchunk Error : label " << cwb_merge_label.Data() <<
" has bad format (M#)" << endl;
21 cout <<
"Only merge label can be used for cwb_setchunk" << endl << endl;
exit(1);
25 if(!lcheck.IsDigit()) {
27 cout <<
"cwb_setchunk Error : label " << cwb_merge_label.Data() <<
" has bad format (M#)" << endl;
28 cout <<
"Only merge label can be used for cwb_setchunk" << endl << endl;
exit(1);
34 if(gSystem->Getenv(
"CWB_SETCHUNK_ID")==NULL) {
35 cout << endl <<
"cwb_setchunk Error : environment CWB_SETCHUNK_ID is not defined!!!" << endl << endl;
38 if(
TString(gSystem->Getenv(
"CWB_SETCHUNK_ID")).IsDigit()) {
39 cwb_setchunk_id=
TString(gSystem->Getenv(
"CWB_SETCHUNK_ID")).Atoi();
41 cout << endl <<
"cwb_setchunk Error : environment CWB_SETCHUNK_ID is not a positive integer number!!!" << endl << endl;
45 if(cwb_setchunk_id<1) {
46 cout << endl <<
"cwb_setchunk Error : environment CWB_SETCHUNK_ID is not an integer number >0 !!!" << endl << endl;
57 owfname.ReplaceAll(
".root",
TString(
".K_")+schunk+
".root");
69 TString owfname = mdir+
"/"+iwfname;
70 char schunk[32];
sprintf(schunk,
"chunk%d",cwb_setchunk_id);
71 owfname.ReplaceAll(
".root",
TString(
".K_")+schunk+
".root");
83 TString owfname = mdir+
"/"+iwfname;
84 char schunk[32];
sprintf(schunk,
"chunk%d",cwb_setchunk_id);
85 owfname.ReplaceAll(
".root",
TString(
".K_")+schunk+
".root");
97 olstfname.ReplaceAll(
"wave_",
"merge_");
98 olstfname.ReplaceAll(
".root",
".lst");
99 olstfname.Remove(0,olstfname.Last(
'/')+1);
100 cout << olstfname << endl;
101 estat = gSystem->GetPathInfo(mdir+
"/"+ilstfname,&
id,&size,&flags,&mt);
sprintf(iwfname,"wave_%s.%s.root", data_label, cwb_merge_label.Data())