~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to src/reduce/ReduceCppGlobalPID/ReduceCppGlobalPID.hh

merging in changes in merge branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
#include "json/json.h"
35
35
 
 
36
#include "src/common_cpp/DataStructure/Data.hh"
36
37
#include "src/common_cpp/DataStructure/Spill.hh"
37
38
#include "src/common_cpp/Recon/Global/PIDBase.hh"
38
39
#include "src/common_cpp/Recon/Global/PIDBase1D.hh"
40
41
#include "src/common_cpp/Recon/Global/PIDVarA.hh"
41
42
#include "src/common_cpp/Recon/Global/PIDVarB.hh"
42
43
#include "src/common_cpp/Recon/Global/PIDVarC.hh"
 
44
#include "src/common_cpp/Recon/Global/PIDVarD.hh"
 
45
#include "src/common_cpp/Recon/Global/PIDVarE.hh"
 
46
#include "src/common_cpp/Recon/Global/PIDVarF.hh"
 
47
#include "src/common_cpp/Recon/Global/PIDVarG.hh"
 
48
#include "src/common_cpp/Recon/Global/PIDVarH.hh"
 
49
 
 
50
#include "src/common_cpp/API/ReduceBase.hh"
 
51
#include "src/common_cpp/API/PyWrapReduceBase.hh"
43
52
 
44
53
 
45
54
namespace MAUS {
46
55
 
47
 
  class ReduceCppGlobalPID {
 
56
class Data;
 
57
class ImageData;
 
58
 
 
59
class ReduceCppGlobalPID : public ReduceBase<Data, Data> {
48
60
 
49
61
  public:
 
62
    ReduceCppGlobalPID() : ReduceBase<Data, Data>("ReduceCppGlobalPID"), _configCheck(false) {}
 
63
  ~ReduceCppGlobalPID();
 
64
 
 
65
  private:
50
66
 
51
67
    /** @brief Sets up the worker
52
68
     *
53
69
     *  @param argJsonConfigDocument a JSON document with
54
70
     *         the configuration.
55
71
     */
56
 
    bool birth(std::string argJsonConfigDocument);
 
72
    void _birth(const std::string& argJsonConfigDocument);
57
73
 
58
74
    /** @brief Shutdowns the worker
59
75
     *
60
76
     *  This takes no arguments.
61
77
     */
62
 
    bool death();
 
78
    void _death();
63
79
 
64
80
    /** @brief process JSON document
65
81
     *
68
84
     *  @param document Receive a document with spill data
69
85
     *  
70
86
     */
71
 
    std::string process(std::string document);
 
87
    void _process(MAUS::Data* data);
72
88
 
73
 
  private:
74
89
    /// Check that a valid configuration is passed to the process
75
90
    bool _configCheck;
76
91
 
77
 
    /// This will contain the root value after parsing
78
 
    Json::Value _root;
79
 
 
80
92
    /// Mapper name, useful for tracking results...
81
93
    std::string _classname;
82
94
 
90
102
    std::vector<MAUS::recon::global::PIDBase*> _pid_vars;
91
103
 
92
104
    // The current spill
93
 
    Spill* _spill;
94
 
  };
 
105
    const MAUS::Spill* _spill;
 
106
};
95
107
 
96
108
} // ~namespace MAUS
97
109