DDASToys for NSCLDAQ  6.2-000
DDASDecoder.h
Go to the documentation of this file.
1 /*
2  This software is Copyright by the Board of Trustees of Michigan
3  State University (c) Copyright 2017.
4 
5  You may use this software under the terms of the GNU public license
6  (GPL). The terms of this license are described at:
7 
8  http://www.gnu.org/licenses/gpl.txt
9 
10  Authors:
11  Aaron Chester
12  FRIB
13  Michigan State University
14  East Lansing, MI 48824-1321
15 */
16 
24 #ifndef DDASDECODER_H
25 #define DDASDECODER_H
26 
27 #include <string>
28 #include <vector>
29 
30 class URL;
31 class CRingItem;
32 class CDataSource;
33 
34 namespace ddastoys {
35  class DDASFitHit;
36 }
37 
38 class TraceViewProcessor;
39 
53 {
54 public:
56  DDASDecoder();
58  ~DDASDecoder();
59 
64  void createDataSource(std::string src);
70  std::vector<ddastoys::DDASFitHit> getEvent();
79  int skip(int nevts);
84  int getEventCount() { return m_count; };
89  int getEventIndex() { return m_count-1; };
95  std::string getFilePath();
96 
97 private:
98  URL* m_pSourceURL;
99  CDataSource* m_pSource;
100  TraceViewProcessor* m_pProcessor;
101  int m_count;
102 
108  CRingItem* getNextPhysicsEvent();
113  void processRingItem(CRingItem& item);
114 };
115 
116 
117 #endif
An interactive event processor integrated in the traceview GUI.
Definition: DDASDecoder.h:53
std::string getFilePath()
Return the path of the file data source.
Definition: DDASDecoder.cpp:136
int getEventIndex()
Return the PHYSICS_EVENT index.
Definition: DDASDecoder.h:89
int skip(int nevts)
Skip events in the currently loaded data file.
Definition: DDASDecoder.cpp:119
DDASDecoder()
Constructor.
Definition: DDASDecoder.cpp:52
std::vector< ddastoys::DDASFitHit > getEvent()
Get the next unpacked PHYSICS_EVENT.
Definition: DDASDecoder.cpp:94
void createDataSource(std::string src)
Create a file data source from the input string.
Definition: DDASDecoder.cpp:68
int getEventCount()
Return the number of PHYSCIS_EVENTs.
Definition: DDASDecoder.h:84
~DDASDecoder()
Destructor.
Definition: DDASDecoder.cpp:59
A basic ring item processor.
Definition: TraceViewProcessor.h:57