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 channelMapFile_;
42 std::map<int, int> channelMap_;
43
44 // input/output collection and pass name
45 std::string inputCollection_;
46 std::string outputCollection_;
47 std::string inputPassName_;
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 // number of time samples making up the event
56 int nSamples_{5};
57 // configurable flag, to set the isRealData bit in the event header
58 bool isRealData_{false};
59
60}; // encoder
61
62} // namespace trigscint
63
64#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: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 onProcessStart() override
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
std::string channelMapFileName_
the channel mapping
Definition QIEDecoder.h:40
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
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.