31 cout <<
"cwb_condor_create_ced.C : Error - the accounting_group is not defined !!!" << endl;
32 cout <<
"The accounting_group must be defined in the user_parameters.C file" << endl;
33 cout <<
"See the following link:" << endl;
34 cout <<
" https://ldas-gridmon.ligo.caltech.edu/accounting/condor_groups/determine_condor_account_group.html" << endl;
35 cout <<
"Examples : " << endl;
36 cout <<
"strcpy(condor_tag,\"ligo.dev.o2.burst.allsky.cwboffline\");" << endl;
37 cout <<
"strcpy(condor_tag,\"ligo.prod.o2.burst.allsky.cwboffline\");" << endl;
38 cout <<
"If you don't need it set : strcpy(condor_tag,\"disabled\");" << endl << endl;
65 float icc,
icc2,
icc3,
irho,
iacor,
ilag,
islag,
ilik,
ipen,
icHH,
ivHH,
ivED;
112 if((fP = fopen(ofile_condor_sub,
"w")) == NULL) {
113 cout <<
"cwb_condor_create_ced.C : Error - cannot open file " << ofile_condor_sub << endl;
116 cout << ofile_condor_sub << endl;
126 fprintf(fP,
"universe = vanilla\n");
128 fprintf(fP,
"priority = $(PRI)\n");
129 fprintf(fP,
"on_exit_hold = ( ExitCode != 0 )\n");
130 fprintf(fP,
"request_memory = 2000\n");
131 fprintf(fP,
"executable = ced.sh\n");
132 fprintf(fP,
"job_machine_attrs = Machine\n");
133 fprintf(fP,
"job_machine_attrs_history_length = 5\n");
134 fprintf(fP,
"requirements = target.machine =!= MachineAttrMachine1 && target.machine =!= MachineAttrMachine2 && target.machine =!= MachineAttrMachine3 && target.machine =!= MachineAttrMachine4 && target.machine =!= MachineAttrMachine5\n");
135 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");
136 if(
TString(condor_tag)!=
"")
fprintf(fP,
"accounting_group = %s\n",condor_tag);
137 fprintf(fP,
"output = %s/$(PID)_$(CWB_JOB_LAG)_%s.out\n",full_condor_out_dir,condor_label);
138 fprintf(fP,
"error = %s/$(PID)_$(CWB_JOB_LAG)_%s.err\n",full_condor_err_dir,condor_label);
140 fprintf(fP,
"notification = never\n");
148 char ofile_condor_dag[1024];
152 out.open(ofile_condor_dag,
ios::out);
153 if (!out.good()) {cout <<
"Error Opening File : " << ofile_condor_dag << endl;
exit(1);}
154 cout << ofile_condor_dag << endl;
158 ifstream
f_ev(events_sorted);
160 f_ev>>pm>>c3>>irho>>icc>>icc2>>icc3>>iacor>>ilag>>islag>>ilik>>ipen>>icHH>>ifreq>>ilow>>ihigh>>idur>>isize>>irate>>
irun;
161 for(
int i=0;i<nIFO;i++) f_ev>>itime[
i];
162 for(
int i=0;i<nIFO;i++) f_ev>>iSNR[
i];
163 for(
int i=0;i<nIFO;i++) f_ev>>ihrss[
i];
165 if (!
f_ev.good())
break;
166 if (!
TString(pm).Contains(
"+"))
continue;
172 char jtag[1024];
sprintf(jtag,
"%i_%i",irun,(
int)ilag);
173 bool bjtag=
false;
for(
int j=0;
j<JTAG.size();
j++)
if(JTAG[
j]==jtag) bjtag=
true;
174 if(!bjtag) JTAG.push_back(jtag);
else continue;
176 sprintf(ostring,
"JOB A%i_%s %s.sub",jID,jtag,condor_label);
177 out << ostring << endl;
178 int evt_gps_time = singleDetector ? itime[0] : 0;
179 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());
180 out << ostring << endl;
181 sprintf(ostring,
"RETRY A%i_%s 3000",jID,jtag);
182 out << ostring << endl;
void Export(TString fname="")
char full_condor_dir[1024]
void Import(TString umacro="")
fprintf(stdout,"start=%f duration=%f rate=%f\, x.start(), x.size()/x.rate(), x.rate())
char full_condor_out_dir[1024]
char ofile_condor_sub[1024]
ifstream f_ev(events_sorted)
char full_condor_err_dir[1024]
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\");fprintf(fP,"getenv = true\");fprintf(fP,"priority = $(PRI)\");fprintf(fP,"on_exit_hold = ( ExitCode != 0 )\");fprintf(fP,"request_memory = 2000\");fprintf(fP,"executable = ced.sh\");fprintf(fP,"job_machine_attrs = Machine\");fprintf(fP,"job_machine_attrs_history_length = 5\");fprintf(fP,"requirements = target.machine =!= MachineAttrMachine1 && target.machine =!= MachineAttrMachine2 && target.machine =!= MachineAttrMachine3 && target.machine =!= MachineAttrMachine4 && target.machine =!= MachineAttrMachine5\");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)\");if(TString(condor_tag)!="") fprintf(fP,"accounting_group = %s\", condor_tag);fprintf(fP,"output = %s/$(PID)_$(CWB_JOB_LAG)_%s.out\", full_condor_out_dir, condor_label);fprintf(fP,"error = %s/$(PID)_$(CWB_JOB_LAG)_%s.err\", full_condor_err_dir, condor_label);fprintf(fP,"log = %s/%s.log\", condor_log, condor_label);fprintf(fP,"notification = never\");fprintf(fP,"rank=memory\");fprintf(fP,"queue\");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)
void SetSingleDetectorMode()