LDMX Software
QIEEncoder.h
1#ifndef TRIGSCINT_QIEENCODER_H
2#define TRIGSCINT_QIEENCODER_H
3
4#include <fstream>
5
6#include "Framework/Configure/Parameters.h" // Needed to import parameters from configuration file
7#include "Framework/Event.h"
8#include "Framework/EventProcessor.h" //Needed to declare processor
9
10namespace trigscint {
11
13 public:
14 QIEEncoder(const std::string& name, framework::Process& process)
15 : Producer(name, process) {}
16
20 virtual ~QIEEncoder() = default;
21
27
28 void produce(framework::Event& event) override;
29
30 void onProcessStart() override;
31
32 void onProcessEnd() override;
33
34 private:
35 // electronics/detector ID channel map
36 std::string channel_map_file_name_;
37 std::ifstream channel_map_file_;
38 std::map<int, int> channel_map_;
39
40 // input collection name and pass name
41 std::string input_collection_;
42 std::string input_pass_name_;
43 // and output
44 std::string output_collection_;
45
46 // verbosity for very specific printouts that don't play well with logger
47 // format
48 bool verbose_{false};
49
50 // number of channels in the pad
51 int n_channels_{50};
52
53}; // encoder
54
55} // namespace trigscint
56
57#endif // TRIGSCINT_QIEENCODER_H
Base classes for all user event processing components to extend.
Class implementing an event buffer system for storing event data.
Implements an event buffer system for storing event data.
Definition Event.h:40
Class which represents the process under execution.
Definition Process.h:34
Base class for a module which produces a data product.
Producer(const std::string &name, Process &process)
Class constructor.
virtual void process(Event &event) final
Processing an event for a Producer is calling produce.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
void produce(framework::Event &event) override
Process the event and put new data products into it.
void onProcessStart() override
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
virtual ~QIEEncoder()=default
Default destructor, closes up boost archive and input stream.
void onProcessEnd() override
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...
void configure(framework::config::Parameters &ps) override
Configure our converter based off the configuration parameters decoded from the passed python script.