7#include "Packing/Utility/Mask.h"
8#include "Packing/Utility/Reader.h"
24 return r >> runNumber >> WRCounter >> channel >> seq_id >> sec >> coarse >>
28 event.add(name +
"RunNumber", runNumber);
29 event.add(name +
"Counter", WRCounter);
30 event.add(name +
"Channel", channel);
31 event.add(name +
"SeqId", seq_id);
32 event.add(name +
"Sec", sec);
33 event.add(name +
"Coarse", coarse);
34 event.add(name +
"Frac", frac);
38std::ostream& operator<<(std::ostream& os,
const WRBinaryPacket& p) {
39 return (os <<
"WR Packet {"
40 <<
"run: " << p.runNumber <<
", counter: " << p.WRCounter
41 <<
", channel: " << p.channel <<
", seq_id: " << p.seq_id
42 <<
", sec: " << p.sec <<
", coarse: " << p.coarse
43 <<
", frac: " << p.frac <<
"}");
86 tree_ =
new TTree(
"wrraw",
"Flattened and decoded raw WR data");
87 tree_->Branch(
"run", &
p.runNumber);
88 tree_->Branch(
"counter", &
p.WRCounter);
89 tree_->Branch(
"channel", &
p.channel);
90 tree_->Branch(
"seq_id", &
p.seq_id);
91 tree_->Branch(
"sec", &
p.sec);
92 tree_->Branch(
"coarse", &
p.coarse);
93 tree_->Branch(
"frac", &
p.frac);
103 std::cout <<
p << std::endl;
108 std::cout <<
"no more events" << std::endl;
Base classes for all user event processing components to extend.
#define DECLARE_PRODUCER_NS(NS, CLASS)
Macro which allows the framework to construct a producer given its name during configuration.
TDirectory * getHistoDirectory()
Access/create a directory in the histogram file for this event processor to create histograms and ana...
Implements an event buffer system for storing event data.
Class which represents the process under execution.
Base class for a module which produces a data product.
Class encapsulating parameters for configuring a processor.
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.
std::string output_name_
output object to put onto event bus
packing::utility::Reader file_reader_
the file reader (if we are doing that)
WRBinaryPacket p
packet being used for decoding
bool ntuplize_
should we ntuplize?
virtual void onProcessStart() final override
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
virtual void produce(framework::Event &event) final override
Process the event and put new data products into it.
std::string input_file_
input file
virtual void configure(framework::config::Parameters &) final override
Callback for the EventProcessor to configure itself from the given set of parameters.
void open(const std::string &file_name)
Open a file with this reader.