Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cwb_report_loudest.C
Go to the documentation of this file.
1 // produce condor dag file of loudest event list : used by the cwb_condor command
2 
3 {
4  #include <vector>
5 
7 
8  TB.checkFile(gSystem->Getenv("CWB_ROOTLOGON_FILE"));
9  TB.checkFile(gSystem->Getenv("CWB_PARAMETERS_FILE"));
10  TB.checkFile(gSystem->Getenv("CWB_UPARAMETERS_FILE"));
11  TB.checkFile(gSystem->Getenv("CWB_PPARAMETERS_FILE"));
12  TB.checkFile(gSystem->Getenv("CWB_UPPARAMETERS_FILE"));
13  TB.checkFile(gSystem->Getenv("CWB_EPPARAMETERS_FILE"));
14 
15  if(simulation) {
16  cout << endl << "cwb_report_loudest.C : Error - "
17  << "this command can not be used in simulation mode !!!" << endl << endl;
18  exit(1);
19  }
20 
21  if(TString(condor_tag)=="") {
22  cout << endl;
23  cout << "cwb_condor_loudest.C : Error - the accounting_group is not defined !!!" << endl;
24  cout << "The accounting_group must be defined in the user_parameters.C file" << endl;
25  cout << "See the following link:" << endl;
26  cout <<" https://ldas-gridmon.ligo.caltech.edu/accounting/condor_groups/determine_condor_account_group.html" << endl;
27  cout << "Examples : " << endl;
28  cout << "strcpy(condor_tag,\"ligo.dev.o2.burst.allsky.cwboffline\");" << endl;
29  cout << "strcpy(condor_tag,\"ligo.prod.o2.burst.allsky.cwboffline\");" << endl;
30  cout << "If you don't need it set : strcpy(condor_tag,\"disabled\");" << endl << endl;
31  exit(1);
32  }
33  if(TString(condor_tag)=="disabled") strcpy(condor_tag,"");
34 
36  if(gSystem->Getenv("CWB_UPARAMETERS_FILE")==NULL) {
37  cout << "Error : environment CWB_UPARAMETERS_FILE is not defined!!!" << endl;exit(1);
38  } else {
39  cwb_uparameters_file=TString(gSystem->Getenv("CWB_UPARAMETERS_FILE"));
40  }
41 
42  TString cwb_stage_name="CWB_STAGE_LIKELIHOOD";
44 
45  // extract options
46  float cwb_loudest_rho = 0;
55  TString cwb_report_options = TString(gSystem->Getenv("CWB_REPORT_OPTIONS"));
56  if(cwb_report_options!="") {
57  TString option="";
58  // get the stage
59  option = TB.getParameter(cwb_report_options,"--stage");
60  if(option!="") {
61  option.ToUpper();
62  if(option=="FULL") cwb_loudest_stage = option;
63  }
64  // get the loudest output dir
65  option = TB.getParameter(cwb_report_options,"--odir");
66  if(option!="") cwb_loudest_odir = option;
67  // get the min id number of the loudest events to be processed
68  option = TB.getParameter(cwb_report_options,"--idmin");
69  if(option!="") {
70  if(option.IsDigit()) cwb_loudest_idmin = option.Atoi();
71  else { cout << endl << "cwb_report_loudest.C : Error - "
72  << "the option --idmin value is not a number !!!"
73  << endl << endl; exit(1);}
74  }
75  // get the max id number of the loudest events to be processed
76  // if not defined then idmax=idmin
77  option = TB.getParameter(cwb_report_options,"--idmax");
78  if(option!="") {
79  if(option.IsDigit()) cwb_loudest_idmax = option.Atoi();
80  else { cout << endl << "cwb_report_loudest.C : Error - "
81  << "the option --idmax value is not a number !!!"
82  << endl << endl; exit(1);}
83  } else cwb_loudest_idmax=cwb_loudest_idmin;
84  if(cwb_loudest_idmax<cwb_loudest_idmin) {
85  cout << endl << "cwb_report_loudest.C : Error - "
86  << "the option --idmax value is < of --idmin value !!!" << endl << endl;
87  exit(1);
88  }
89  // get number of loudest events to be processed
90  option = TB.getParameter(cwb_report_options,"--nevt");
91  if(option!="") {
92  if(option.IsDigit()) cwb_loudest_nevt = option.Atoi();
93  else { cout << endl << "cwb_report_loudest.C : Error - "
94  << "the option --nevt value is not a number !!!"
95  << endl << endl; exit(1);}
96  }
97  if(cwb_loudest_nevt==0) cwb_loudest_nevt=100000;
98  // get the user parameters file option
99  option = TB.getParameter(cwb_report_options,"--ufile");
100  if(option!="") cwb_loudest_ufile = option;
101  // get the veto option
102  option = TB.getParameter(cwb_report_options,"--veto");
103  if(option!="") cwb_loudest_veto = option;
104  cwb_loudest_veto.ToUpper();
105  // get the ced option
106  option = TB.getParameter(cwb_report_options,"--ced");
107  if(option!="") cwb_loudest_ced = option;
108  cwb_loudest_ced.ToUpper();
109  // get the rho threshold option
110  option = TB.getParameter(cwb_report_options,"--rho");
111  if(option!="") {
112  if(option.IsFloat()) cwb_loudest_rho = option.Atof();
113  else { cout << endl << "cwb_report_loudest.C : Error - "
114  << "the option --rho value is not a number !!!"
115  << endl << endl; exit(1);}
116  }
117  }
118 
119  // creates dir for loudest events
121  CWB::Toolbox::mkDir(pp_loudest_dir,!pp_batch);
122 
123  // read condor job list
124  char full_condor_dir[1024];
125  sprintf(full_condor_dir,"%s/%s",work_dir,condor_dir);
126  vector<int> jobList=TB.getCondorJobList(full_condor_dir, data_label);
127  int max_jobs = 0;
128  for(int i=0;i<jobList.size();i++) if(jobList[i]>max_jobs) max_jobs=jobList[i];
129 
130  // read loudest event list
131  TB.checkFile(netdir);
132  char events_sorted[1024];
133  sprintf(events_sorted,"%s/events_sorted.txt",netdir);
134  CWB::Toolbox::checkFile(events_sorted);
135 
136  char pm[8];
137  char c3[8];
138  float icc, icc2, icc3, irho, iacor, ilag, islag, ilik, ipen, icHH, ivHH, ivED;
139  int ifreq, ilow, ihigh;
140  float idur;
141  int isize, irate, irun;
142  float phi, theta, psi;
143 
144  double* itime = new double[nIFO];
145  double* iSNR = new double[nIFO];
146  double* ihrss = new double[nIFO];
147 
148  vector<int> lagLoudest[max_jobs]; // contains the lag list of the loudest events for each job
149 
150  int iline=0; // line counter
151  int ievt=0; // event select counter
152  vector<TString> JTAG;
153  ifstream f_ev(events_sorted);
154  while(ievt<cwb_loudest_nevt) {
155  f_ev>>pm>>c3>>irho>>icc>>icc2>>icc3>>iacor>>ilag>>islag>>ilik;
156  f_ev>>ipen>>icHH>>ifreq>>ilow>>ihigh>>idur>>isize>>irate>>irun;
157  for(int i=0;i<nIFO;i++) f_ev>>itime[i];
158  for(int i=0;i<nIFO;i++) f_ev>>iSNR[i];
159  for(int i=0;i<nIFO;i++) f_ev>>ihrss[i];
160  f_ev>>phi>>theta>>psi;
161  if (!f_ev.good()) break;
162  iline++;
163  if (!TString(pm).Contains("+")) continue;
164  if ((cwb_loudest_veto=="TRUE")&&(strcmp(pm,"+")||strcmp(c3,"-"))) continue;
165  if (cwb_loudest_idmin&&(iline<cwb_loudest_idmin)) continue;
166  if (cwb_loudest_idmax&&(iline>cwb_loudest_idmax)) continue;
167  if (irho<cwb_loudest_rho) continue;
168  ievt++;
169  //cout << irun << " " << 0 << " " << "true" << " " << 0 << " " << ilag << " " << ced_dir << endl;
170  //out << irun << " " << 0 << " " << "true" << " " << 0 << " " << ilag << " " << ced_dir << endl;
171  char jtag[1024];sprintf(jtag,"%i_%i_%i",irun,(int)islag,(int)ilag);
172  bool bjtag=false;for(int j=0;j<JTAG.size();j++) if(JTAG[j]==jtag) bjtag=true;
173  if(!bjtag) JTAG.push_back(jtag); else continue; // skip job if already created
174  lagLoudest[irun-1].push_back(ilag);
175  }
176  f_ev.close();
177 
178  delete [] itime;
179  delete [] iSNR;
180  delete [] ihrss;
181 
182  if(ievt==0) {
183  cout << endl << "cwb_report_loudest.C : Warning - "
184  << "no events has been selected !!!" << endl << endl;
185  exit(1);
186  }
187 
188  // check stages of output root files
191 
193  for (int i=0;i<max_jobs;i++) jobStage[i]=-1; // excluded jobs
194  for (int i=0;i<jobList.size();i++) jobStage[jobList[i]-1]=0; // jobs in the dag file
195 
196  char tag[1024];sprintf(tag,"%s.dag.loudest.",data_label);
197  vector<TString> fileList = TB.getFileListFromDir(condor_dir, "", tag);
198  int iversion=0;
199  for(int i=0;i<fileList.size();i++) {
200  //cout << i << " " << fileList[i].Data() << endl;
201  TObjArray* token = TString(fileList[i]).Tokenize(TString("."));
202  TObjString* sloudestID = (TObjString*)token->At(token->GetEntries()-1);
203  if(sloudestID->GetString().IsDigit()) {
204  cout << i << " " << fileList[i].Data() << endl;
205  int loudestID = sloudestID->GetString().Atoi();
206  if(iversion<loudestID) iversion=loudestID;
207  }
208  }
209  iversion++;
210 
211  char ofile[1024];
212  sprintf(ofile,"%s/%s.dag.loudest.%d",condor_dir,data_label,iversion);
213 
214  // Check if file exist
215  Long_t id,size,flags,mt;
216  int estat = gSystem->GetPathInfo(ofile,&id,&size,&flags,&mt);
217  if (estat==0) {
218  char answer[1024];
219  strcpy(answer,"");
220  do {
221  cout << "File \"" << ofile << "\" already exist" << endl;
222  cout << "Do you want to overwrite the file ? (y/n) ";
223  cin >> answer;
224  cout << endl << endl;
225  } while ((strcmp(answer,"y")!=0)&&(strcmp(answer,"n")!=0));
226  if (strcmp(answer,"n")==0) {
227  exit(0);
228  }
229  }
230 
231  // get cwb stage input dir (input files produced by the previous stage)
233  if(gSystem->Getenv("CWB_STAGE_INPUT")!=NULL) {
234  cwb_stage_input=TString(gSystem->Getenv("CWB_STAGE_INPUT"));
235  }
236  if(cwb_stage_input=="") cwb_stage_input=output_dir;
237  TB.checkFile(cwb_stage_input);
238 
239  char job_label[1024];sprintf(job_label,"%s",data_label);
240 
241  cout << "Starting reading output directory ..." << endl;
242  vector<TString> jobFiles(max_jobs);
243  for(int i=0;i<max_jobs;i++) jobFiles[i]=cwb_uparameters_file;
244  vector<TString> fileList = TB.getFileListFromDir(cwb_stage_input,".root","",data_label,true);
245  if(cwb_loudest_stage=="AUTO") for(int n=0;n<fileList.size();n++) {
246 
247  int jobId = TB.getJobId(fileList[n]); // Get JOB ID
248  jobId-=1;
249 
250  if(fileList[n].BeginsWith(cwb_stage_input+"/init_"))
251  if(CWB_STAGE_INIT>jobStage[jobId])
252  {jobStage[jobId]=CWB_STAGE_INIT;jobFiles[jobId]=fileList[n];continue;}
253  if(fileList[n].BeginsWith(cwb_stage_input+"/strain_"))
254  if(CWB_STAGE_STRAIN>jobStage[jobId])
255  {jobStage[jobId]=CWB_STAGE_STRAIN;jobFiles[jobId]=fileList[n];continue;}
256  if(fileList[n].BeginsWith(cwb_stage_input+"/cstrain_"))
257  if(CWB_STAGE_CSTRAIN>jobStage[jobId])
258  {jobStage[jobId]=CWB_STAGE_CSTRAIN;jobFiles[jobId]=fileList[n];continue;}
259  if(fileList[n].BeginsWith(cwb_stage_input+"/coherence_"))
260  if(CWB_STAGE_COHERENCE>jobStage[jobId])
261  {jobStage[jobId]=CWB_STAGE_COHERENCE;jobFiles[jobId]=fileList[n];continue;}
262  if(fileList[n].BeginsWith(cwb_stage_input+"/supercluster_"))
263  if(CWB_STAGE_SUPERCLUSTER>jobStage[jobId])
264  {jobStage[jobId]=CWB_STAGE_SUPERCLUSTER;jobFiles[jobId]=fileList[n];continue;}
265  }
266  //for (int i=0;i<max_jobs;i++) cout << i << " " << jobStage[i] << " " << jobFiles[i].Data() << " " << cwb_stage << endl;
267 
268  // if jobFile is a configuration file and user has provided an auxiliary config file
269  // then jobFile is initialized with the auxiliary config file
270  for(int i=0;i<max_jobs;i++) {
271  if(jobFiles[i]==cwb_uparameters_file) {
272  if(cwb_loudest_ufile!=cwb_uparameters_file) {
274  }
275  }
276  }
277 
278  int nloudest=0;
279  for (int i=0;i<max_jobs;i++) nloudest+=lagLoudest[i].size();
280  if(nloudest==0) {
281  cout << "No loudest events to be processed !!!" << endl;
282  gSystem->Exit(0);
283  }
284  cout << endl;
285  cout << "New Loudest File " << endl;
286  cout << ofile << endl;
287 
288  // condor log dirs
289  char full_condor_out_dir[1024];
290  char full_condor_err_dir[1024];
291  sprintf(full_condor_out_dir,"%s/%s",work_dir,log_dir);
292  sprintf(full_condor_err_dir,"%s/%s",work_dir,log_dir);
293 
294  // create dag condor file
295  char full_condor_dir[1024];
296  sprintf(full_condor_dir,"%s/%s",work_dir,condor_dir);
297 
298  ofstream out;
299  out.open(ofile,ios::out);
300  int jID = 0;
301  for (int i=0;i<max_jobs;i++) {
302  for (int j=0;j<lagLoudest[i].size();j++) {
303  jID++;
304  char ostring[1024];
305  int jobID=i+1;
306  char jtag[1024];sprintf(jtag,"%i_%i",jobID,lagLoudest[i][j]);
307  sprintf(ostring,"JOB A%i_%s %s/%s.sub.loudest.%d",jID,jtag,full_condor_dir,data_label,iversion);
308  out << ostring << endl;
309  sprintf(ostring,"VARS A%i_%s PID=\"%i\" CWB_UFILE=\"%s\" CWB_STAGE=\"%s\" ",
310  jID,jtag,jobID,jobFiles[i].Data(),cwb_stage_name.Data());
311  out << ostring;
312  sprintf(ostring,"CWB_MDC_FACTOR=\"0\" CWB_JOB_LAG=\"%i\" CWB_CED_DIR=\"%s\" ",
313  lagLoudest[i][j],pp_loudest_dir.Data());
314  out << ostring;
315  sprintf(ostring,"CWB_INET_OPTIONS=\"%s\" CWB_UPARAMETERS_FILE=\"%s\" CWB_BATCH=\"true\"",
316  cwb_loudest_ced.Data(),cwb_loudest_ufile.Data());
317  out << ostring << endl;
318  sprintf(ostring,"RETRY A%i_%s 3000",jID,jtag);
319  out << ostring << endl;
320  // remove broken symbolic links of condor log files (avoid init condor failure)
321 /* COMMENTED BECAUSE TAKES TIME
322  TString path;
323  char symlink[1024];
324  Long_t id,size,flags,mt;
325  sprintf(symlink,"%s/%d_%s_%s.out",full_condor_out_dir,jobID,data_label,cwb_stage_name.Data());
326  path = CWB::Toolbox::getFileName(symlink);
327  if(path!="") {
328  int estat = gSystem->GetPathInfo(path.Data(),&id,&size,&flags,&mt);
329  if(estat!=0) { // condor log out symbolic link is broken
330  char cmd[1024]; sprintf(cmd,"rm -f %s",symlink);
331  gSystem->Exec(cmd);
332  }
333  }
334  sprintf(symlink,"%s/%d_%s_%s.err",full_condor_err_dir,jobID,data_label,cwb_stage_name.Data());
335  path = CWB::Toolbox::getFileName(symlink);
336  if(path!="") {
337  int estat = gSystem->GetPathInfo(symlink,&id,&size,&flags,&mt);
338  if(estat!=0) { // condor log err symbolic link is broken
339  char cmd[1024]; sprintf(cmd,"rm -f %s",symlink);
340  gSystem->Exec(cmd);
341  }
342  }
343 */
344  }
345  }
346  out.close();
347 
348  // check if loudest.sh script is present in the condor directory
349  // if not the condor_dir/loudest.sh is linked to $CWB_SCRIPTS/cwb_loudest.sh
350  TString cwb_scripts = TString(gSystem->Getenv("CWB_SCRIPTS"));
351  Long_t id,size,flags,mt;
352  int estat = gSystem->GetPathInfo(TString(condor_dir)+"/loudest.sh",&id,&size,&flags,&mt);
353  if (estat!=0) { // file not found
354  char cmd[1024];
355  sprintf(cmd,"ln -sf %s/cwb_loudest.sh %s/loudest.sh",cwb_scripts.Data(),condor_dir);
356  cout << cmd << endl;
357  gSystem->Exec(cmd);
358  }
359 
360  // create sub condor file
361  char ofile_condor_sub[1024];
362  sprintf(ofile_condor_sub,"%s/%s.sub.loudest.%d",full_condor_dir,data_label,iversion);
363 
364  FILE *fP=NULL;
365  if((fP = fopen(ofile_condor_sub, "w")) == NULL) {
366  cout << "cwb_report_loudest.C : Error - cannot open file " << ofile_condor_sub << endl;
367  exit(1);
368  }
369  cout << ofile_condor_sub << endl;
370 
371  fprintf(fP,"universe = vanilla\n");
372  fprintf(fP,"getenv = true\n");
373  fprintf(fP,"priority = $(PRI)\n");
374  fprintf(fP,"on_exit_hold = ( ExitCode != 0 )\n");
375  fprintf(fP,"request_memory = 2000\n");
376  fprintf(fP,"executable = loudest.sh\n");
377  fprintf(fP,"job_machine_attrs = Machine\n");
378  fprintf(fP,"job_machine_attrs_history_length = 5\n");
379  fprintf(fP,"requirements = target.machine =!= MachineAttrMachine1 && target.machine =!= MachineAttrMachine2 && target.machine =!= MachineAttrMachine3 && target.machine =!= MachineAttrMachine4 && target.machine =!= MachineAttrMachine5\n");
380  fprintf(fP,"environment = CWB_JOBID=$(PID);CWB_UFILE=$(CWB_UFILE);CWB_STAGE=$(CWB_STAGE);CWB_MDC_FACTOR=$(CWB_MDC_FACTOR);CWB_JOB_LAG=$(CWB_JOB_LAG);CWB_CED_DIR=$(CWB_CED_DIR);CWB_INET_OPTIONS=$(CWB_INET_OPTIONS);CWB_UPARAMETERS_FILE=$(CWB_UPARAMETERS_FILE);CWB_BATCH=$(CWB_BATCH)\n");
381  if(TString(condor_tag)!="") fprintf(fP,"accounting_group = %s\n",condor_tag);
382  fprintf(fP,"output = %s/$(PID)_$(CWB_JOB_LAG)_%s_%s.out\n",full_condor_out_dir,data_label,cwb_loudest_odir.Data());
383  fprintf(fP,"error = %s/$(PID)_$(CWB_JOB_LAG)_%s_%s.err\n",full_condor_err_dir,data_label,cwb_loudest_odir.Data());
384  fprintf(fP,"log = %s/%s_%s.log\n",condor_log,data_label,cwb_loudest_odir.Data());
385  fprintf(fP,"notification = never\n");
386  fprintf(fP,"rank=memory\n");
387  fprintf(fP,"queue\n");
388  fclose(fP);
389 
390 
391  cout << "Number of Jobs : " << jID << "/" << jobList.size() << endl;
392  cout << endl;
393  cout << "To submit condor recovered jobs type :" << endl;
394  sprintf(ofile,"%s/%s.dag.loudest.%d",condor_dir,data_label,iversion);
395  cout << "cwb_condor submit " << ofile << endl;
396  cout << endl;
397 
398  gSystem->Exit(0);
399 }
TString cwb_scripts
static vector< TString > getFileListFromDir(TString dir_name, TString endString="", TString beginString="", TString containString="", bool fast=false)
Definition: Toolbox.cc:4333
Long_t id
int estat
char cmd[1024]
int ihigh
fprintf(stdout,"start=%f duration=%f rate=%f\n", x.start(), x.size()/x.rate(), x.rate())
int cwb_loudest_idmax
int irate
TString pp_loudest_dir
cout<< "slagList size : "<< slagList.size()<< endl;cout<< endl<< "Start segments selection from dq cat1 list ..."<< endl<< endl;rslagList=TB.getSlagList(slagList, ifos, segLen, segMLS, segEdge, nDQF, DQF, CWB_CAT1);cout<< "Number of selected jobs after cat1 : "<< rslagList.size()<< endl;cout<< endl<< "Start segments selection from dq cat2 list ..."<< endl<< endl;rslagList=TB.getSlagList(rslagList, ifos, segLen, segTHR, segEdge, nDQF, DQF, CWB_CAT2);cout<< "Number of selected jobs after cat2 : "<< rslagList.size()<< endl;vector< TString > jobFiles
int n
Definition: cwb_net.C:10
TString("c")
TString cwb_loudest_veto
delete[] ihrss
float icc3
Long_t mt
float theta
TString cwb_loudest_ced
char full_condor_dir[1024]
delete[] itime
TString cwb_loudest_stage
sprintf(full_condor_dir,"%s/%s", work_dir, condor_dir)
float icc
Long_t size
char ofile[1024]
int j
Definition: cwb_net.C:10
i drho i
delete[] iSNR
static bool checkFile(TString fName, bool question=false, TString message="")
Definition: Toolbox.cc:3956
int isize
int jobID
Definition: cwb_net.C:177
CWB::Toolbox TB
Definition: ComputeSNR.C:5
TString cwb_stage_input
float ipen
CWB_STAGE jobStage[max_jobs]
Long_t flags
#define nIFO
ofstream out
Definition: cwb_merge.C:196
char data_label[512]
Definition: test_config1.C:160
TString cwb_report_options
float phi
float psi
int cwb_loudest_idmin
float islag
char netdir[1024]
float ivED
TString cwb_stage_name
char job_label[512]
char events_sorted[256]
float cwb_loudest_rho
int jobStart[max_jobs]
int ilow
ifstream f_ev(events_sorted)
float ivHH
TObjArray * token
int jobStop[max_jobs]
char log_dir[512]
Definition: test_config1.C:151
static int getJobId(TString file, TString fext="root")
Definition: Toolbox.cc:5913
int ifreq
char tag[256]
Definition: cwb_merge.C:74
char ofile_condor_sub[1024]
float icHH
FILE * fP
float irho
TString cwb_loudest_odir
char answer[256]
static vector< int > getCondorJobList(TString condor_dir, TString label)
Definition: Toolbox.cc:1378
static TString getParameter(TString options, TString param="")
Definition: Toolbox.cc:5943
vector< int > jobList
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
cout<< "Starting reading output directory ..."<< endl;vector< TString > fileList
float iacor
int irun
char pp_dir[512]
Definition: test_config1.C:155
static void mkDir(TString dir, bool question=false, bool remove=true)
Definition: Toolbox.cc:4000
float idur
strcpy(RunLabel, RUN_LABEL)
float icc2
char condor_log[512]
Definition: test_config1.C:163
int nloudest
int pp_max_nloudest_list
int max_jobs
TString cwb_uparameters_file
int jobId
char condor_dir[512]
Definition: test_config1.C:148
char work_dir[512]
Definition: test_config1.C:143
float ilik
char full_condor_out_dir[512]
CWB_STAGE cwb_stage
simulation
Definition: cwb_eced.C:9
fclose(ftrig)
char output_dir[512]
Definition: test_config1.C:146
char pm[8]
char c3[8]
TString cwb_loudest_ufile
float ilag
int cwb_loudest_nevt
CWB_STAGE
Definition: cwb.hh:102
char full_condor_err_dir[512]
exit(0)