13 cout <<
"cwb_condor_create_ced.C : Error - the accounting_group is not defined !!!" << endl;
14 cout <<
"The accounting_group must be defined in the user_parameters.C file" << endl;
15 cout <<
"See the following link:" << endl;
16 cout <<
" https://ldas-gridmon.ligo.caltech.edu/accounting/condor_groups/determine_condor_account_group.html" << endl;
17 cout <<
"Examples : " << endl;
18 cout <<
"strcpy(condor_tag,\"ligo.dev.o2.burst.allsky.cwboffline\");" << endl;
19 cout <<
"strcpy(condor_tag,\"ligo.prod.o2.burst.allsky.cwboffline\");" << endl;
20 cout <<
"If you don't need it set : strcpy(condor_tag,\"disabled\");" << endl << endl;
47 float icc,
icc2,
icc3,
irho,
iacor,
ilag,
islag,
ilik,
ipen,
icHH,
ivHH,
ivED;
94 if((fP = fopen(ofile_condor_sub,
"w")) == NULL) {
95 cout <<
"cwb_condor_create_ced.C : Error - cannot open file " << ofile_condor_sub << endl;
98 cout << ofile_condor_sub << endl;
108 fprintf(fP,
"universe = vanilla\n");
110 fprintf(fP,
"priority = $(PRI)\n");
111 fprintf(fP,
"on_exit_hold = ( ExitCode != 0 )\n");
112 fprintf(fP,
"request_memory = 2000\n");
113 fprintf(fP,
"executable = ced.sh\n");
114 fprintf(fP,
"job_machine_attrs = Machine\n");
115 fprintf(fP,
"job_machine_attrs_history_length = 5\n");
116 fprintf(fP,
"requirements = target.machine =!= MachineAttrMachine1 && target.machine =!= MachineAttrMachine2 && target.machine =!= MachineAttrMachine3 && target.machine =!= MachineAttrMachine4 && target.machine =!= MachineAttrMachine5\n");
117 fprintf(fP,
"environment = CWB_JOBID=$(PID);CWB_GPS_EVENT=$(CWB_GPS_EVENT);CWB_INET_OPTIONS=$(CWB_INET_OPTIONS);CWB_MDC_FACTOR=$(CWB_MDC_FACTOR);CWB_JOB_LAG=$(CWB_JOB_LAG);CWB_CED_DIR=$(CWB_CED_DIR);CWB_BATCH=$(CWB_BATCH)\n");
118 if(
TString(condor_tag)!=
"")
fprintf(fP,
"accounting_group = %s\n",condor_tag);
119 fprintf(fP,
"output = %s/$(PID)_$(CWB_JOB_LAG)_%s.out\n",full_condor_out_dir,condor_label);
120 fprintf(fP,
"error = %s/$(PID)_$(CWB_JOB_LAG)_%s.err\n",full_condor_err_dir,condor_label);
122 fprintf(fP,
"notification = never\n");
130 char ofile_condor_dag[1024];
134 out.open(ofile_condor_dag,
ios::out);
135 if (!out.good()) {cout <<
"Error Opening File : " << ofile_condor_dag << endl;
exit(1);}
136 cout << ofile_condor_dag << endl;
140 ifstream
f_ev(events_sorted);
142 f_ev>>pm>>c3>>irho>>icc>>icc2>>icc3>>iacor>>ilag>>islag>>ilik>>ipen>>icHH>>ifreq>>ilow>>ihigh>>idur>>isize>>irate>>
irun;
143 for(
int i=0;i<nIFO;i++) f_ev>>itime[
i];
144 for(
int i=0;i<nIFO;i++) f_ev>>iSNR[
i];
145 for(
int i=0;i<nIFO;i++) f_ev>>ihrss[
i];
147 if (!
f_ev.good())
break;
148 if (!
TString(pm).Contains(
"+"))
continue;
154 char jtag[1024];
sprintf(jtag,
"%i_%i",irun,(
int)ilag);
155 bool bjtag=
false;
for(
int j=0;
j<JTAG.size();
j++)
if(JTAG[
j]==jtag) bjtag=
true;
156 if(!bjtag) JTAG.push_back(jtag);
else continue;
158 sprintf(ostring,
"JOB A%i_%s %s.sub",jID,jtag,condor_label);
159 out << ostring << endl;
160 int evt_gps_time = singleDetector ? itime[0] : 0;
161 sprintf(ostring,
"VARS A%i_%s PID=\"%i\" CWB_GPS_EVENT=\"%i\" CWB_INET_OPTIONS=\"ced\" CWB_MDC_FACTOR=\"0\" CWB_JOB_LAG=\"%i\" CWB_CED_DIR=\"%s\" CWB_BATCH=\"true\"",jID,jtag,irun,evt_gps_time,(
int)ilag,pp_ced_dir.Data());
162 out << ostring << endl;
163 sprintf(ostring,
"RETRY A%i_%s 3000",jID,jtag);
164 out << ostring << endl;
void Export(TString fname="")
fprintf(stdout,"start=%f duration=%f rate=%f\n", x.start(), x.size()/x.rate(), x.rate())
void Import(TString umacro="")
char ofile_condor_sub[1024]
ifstream f_ev(events_sorted)
cout<< ofile_condor_sub<< endl;char full_condor_dir[1024];char full_condor_out_dir[1024];char full_condor_err_dir[1024];sprintf(full_condor_dir,"%s/%s", work_dir, condor_dir);sprintf(full_condor_out_dir,"%s/%s", work_dir, log_dir);sprintf(full_condor_err_dir,"%s/%s", work_dir, log_dir);fprintf(fP,"universe = vanilla\n");fprintf(fP,"getenv = true\n");fprintf(fP,"priority = $(PRI)\n");fprintf(fP,"on_exit_hold = ( ExitCode != 0 )\n");fprintf(fP,"request_memory = 2000\n");fprintf(fP,"executable = ced.sh\n");fprintf(fP,"job_machine_attrs = Machine\n");fprintf(fP,"job_machine_attrs_history_length = 5\n");fprintf(fP,"requirements = target.machine =!= MachineAttrMachine1 && target.machine =!= MachineAttrMachine2 && target.machine =!= MachineAttrMachine3 && target.machine =!= MachineAttrMachine4 && target.machine =!= MachineAttrMachine5\n");fprintf(fP,"environment = CWB_JOBID=$(PID);CWB_GPS_EVENT=$(CWB_GPS_EVENT);CWB_INET_OPTIONS=$(CWB_INET_OPTIONS);CWB_MDC_FACTOR=$(CWB_MDC_FACTOR);CWB_JOB_LAG=$(CWB_JOB_LAG);CWB_CED_DIR=$(CWB_CED_DIR);CWB_BATCH=$(CWB_BATCH)\n");if(TString(condor_tag)!="") fprintf(fP,"accounting_group = %s\n", condor_tag);fprintf(fP,"output = %s/$(PID)_$(CWB_JOB_LAG)_%s.out\n", full_condor_out_dir, condor_label);fprintf(fP,"error = %s/$(PID)_$(CWB_JOB_LAG)_%s.err\n", full_condor_err_dir, condor_label);fprintf(fP,"log = %s/%s.log\n", condor_log, condor_label);fprintf(fP,"notification = never\n");fprintf(fP,"rank=memory\n");fprintf(fP,"queue\n");fclose(fP);char ofile_condor_dag[1024];sprintf(ofile_condor_dag,"%s/%s.dag", condor_dir, condor_label);ofstream out;out.open(ofile_condor_dag, ios::out);if(!out.good()){cout<< "Error Opening File : "<< ofile_condor_dag<< endl;exit(1);}cout<< ofile_condor_dag<< endl;int ievt=0;vector< TString > JTAG
sprintf(events_sorted,"%s/events_sorted.txt", netdir)
strcpy(RunLabel, RUN_LABEL)
char full_condor_out_dir[512]
char full_condor_dir[512]
void SetSingleDetectorMode()
char full_condor_err_dir[512]