Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Df250EmulatorAlgorithm_v3.h
Go to the documentation of this file.
1 #ifndef _Df250EmulatorAlgorithm_v3_
2 #define _Df250EmulatorAlgorithm_v3_
3 #include <JANA/JObject.h>
4 
5 #include <stdint.h>
6 #include <vector>
7 #include <iostream>
8 using namespace std;
9 
11 
12 /////////////////////////////////////////////////////////////////
13 // This implements the base class for the f250 firmware emulation
14 // EmulateFirmware needs to be virtually overwritten by the user
15 ////////////////////////////////////////////////////////////////
16 
18  public:
19 
20  Df250EmulatorAlgorithm_v3(JEventLoop *loop);
22 
23  //Only the emulation routines need to be overwritten
24  void EmulateFirmware(const Df250WindowRawData* rawData,
25  std::vector<Df250PulseData*> &pdatt_objs);
26 
28  std::vector<Df250PulseTime*> &pt_objs,
29  std::vector<Df250PulsePedestal*> &pp_objs,
30  std::vector<Df250PulseIntegral*> &pi_objs) {
31  throw JException("Invalid data format being called for Df250EmulatorAlgorithm_v3!");
32  }
33 
34 
35  protected:
37  // Enables forced use of default values
38  int FORCE_DEFAULT;
39  // Default values for the essential parameters
40  uint32_t NSA_DEF;
41  uint32_t NSB_DEF;
42  uint16_t THR_DEF;
43  uint32_t NPED_DEF;
44  uint32_t MAXPED_DEF;
45  uint16_t NSAT_DEF;
46  // Set verbosity
47  int VERBOSE;
48 
49 };
50 
51 #endif // _Df250EmulatorAlgorithm_v3_
void EmulateFirmware(const Df250WindowRawData *wrd, std::vector< Df250PulseTime * > &pt_objs, std::vector< Df250PulsePedestal * > &pp_objs, std::vector< Df250PulseIntegral * > &pi_objs)