18
#ifndef CPPJSONCONVERTER_H
19
#define CPPJSONCONVERTER_H
18
#ifndef CPPJSONSPILLCONVERTER_H
19
#define CPPJSONSPILLCONVERTER_H
20
20
#include "json/json.h"
22
22
#include "src/common_cpp/Converter/ConverterBase.hh"
23
// #include "src/common_cpp/JsonCppStreamer/ConverterBase.hh"
24
#include "src/common_cpp/DataStructure/Spill.hh"
29
29
* \class JsonCppConverter
38
38
* \author Alexander Richards, Imperial College London
41
class CppJsonConverter : public ConverterBase<Spill, Json::Value> {
41
class CppJsonSpillConverter : public ConverterBase<Data, Json::Value> {
44
: ConverterBase<Spill, Json::Value>("CppJsonConverter") {}
43
CppJsonSpillConverter()
44
: ConverterBase<Data, Json::Value>("CppJsonSpillConverter") {}
48
* \brief Convert Json value
49
* Overloaded process initiate the conversion process converting the
50
* \a Json::Value given as the argument into the output type \a MausData
52
* \param Json::Value& The root \a Json::Value object from the Json data
54
* \return a pointer to the MausData object
56
// Spill* _convert(const Json::Value*) const;
59
48
* \brief Convert MausData
60
49
* Overloaded process initiates the conversion process converting the
61
50
* \a MausData given as the argument into the output type \a Json::Value
63
52
* \param MausData& The root \a MausData object from the cpp data structure
64
53
* \return a pointer to the Json::Value object
55
* Some ugliness results from the fact that the Spill is written as the base
56
* top level in Json, but for reasons of stupidity (Rogers) the Data is
57
* written as the top level in ROOT. To make it worse, Spill doesn't always
58
* hold spill data - as DAQ sometimes spits out start_of_burst or
66
Json::Value* _convert(const Spill*) const;
61
Json::Value* _convert(const Data*) const;