~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to src/output/OutputCppRoot/OutputCppRoot.hh

  • 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:
40
40
 *  OutputCppRoot writes the data structure out as a ROOT tree
41
41
 */
42
42
 
43
 
class OutputCppRoot : public OutputBase<std::string> {
 
43
class OutputCppRoot : public OutputBase {
44
44
 public:
45
45
  /** OutputCppRoot constructor - initialise to NULL
46
46
   */
92
92
   *  put one Event type per TTree in MAUS, open() required to change the name
93
93
   *  of _outfile).
94
94
   */
95
 
  template <class ConverterT, class DataT>
96
 
  bool write_event(MAUSEvent<DataT>* data_cpp,
97
 
                   const Json::Value& data_json,
98
 
                   std::string branch_name);
99
 
 
100
 
  event_type get_event_type(const Json::Value& data_json);
 
95
  template <class TEMP>
 
96
  bool write_event(PyObject* py_data);
101
97
 
102
98
  std::string file_name(int run_number);
103
99
 
104
100
  std::string dir_name(int run_number);
105
101
 
 
102
  std::string get_branch_name(Data* data_cpp) {return "data";}
 
103
  std::string get_branch_name(JobHeaderData* data_cpp) {return "job_header";}
 
104
  std::string get_branch_name(RunHeaderData* data_cpp) {return "run_header";}
 
105
  std::string get_branch_name(JobFooterData* data_cpp) {return "job_footer";}
 
106
  std::string get_branch_name(RunFooterData* data_cpp) {return "run_footer";}
 
107
 
106
108
  template <class DataT>
107
 
  void check_file_exists(DataT data_cpp);
 
109
  void check_file_exists(DataT* data_cpp);
108
110
 
109
111
  template <class DataT>
110
112
  int run_number(DataT* data_cpp);
111
113
 
112
 
  bool _save(std::string json_document);
 
114
  bool _save(PyObject* data);
113
115
 
114
116
  orstream* _outfile;
115
117