29 if(gSystem->Getenv(
"CWB_MERGE_LABEL")==NULL) {
30 cout <<
"cwb_setchunk Error : environment CWB_MERGE_LABEL is not defined!!!" << endl;
exit(1);
32 cwb_merge_label=
TString(gSystem->Getenv(
"CWB_MERGE_LABEL"));
36 if(cwb_merge_label[0]!=
'M') {
38 cout <<
"cwb_setchunk Error : label " << cwb_merge_label.Data() <<
" has bad format (M#)" << endl;
39 cout <<
"Only merge label can be used for cwb_setchunk" << endl << endl;
exit(1);
43 if(!lcheck.IsDigit()) {
45 cout <<
"cwb_setchunk Error : label " << cwb_merge_label.Data() <<
" has bad format (M#)" << endl;
46 cout <<
"Only merge label can be used for cwb_setchunk" << endl << endl;
exit(1);
52 if(gSystem->Getenv(
"CWB_SETCHUNK_ID")==NULL) {
53 cout << endl <<
"cwb_setchunk Error : environment CWB_SETCHUNK_ID is not defined!!!" << endl << endl;
56 if(
TString(gSystem->Getenv(
"CWB_SETCHUNK_ID")).IsDigit()) {
57 cwb_setchunk_id=
TString(gSystem->Getenv(
"CWB_SETCHUNK_ID")).Atoi();
59 cout << endl <<
"cwb_setchunk Error : environment CWB_SETCHUNK_ID is not a positive integer number!!!" << endl << endl;
63 if(cwb_setchunk_id<1) {
64 cout << endl <<
"cwb_setchunk Error : environment CWB_SETCHUNK_ID is not an integer number >0 !!!" << endl << endl;
75 owfname.ReplaceAll(
".root",
TString(
".K_")+schunk+
".root");
87 TString owfname = mdir+
"/"+iwfname;
88 char schunk[32];
sprintf(schunk,
"chunk%d",cwb_setchunk_id);
89 owfname.ReplaceAll(
".root",
TString(
".K_")+schunk+
".root");
101 TString owfname = mdir+
"/"+iwfname;
102 char schunk[32];
sprintf(schunk,
"chunk%d",cwb_setchunk_id);
103 owfname.ReplaceAll(
".root",
TString(
".K_")+schunk+
".root");
115 olstfname.ReplaceAll(
"wave_",
"merge_");
116 olstfname.ReplaceAll(
".root",
".lst");
117 olstfname.Remove(0,olstfname.Last(
'/')+1);
118 cout << olstfname << endl;
119 estat = gSystem->GetPathInfo(mdir+
"/"+ilstfname,&
id,&size,&flags,&mt);
sprintf(iwfname,"wave_%s.%s.root", data_label, cwb_merge_label.Data())