5#include "Recon/Event/HgcrocTrigDigi.h"
12 if (!event.
exists(
"ecalTrigDigis"))
return;
14 event.getObject<ldmx::HgcrocTrigDigiCollection>(
"ecalTrigDigis")};
17 myEvent.event = evtNo;
18 myEvent.EcalTPs.clear();
20 for (
const auto& trigDigi : ecalTrigDigis) {
26 float e = cvt.calc(trigDigi.linearPrimitive(), tid.
layer());
34 tp.fill(trigDigi.getId(), e);
35 myEvent.EcalTPs.push_back(tp);
38 myEvent.writeToFile(file);
43 ldmx_log(debug) <<
"Process starts!";
45 file = fopen(dumpFileName.c_str(),
"wb");
51 ldmx_log(debug) <<
"Process ends!";
Write objects to a file for standalone.
Class that translates raw positions of ECal module hits into cells in a hexagonal readout.
#define DECLARE_ANALYZER_NS(NS, CLASS)
Macro which allows the framework to construct an analyzer given its name during configuration.
Class that represents a digitized hit in a calorimeter cell readout by an HGCROC.
Implements an event buffer system for storing event data.
bool exists(const std::string &name, const std::string &passName="", bool unique=true) const
Check for the existence of an object or collection with the given name and pass name in the event.
Class encapsulating parameters for configuring a processor.
Extension of DetectorID providing access to ECal trigger cell information.
int layer() const
Get the value of the layer field from the ID.
virtual void configure(framework::config::Parameters &ps)
Callback for the EventProcessor to configure itself from the given set of parameters.
virtual void onProcessEnd()
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...
virtual void onProcessStart()
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
virtual void analyze(const framework::Event &event)
Process the event and make histograms or summaries.