8 TB.
checkFile(gSystem->Getenv(
"CWB_ROOTLOGON_FILE"));
9 TB.
checkFile(gSystem->Getenv(
"CWB_PARAMETERS_FILE"));
10 TB.
checkFile(gSystem->Getenv(
"CWB_NETC_FILE"));
16 char env_label[32];
sprintf(env_label,
"CWB_MPLUGIN_%d",
i+1);
17 cwb_mplugin[
i]=
TString(gSystem->Getenv(env_label));
19 if(cwb_mplugin[
i].CompareTo(
"")!=0) {
20 TString DirName = gSystem->DirName(cwb_mplugin[0]);
21 TString BaseName = gSystem->BaseName(cwb_mplugin[0]);
24 if(!overwrite) gSystem->Exit(1);
26 cout <<
"cwb_mplugin.C error : output file name not declared !!!" << endl;
30 if(cwb_mplugin[
i].CompareTo(
"")!=0) {
32 cwb_mplugin_macro[
i] = TMacro(cwb_mplugin[i]);
38 cout <<
"Output Plugin Name : " << endl << endl;
39 cout << 0 <<
" -> : " << cwb_mplugin[0] << endl;
40 cout << endl <<
"Input Plugin Names : " << endl << endl;
42 if(cwb_mplugin[
i].CompareTo(
"")!=0) {
43 cout <<
i <<
" -> " << cwb_mplugin[
i] << endl;
50 cout <<
"Do you want to continue it ? (y/n) ";
53 }
while ((strcmp(answer,
"y")!=0)&&(strcmp(answer,
"n")!=0));
54 if (strcmp(answer,
"n")==0) gSystem->Exit(0);
59 out.open(cwb_mplugin[0].Data(),
ios::out);
60 if(!out.good()) {cout <<
"cwb_mplugin.C - Error : Opening File : "
61 << cwb_mplugin[0] << endl;gSystem->Exit(1);}
64 out <<
"// -------------------------------------------------------------------------" << endl;
65 out <<
"// WARNING, NOT EDIT : This is a multi plugin generated with cwb_mplugin !!!" << endl;
66 out <<
"// NOTE : The main is listed on the bottom " << endl;
68 out <<
"// INPUT PLUGINS : " << endl;
71 if(cwb_mplugin[
i].CompareTo(
"")!=0) {
72 out <<
"// " <<
i <<
" - " << cwb_mplugin[
i] << endl;
76 out <<
"// -------------------------------------------------------------------------" << endl;
80 if(cwb_mplugin[
i].CompareTo(
"")!=0) {
82 char user_plugin_name[32];
sprintf(user_plugin_name,
"CWB_UserPlugin_%d(",
i);
83 char user_plugin_namespace[32];
sprintf(user_plugin_namespace,
"CWB_UserPluginNamespace_%d",
i);
84 TList* fLines = cwb_mplugin_macro[
i].GetListOfLines();
88 out <<
"// -------------------------------------------------------------------------" << endl;
89 out <<
"// --> BEGIN CWB_USER PLUGIN CODE " <<
i << endl;
91 out <<
"// " << cwb_mplugin[
i] << endl;
92 out <<
"// -------------------------------------------------------------------------" << endl;
94 while ((obj = (TObjString*)
next())) {
97 sline.ReplaceAll(
" ",
"");
98 if(sline.BeginsWith(
"#include")||sline.BeginsWith(
"#define")||sline.BeginsWith(
"#pragma")) {
99 if(!include) out <<
"}" << endl;
103 if(include) out <<
"namespace " << user_plugin_namespace <<
" {" << endl << endl;
107 out << line.Data() << endl;
109 out <<
"}" << endl << endl;
110 out <<
"// -------------------------------------------------------------------------" << endl;
111 out <<
"// --> END CWB_USER PLUGIN CODE " <<
i << endl;
112 out <<
"// " << endl;
113 out <<
"// " << cwb_mplugin[
i] << endl;
114 out <<
"// -------------------------------------------------------------------------" << endl;
120 out <<
"// -------------------------------------------------------------------------" << endl;
121 out <<
"// --> MAIN CWB_USER PLUGIN CODE " << endl;
122 out <<
"// " << endl;
123 out <<
"// INPUT PLUGINS : " << endl;
124 out <<
"// " << endl;
126 if(cwb_mplugin[
i].CompareTo(
"")!=0) {
127 out <<
"// " <<
i <<
" - " << cwb_mplugin[
i] << endl;
130 out <<
"// " << endl;
131 out <<
"// -------------------------------------------------------------------------" << endl;
133 out <<
"#define XIFO 4" << endl;
134 out <<
"#pragma GCC system_header" << endl;
135 out <<
"#include \"cwb.hh\"" << endl;
139 out <<
"void" << endl;
140 out <<
"CWB_Plugin(TFile* jfile, CWB::config* cfg, network* net, WSeries<double>* x, TString ifo, int type) {" << endl;
143 if(cwb_mplugin[
i].CompareTo(
"")!=0) {
144 char user_plugin_namespace[32];
sprintf(user_plugin_namespace,
"CWB_UserPluginNamespace_%d",
i);
145 out <<
" " << user_plugin_namespace;
146 out <<
"::CWB_Plugin(jfile, cfg, net, x, ifo, type); // CALL USER PLUGIN CODE " <<
i << endl;
153 cout <<
"Output Plugin Name : " << cwb_mplugin[0] << endl << endl;
TString cwb_mplugin[nPLUGIN]
TIter next(twave->GetListOfBranches())
TMacro cwb_mplugin_macro[nPLUGIN]
strcpy(RunLabel, RUN_LABEL)
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)