Project
Loading...
Searching...
No Matches
O2DPLDisplay.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
15
16#ifndef ALICE_O2_EVENTVISUALISATION_WORKFLOW_O2DPLDISPLAY_H
17#define ALICE_O2_EVENTVISUALISATION_WORKFLOW_O2DPLDISPLAY_H
18
26#include "Framework/Task.h"
27#include <memory>
28
30
31namespace o2::trd
32{
33class GeometryFlat;
34}
35
36namespace o2::globaltracking
37{
38struct DataRequest;
39}
40
41namespace o2::itsmft
42{
43class TopologyDictionary;
44}
45
47{
48class TPCFastTransform;
49
51{
52 public:
53 static constexpr auto allowedTracks =
54 "ITS,TPC,MFT,MCH,MID,ITS-TPC,TPC-TRD,ITS-TPC-TOF,ITS-TPC-TRD,ITS-TPC-TRD-TOF,MCH-MID,MFT-MCH,MFT-MCH-MID,PHS,EMC,HMP";
55 static constexpr auto allowedClusters = "ITS,TPC,TRD,TOF,MFT,MCH,MID,PHS,EMC,HMP";
56
59 std::shared_ptr<o2::globaltracking::DataRequest> dataRequest,
60 std::shared_ptr<o2::base::GRPGeomRequest> gr,
61 std::shared_ptr<o2::emcal::CalibLoader> emcCalibLoader,
62 const std::string& jsonPath, const std::string& ext,
63 std::chrono::milliseconds timeInterval,
64 bool eveHostNameMatch,
65 const std::string& receiverHostname,
66 int receiverPort,
67 int receiverTimeout,
68 bool useOnlyFiles,
69 bool useOnlySockets)
70 : mDisableWrite(disableWrite),
71 mUseMC(useMC),
72 mTrkMask(trkMask),
73 mClMask(clMask),
74 mDataRequest(dataRequest),
75 mGGCCDBRequest(gr),
76 mEMCALCalibLoader(emcCalibLoader),
77 mJsonPath(jsonPath),
78 mExt(ext),
79 mTimeInterval(timeInterval),
80 mEveHostNameMatch(eveHostNameMatch),
81 mRunType(o2::parameters::GRPECS::NONE),
82 mReceiverHostname(receiverHostname),
83 mReceiverPort(receiverPort),
84 mReceiverTimeout(receiverTimeout),
85 mUseOnlyFiles(useOnlyFiles),
86 mUseOnlySockets(useOnlySockets)
87 {
88 this->mTimeStamp = std::chrono::high_resolution_clock::now() - timeInterval; // first run meets condition
89 }
90
91 ~O2DPLDisplaySpec() override = default;
92 void init(o2::framework::InitContext& ic) final;
95 void finaliseCCDB(o2::framework::ConcreteDataMatcher& matcher, void* obj) final;
96
97 private:
98 void updateTimeDependentParams(o2::framework::ProcessingContext& pc);
99
100 bool mDisableWrite = false; // skip writing result (for testing performance)
101 bool mUseMC = false;
102 bool mEveHostNameMatch; // empty or correct hostname
103 std::string mJsonPath; // folder where files are stored
104 std::string mExt; // extension of created files (".json" or ".root")
105 std::chrono::milliseconds mTimeInterval; // minimal interval between files in milliseconds
106 bool mPrimaryVertexTriggers;
107 // instead of drawing vertices with tracks (and maybe calorimeter triggers), draw vertices with calorimeter triggers (and maybe tracks)
108 int mEventCounter = 0;
109 std::chrono::time_point<std::chrono::high_resolution_clock> mTimeStamp;
110
113 DetectorData mData;
115 std::shared_ptr<o2::globaltracking::DataRequest> mDataRequest;
116 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
117 std::shared_ptr<o2::emcal::CalibLoader> mEMCALCalibLoader;
118 std::unique_ptr<o2::emcal::CellRecalibrator> mEMCALCalibrator;
119 o2::tpc::VDriftHelper mTPCVDriftHelper{};
120
121 std::string mReceiverHostname;
122 int mReceiverPort;
123 int mReceiverTimeout;
124 bool mUseOnlyFiles;
125 bool mUseOnlySockets;
126};
127} // namespace o2::event_visualisation
128
129#endif
Wrapper container for different reconstructed object types.
Helper for geometry and GRP related CCDB requests.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
Helper class to extract VDrift from different sources.
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
void run(o2::framework::ProcessingContext &pc) final
void init(o2::framework::InitContext &ic) final
O2DPLDisplaySpec(bool disableWrite, bool useMC, o2::dataformats::GlobalTrackID::mask_t trkMask, o2::dataformats::GlobalTrackID::mask_t clMask, std::shared_ptr< o2::globaltracking::DataRequest > dataRequest, std::shared_ptr< o2::base::GRPGeomRequest > gr, std::shared_ptr< o2::emcal::CalibLoader > emcCalibLoader, const std::string &jsonPath, const std::string &ext, std::chrono::milliseconds timeInterval, bool eveHostNameMatch, const std::string &receiverHostname, int receiverPort, int receiverTimeout, bool useOnlyFiles, bool useOnlySockets)
@ NONE
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...