RecordSource.cxx
Go to the documentation of this file.
2 
4 
5 #include "TFile.h"
6 #include "TTree.h"
7 
8 namespace ana
9 {
10  inline namespace _preview{
11 
12  //---------------------------------------------------------------------------
14  {
16  Broadcast(&prong, weight);
17  }
18 
19  //---------------------------------------------------------------------------
21  {
23 
24  fShifts.Shift(sr, wei);
25  if(wei != 0) Broadcast(sr, wei);
26 
28  }
29 
30  //---------------------------------------------------------------------------
32  {
33  while(TFile* f = fFileSource->GetNextFile()){
34  TTree* tr = (TTree*)f->Get("recTree"); // nested or flat-single only
35  assert(tr);
36 
37  long n;
38  caf::SRProxy sr(0, tr, "rec", n, 0);
39 
40  const long Nentries = tr->GetEntries();
41  for(n = 0; n < Nentries; ++n){
42  tr->LoadTree(n);
43 
44  Broadcast(&sr, 1);
45  }
46  } // end for n
47 
48  BroadcastExposure(1, 0); // TODO
49  }
50 
51  }
52 }
caf::Proxy< caf::SRFuzzyK > fuzzyk
Definition: SRProxy.h:2059
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var weight
void HandleRecord(caf::SRProxy *sr, double weight) override
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
Proxy for caf::SRFuzzyKProng.
Definition: SRProxy.h:2003
void HandleRecord(caf::SRProxy *sr, double wei) override
void BroadcastExposure(double pot, double livetime)
Definition: RecordSource.h:49
caf::Proxy< caf::SRElastic > elastic
Definition: SRProxy.h:2118
caf::Proxy< std::vector< caf::SRFuzzyKProng > > png
Definition: SRProxy.h:2043
void Broadcast(caf::SRFuzzyKProngProxy *rec, double wei)
Definition: RecordSource.h:44
caf::StandardRecord * sr
assert(nhit_max >=nhit_nbins)
caf::Proxy< caf::SRVertexBranch > vtx
Definition: SRProxy.h:2146