31
31
#include "json/json.h"
32
32
#include "src/common_cpp/Utils/TOFChannelMap.hh"
33
#include "src/common_cpp/API/MapBase.hh"
36
class MapCppTOFSlabHits {
37
class MapCppTOFSlabHits : public MapBase<Json::Value> {
40
43
/** @brief Sets up the worker
42
45
* @param argJsonConfigDocument a JSON document with
43
46
* the configuration.
45
bool birth(std::string argJsonConfigDocument);
48
void _birth(const std::string& argJsonConfigDocument);
47
50
/** @brief Shutdowns the worker
49
52
* This takes no arguments and does nothing.
53
56
/** @brief process JSON document
55
58
* @param document Receive a document with digits and return
56
59
* a document with slab hits.
58
std::string process(std::string document);
61
void _process(Json::Value* document) const;
61
std::string _classname;
63
64
/// Vector to hold the names of all detectors to be processed.
64
65
std::vector<std::string> _stationKeys;
66
Json::Value fillSlabHit(Json::Value xDocDigit0, Json::Value xDocDigit1);
67
Json::Value fillSlabHit(Json::Value xDocDigit0, Json::Value xDocDigit1) const;
68
69
/** @brief makes slab hits
70
71
* @param xDocDetectorData Json document containing digits from
71
72
* one particle event in one individual detector.
73
Json::Value makeSlabHits(Json::Value xDocPartEvent);
74
Json::Value makeSlabHits(Json::Value xDocPartEvent) const;
75
76
double _tdcV1290_conversion_factor;