~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to src/map/MapCppTrackerDigits/MapCppTrackerDigits.cc

  • Committer: Christopher Hunt
  • Date: 2015-06-18 14:48:59 UTC
  • mfrom: (697.69.1 merge)
  • mto: (697.69.2 merge_hunt)
  • mto: This revision was merged to the branch mainline in revision 708.
  • Revision ID: christopher.hunt08@imperial.ac.uk-20150618144859-rki5ma1lv8722w41
Merged in latest trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
}
31
31
 
32
32
MapCppTrackerDigits::MapCppTrackerDigits()
33
 
    : MapBase<Data>("MapCppTrackerDigits") {}
 
33
    : MapBase<Data>("MapCppTrackerDigits"), real(0) {
 
34
}
34
35
 
35
36
MapCppTrackerDigits::~MapCppTrackerDigits() {
 
37
  if (real) delete real;
36
38
}
37
39
 
38
40
void MapCppTrackerDigits::_birth(const std::string& argJsonConfigDocument) {
 
41
  real = new RealDataDigitization();
 
42
  real->initialise();
39
43
}
40
44
 
41
 
void MapCppTrackerDigits::_death() {
42
 
}
 
45
void MapCppTrackerDigits::_death() {}
43
46
 
44
47
void MapCppTrackerDigits::_process(Data* data) const {
45
 
  Json::Value& json_root = *(ConverterFactory().convert<Data, Json::Value>(data));
46
 
  if ( json_root.isMember("daq_data") && !(json_root["daq_data"].isNull()) ) {
47
 
    // Get daq data.
48
 
    Json::Value daq = json_root.get("daq_data", 0);
49
 
    // Fill spill object with
50
 
    RealDataDigitization real;
51
 
    real.initialise();
52
 
    real.process(data->GetSpill(), daq);
53
 
  }
54
 
  delete &json_root;
 
48
//   RealDataDigitization real;
 
49
//   real.initialise();
 
50
  Spill *spill = data->GetSpill();
 
51
  real->process(spill);
55
52
}
 
53
 
56
54
} // ~namespace MAUS
 
55