NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Files Functions Variables Macros Pages
DDASBuiltUnpacker.h
1 
2 #ifndef DAQ_DDAS_DDASBUILTUNPACKER_H
3 #define DAQ_DDAS_DDASBUILTUNPACKER_H
4 
5 #include <config.h>
6 #include "FragmentIndex.h"
7 #include "DDASHit.h"
8 
9 #include <EventProcessor.h>
10 #include <TranslatorPointer.h>
11 #include <TCLAnalyzer.h>
12 
13 #include <set>
14 #include <memory>
15 #include <cstdint>
16 
17 namespace DAQ {
18  namespace DDAS {
19 
20  // Forward declare the parameter mapper
21  class CParameterMapper;
22 
52  class CDDASBuiltUnpacker : public CEventProcessor
53  {
54 
55  private:
56  std::set<uint32_t> m_sourceIds;
57  std::vector<DDASHit> m_channelList;
58  CParameterMapper* m_pParameterMapper;
59 
60  public:
61 
68  CDDASBuiltUnpacker(const std::set<uint32_t>& validSourceIds,
69  CParameterMapper& rParameterMapper);
70 
73 
74  // Setters and getters
75 
79  void setValidSourceIds(const std::set<uint32_t>& validSourceIds);
80 
82  std::set<uint32_t> getValidSourceIds() const;
83 
97  void setParameterMapper(CParameterMapper& rParameterMapper);
98 
101 
126  virtual Bool_t operator()(const Address_t pEvent,
127  CEvent& rEvent,
128  CAnalyzer& rAnalyzer,
129  CBufferDecoder& rDecoder);
130 
131  // Utility methods
132  protected:
133  void setEventSize(const Address_t pEvent, CBufferDecoder& rDecoder,
134  CAnalyzer& rAnalyzer);
135 
136  Bool_t selectivelyParseData(uint16_t* p16);
137 
138  Bool_t parseAndStoreFragment(FragmentInfo& fragInfo);
139  };
140 
141  } // end DDAS namespace
142 } // end DAQ namespace
143 
144 #endif
145 
146 
147 
148 
149 
150