LDMX Software
QIEEncoder.h
1#ifndef TRIGSCINT_QIEENCODER_H
2#define TRIGSCINT_QIEENCODER_H
3
4#include <fstream>
5#include <iostream>
6
7#include "Framework/Configure/Parameters.h" // Needed to import parameters from configuration file
8#include "Framework/Event.h"
9#include "Framework/EventProcessor.h" //Needed to declare processor
10#include "TrigScint/Event/QIEStream.h"
11#include "TrigScint/Event/TrigScintQIEDigis.h"
12
13namespace trigscint {
14
16 public:
17 QIEEncoder(const std::string &name, framework::Process &process)
18 : Producer(name, process) {}
19
23 virtual ~QIEEncoder() = default;
24
30
31 void produce(framework::Event &event) override;
32
33 void onProcessStart() override;
34
35 void onProcessEnd() override;
36
37 private:
38 // electronics/detector ID channel map
39 std::string channelMapFileName_;
40 std::ifstream channelMapFile_;
41 std::map<int, int> channelMap_;
42
43 // input collection name and pass name
44 std::string inputCollection_;
45 std::string inputPassName_;
46 // and output
47 std::string outputCollection_;
48
49 // verbosity for very specific printouts that don't play well with logger
50 // format
51 bool verbose_{false};
52
53 // number of channels in the pad
54 int nChannels_{50};
55
56}; // encoder
57
58} // namespace trigscint
59
60#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:41
Class which represents the process under execution.
Definition Process.h:36
Base class for a module which produces a data product.
Producer(const std::string &name, Process &process)
Class constructor.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
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.
Definition QIEEncoder.cxx:8