21 #pragma GCC system_header 28 #include "TObjArray.h" 29 #include "TObjString.h" 46 cout <<
"-----> CWB_Plugin_netEvent.C" << endl;
47 cout <<
"ifo " << ifo.Data() << endl;
48 cout <<
"type " << type << endl;
64 TTree*
net_tree = (TTree *) froot->Get(
"waveburst");
68 net_tree->Branch(
"UserParms",UserParms,TString::Format(
"UserParms[%i]/F",cfg->
nIFO));
75 cout <<
"CWB_Plugin_netEvent.C -> " 76 <<
"CWB_PLUGIN_OLIKELIHOOD implemented only for 2G" << endl;
82 cout <<
"-----> CWB_Plugin_netEvent.C -> " 83 <<
" gIFACTOR : " << gIFACTOR << endl;
86 float* gSLAGSHIFT=NULL;
IMPORT(
float*,gSLAGSHIFT)
100 outDump.ReplaceAll(
".root.tmp",
".txt");
102 TTree*
net_tree = (TTree *) froot->Get(
"waveburst");
105 net_tree->SetBranchAddress(
"UserParms",UserParms);
109 net_tree->Branch(
"UserParms",UserParms,TString::Format(
"UserParms[%i]/F",cfg->
nIFO));
113 for(
int k=0;
k<
K;
k++) {
115 id = NET->
getwc(
k)->
get(const_cast<char*>(
"ID"), 0,
'L', rate);
119 int ID = size_t(
id.data[
j]+0.5);
142 if(cfg->
dump) EVT->
dopen(outDump.Data(),
const_cast<char*
>(
"a"),
false);
143 EVT->
output2G(net_tree,NET,ID,
k,ofactor);
165 TList *files = (TList*)gROOT->GetListOfFiles();
174 while ((file=(TSystemFile*)
next())) {
175 fname = file->GetName();
177 if(fname.Contains(
"wave_")) {
178 froot=(TFile*)file;froot->cd();
180 outDump.ReplaceAll(
".root.tmp",
".txt");
185 cout <<
"CWB_Plugin_netEvent.C : Error - output root file not found" << endl;
189 cout <<
"CWB_Plugin_netEvent.C : Error - output root file not found" << endl;
void setSLags(float *slag)
cout<< endl;cout<< "ts size = "<< ts.size()<< " ts rate = "<< ts.rate()<< endl;tf.Forward(ts, wdm);int levels=tf.getLevel();cout<< "tf size = "<< tf.size()<< endl;double dF=tf.resolution();double dT=1./(2 *dF);cout<< "rate(hz) : "<< RATE<< "\ layers : "<< nLAYERS<< "\ dF(hz) : "<< dF<< "\ dT(ms) : "<< dT *1000.<< endl;int itime=TIME_PIXEL_INDEX;int ifreq=FREQ_PIXEL_INDEX;int index=(levels+1) *itime+ifreq;double time=itime *dT;double freq=(ifreq >0) ? ifreq *dF :dF/4;cout<< endl;cout<< "PIXEL TIME = "<< time<< " sec "<< endl;cout<< "PIXEL FREQ = "<< freq<< " Hz "<< endl;cout<< endl;wavearray< double > x
wavearray< double > get(char *name, size_t index=0, char atype='R', int type=1, bool=true)
param: string with parameter name param: index in the amplitude array, which define detector param: c...
void dopen(const char *fname, char *mode, bool header=true)
fprintf(stdout,"start=%f duration=%f rate=%f\, x.start(), x.size()/x.rate(), x.rate())
void output2G(TTree *, network *, size_t, int, double)
void CWB_Plugin(TFile *jfile, CWB::config *cfg, network *NET, WSeries< double > *x, TString ifo, int type)
COHERENCE.
#define IMPORT(TYPE, VAR)
TIter next(twave->GetListOfBranches())
TFile * GetRootFile(network *NET)
FILE * fP
injected reconstructed xcor waveform
netevent EVT(itree, nifo)
netcluster * getwc(size_t n)
param: delay index
double factors[FACTORS_MAX]