Logo Coherent WaveBurst  
Reference Guide
Logo
 All Namespaces Files Functions Variables Macros Pages
CreateUniqueLags3ifos.C
Go to the documentation of this file.
1 void CreateUniqueLags3ifos(TString odir, int nLags=599) {
2 
3  if(nLags%2==0) {
4  cout << "CreateUniqueLags3ifos - Error : nLags must be odd !!!" << endl;
5  exit(1);
6  }
7 
8  char ofname[1024];
9  sprintf(ofname,"%s/Unique_n%d.lags",odir.Data(),nLags);
10 
11  ofstream out;
12  out.open(ofname,ios::out);
13  if(!out.good()) {cout << "CreateUniqueLags3ifos - Error : Opening File : " << ofname << endl;gSystem->Exit(1);}
14 
15  out << 0 << "\t" << 0 << "\t" << 0 << "\t" << 0 << endl;
16  for(int i=1;i<nLags;i++) {
17  int lag0 = 0;
18  int lag1 = i%2 ? i : nLags-i+1;
19  int lag2 = i%2 ? nLags-i : i-1;
20  out << i << "\t" << lag0 << "\t" << lag1 << "\t" << lag2 << endl;
21  }
22 
23  out.close();
24 
25  cout << endl << "Created file : " << ofname << endl << endl;
26 
27  exit(0);
28 }
29 
void CreateUniqueLags3ifos(TString odir, int nLags=599)