LDMX Software
QIEDecoder.h
1#ifndef TRIGSCINT_QIEDECODER_H
2#define TRIGSCINT_QIEDECODER_H
3
4#include <TTimeStamp.h>
5
6#include <fstream>
7#include <iostream>
8
9#include "Framework/Configure/Parameters.h" // Needed to import parameters from configuration file
10#include "Framework/Event.h"
11#include "Framework/EventProcessor.h" //Needed to declare processor
12#include "TrigScint/Event/QIEStream.h"
13#include "TrigScint/Event/TrigScintQIEDigis.h"
14namespace trigscint {
15
17 public:
18 QIEDecoder(const std::string &name, framework::Process &process)
19 : Producer(name, process) {}
20
24 virtual ~QIEDecoder() = default;
25
31
32 void produce(framework::Event &event) override;
33
34 void onProcessStart() override;
35
36 void onProcessEnd() override;
37
38 private:
41 std::ifstream channel_map_file_;
42 std::map<int, int> channel_map_;
43
44 // input/output collection and pass name
45 std::string input_collection_;
46 std::string output_collection_;
47 std::string input_pass_name_;
48
49 // number of channels in the pad
50 int n_channels_{50};
51 // number of time samples making up the event
52 int n_samples_{5};
53 // configurable flag, to set the isRealData bit in the event header
54 bool is_real_data_{false};
55
56}; // encoder
57
58} // namespace trigscint
59
60#endif // TRIGSCINT_QIEDECODER_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:42
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.
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:29
void onProcessStart() override
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
virtual ~QIEDecoder()=default
Default destructor, closes up boost archive and input stream.
void configure(framework::config::Parameters &ps) override
Configure our converter based off the configuration parameters decoded from the passed python script.
Definition QIEDecoder.cxx:9
std::string channel_map_file_name_
the channel mapping
Definition QIEDecoder.h:40
void onProcessEnd() override
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...
void produce(framework::Event &event) override
Process the event and put new data products into it.