Project
Loading...
Searching...
No Matches
TRDEventDisplayFeedSpec.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#include <gsl/span>
13#include <nlohmann/json.hpp>
14
15#include "TRDBase/Geometry.h"
17
18#include "Framework/Task.h"
20
25
26using json = nlohmann::json;
27
28namespace o2
29{
30namespace trd
31{
32
34{
35 public:
36 TRDEventDisplayFeedSpec(int nEventsMax) : mNeventsMax(nEventsMax){};
37 ~TRDEventDisplayFeedSpec() override = default;
38 void init(o2::framework::InitContext& ic) override;
39 void run(o2::framework::ProcessingContext& pc) override;
40 json getTracksJson(gsl::span<const TrackTRD> tracks, gsl::span<const Tracklet64> tracklets, gsl::span<const TrackTriggerRecord> trackTrigRecs, int iEvent);
41 json getTrackletsJson(gsl::span<const Tracklet64> tracklets, int iEvent);
42 void writeDigits(gsl::span<const Digit> digits, int iEvent);
43
44 private:
45 TrackletTransformer mTransformer;
47
48 std::map<std::string, std::string> mTrackletMap;
49 std::bitset<constants::MAXCHAMBER> mUsedDetectors;
50 gsl::span<const TriggerRecord> mTrigRecs;
51
52 float mBz;
53 int mNeventsMax;
54};
55
57
58} // end namespace trd
59} // end namespace o2
Wrapper container for different reconstructed object types.
nlohmann::json json
~TRDEventDisplayFeedSpec() override=default
json getTrackletsJson(gsl::span< const Tracklet64 > tracklets, int iEvent)
json getTracksJson(gsl::span< const TrackTRD > tracks, gsl::span< const Tracklet64 > tracklets, gsl::span< const TrackTriggerRecord > trackTrigRecs, int iEvent)
void run(o2::framework::ProcessingContext &pc) override
void init(o2::framework::InitContext &ic) override
o2::framework::DataProcessorSpec getTRDEventDisplayFeedSpec(int nEventsMax)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
void writeDigits()
std::vector< Digit > digits
std::vector< Tracklet64 > tracklets