Typedefs | Functions
CelltreeFrameSink.cxx File Reference
#include "WireCellRoot/CelltreeFrameSink.h"
#include "WireCellUtil/NamedFactory.h"
#include "WireCellUtil/BoundingBox.h"
#include "WireCellUtil/Waveform.h"
#include "TFile.h"
#include "TH2F.h"
#include "TH2I.h"
#include "TTree.h"
#include "TH1F.h"
#include "TClonesArray.h"
#include <iostream>
#include <algorithm>
#include <unordered_map>

Go to the source code of this file.

Typedefs

typedef std::unordered_set< std::stringstring_set_tc
 

Functions

 WIRECELL_FACTORY (CelltreeFrameSink, WireCell::Root::CelltreeFrameSink, WireCell::IFrameFilter, WireCell::IConfigurable) using namespace std
 
string_set_tc cgetset (const WireCell::Configuration &cfg)
 
ITrace::vector cget_tagged_traces (IFrame::pointer frame, IFrame::tag_t tag)
 

Typedef Documentation

typedef std::unordered_set<std::string> string_set_tc

Definition at line 90 of file CelltreeFrameSink.cxx.

Function Documentation

ITrace::vector cget_tagged_traces ( IFrame::pointer  frame,
IFrame::tag_t  tag 
)

Definition at line 100 of file CelltreeFrameSink.cxx.

101 {
102  ITrace::vector ret;
103  auto const& all_traces = frame->traces();
104  for (size_t index : frame->tagged_traces(tag)) {
105  ret.push_back(all_traces->at(index));
106  }
107  if (!ret.empty()) {
108  return ret;
109  }
110  auto ftags = frame->frame_tags();
111  if (std::find(ftags.begin(), ftags.end(), tag) == ftags.end()) {
112  return ret;
113  }
114  return *all_traces; // must make copy
115 }
struct vector vector
FMT_CONSTEXPR bool find(Ptr first, Ptr last, T value, Ptr &out)
Definition: format.h:1970
string_set_tc cgetset ( const WireCell::Configuration cfg)

Definition at line 91 of file CelltreeFrameSink.cxx.

92 {
93  string_set_tc ret;
94  for (auto jone : cfg) {
95  ret.insert(jone.asString());
96  }
97  return ret;
98 }
cfg
Definition: dbjson.py:29
std::unordered_set< std::string > string_set_tc
WIRECELL_FACTORY ( CelltreeFrameSink  ,
WireCell::Root::CelltreeFrameSink  ,
WireCell::IFrameFilter  ,
WireCell::IConfigurable   
)