LDMX Software
DumpFileWriter.h
Go to the documentation of this file.
1
7#ifndef DUMPFILEWRITER_H
8#define DUMPFILEWRITER_H
9
10// LDMX Framework
11#include "DiscreteInputs.h"
12#include "DiscreteInputs_IO.h"
14#include "Framework/Configure/Parameters.h" // Needed to import parameters from configuration file
15#include "Framework/Event.h"
16#include "Framework/EventProcessor.h" //Needed to declare processor
17#include "TrigUtilities.h"
18#include "ap_fixed.h"
19#include "ap_int.h"
20
21namespace trigger {
22
28 public:
29 DumpFileWriter(const std::string& name, framework::Process& process)
30 : framework::Analyzer(name, process) {}
31
33
34 virtual void analyze(const framework::Event& event);
35
36 virtual void onProcessStart();
37
38 virtual void onProcessEnd();
39
40 typedef ap_ufixed<16, 14> e_t; // [MeV] (Up to at least 8 GeV)
41
42 private:
43 // From:
44 // Tools/python/HgcrocEmulator.py
45 // ECal/python/digi.py
46 // ECal/src/EcalRecProducer.cxx
47 /* float gain = 320. / 0.1 / 1024; //
48 * mV/ADC */
49 /* float mVtoMeV = 0.130 / (37000.0 * (0.162 / 1000.) * (1. / 0.1)); //
50 * MeV/mV */
51 /* std::vector<float> layerWeights = { */
52 /* 1.675, 2.724, 4.398, 6.039, 7.696, 9.077, 9.630, 9.630, 9.630,
53 */
54 /* 9.630, 9.630, 9.630, 9.630, 9.630, 9.630, 9.630, 9.630, 9.630,
55 */
56 /* 9.630, 9.630, 9.630, 9.630, 9.630, 13.497, 17.364, 17.364, 17.364,
57 */
58 /* 17.364, 17.364, 17.364, 17.364, 17.364, 17.364, 8.990}; */
59 /* float secondOrderEnergyCorrection = 4000. / 4010.; */
60 /* float mipSiEnergy = 0.130; */
61
62 // ClusterGeometry myGeo;
63
64 std::string dumpFileName = "dummy.dump";
65 EventDump myEvent;
66 FILE* file = 0;
67 unsigned long evtNo = 0;
68};
69} // namespace trigger
70
71#endif /* DUMPFILEWRITER_H */
Class that defines the relationship between precision cells and trigger cells and provides geometry i...
Base classes for all user event processing components to extend.
Class implementing an event buffer system for storing event data.
Base class for a module which does not produce a data product.
Implements an event buffer system for storing event data.
Definition Event.h:41
Class which represents the process under execution.
Definition Process.h:36
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
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.