Project
Loading...
Searching...
No Matches
AO2DConverter.cxx
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
14
21#include "TRDBase/Geometry.h"
25
26#include <memory>
27
28using namespace o2::event_visualisation;
29using namespace o2::framework;
30using namespace o2::dataformats;
31using namespace o2::globaltracking;
32using namespace o2::tpc;
33using namespace o2::trd;
34
36
38 o2::framework::Configurable<std::string> jsonPath{"jsons-folder", "./json", "name of the folder to store json files"};
39
40 static constexpr float mWorkflowVersion = 1.00;
45
47 std::shared_ptr<EveWorkflowHelper> mHelper;
48
50 {
51 LOGF(info, "------------------------ AO2DConverter::init version ", mWorkflowVersion, " ------------------------------------");
52
53 mData.init();
54 mHelper = std::make_shared<EveWorkflowHelper>();
55 }
56
58 {
59 for (auto const& track : barrelTracks) {
60 mHelper->drawAODBarrel(track, collision.collisionTime());
61 }
62
63 for (auto const& track : mftTracks) {
64 mHelper->drawAODMFT(track, collision.collisionTime());
65 }
66
67 for (auto const& track : fwdTracks) {
68 mHelper->drawAODFwd(track, collision.collisionTime());
69 }
70
71 mHelper->mEvent.setClMask(GlobalTrackID::MASK_NONE.to_ulong());
72 mHelper->mEvent.setTrkMask(GlobalTrackID::MASK_ALL.to_ulong());
73 mHelper->mEvent.setRunNumber(mRunNumber);
74 mHelper->mEvent.setTfCounter(mTfCounter);
75 mHelper->mEvent.setFirstTForbit(mTfOrbit);
76 mHelper->mEvent.setCreationTime(collision.collisionTime());
77
78 mHelper->save(jsonPath, ".root", -1);
79 mHelper->clear();
80 }
81};
82
84{
85 return WorkflowSpec{
86 adaptAnalysisTask<AO2DConverter>(cfgc, TaskName{"o2-aodconverter"}),
87 };
88}
WorkflowSpec defineDataProcessing(ConfigContext const &cfgc)
This function hooks up the the workflow specifications into the DPL driver.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
Definition of the MCH ROFrame record.
Definition of the Names Generator class.
Definition of the MCH track.
Helper class to obtain TPC clusters / digits / labels from DPL.
static constexpr mask_t MASK_ALL
static constexpr mask_t MASK_NONE
Collisions::iterator Collision
Definition of a container to keep/associate and arbitrary number of labels associated to an index wit...
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
Global TPC definitions and constants.
Definition SimTraits.h:167
o2::header::DataHeader::TForbitType mTfOrbit
o2::framework::DataProcessingHeader::CreationTime mCreationTime
void init(o2::framework::InitContext &ic)
o2::header::DataHeader::RunNumberType mRunNumber
o2::header::DataHeader::TFCounterType mTfCounter
DetectorData mData
void process(o2::aod::Collision const &collision, EveWorkflowHelper::AODBarrelTracks const &barrelTracks, EveWorkflowHelper::AODForwardTracks const &fwdTracks, EveWorkflowHelper::AODMFTTracks const &mftTracks)
o2::framework::Configurable< std::string > jsonPath
static constexpr float mWorkflowVersion
std::shared_ptr< EveWorkflowHelper > mHelper
Struct to differentiate task names from possible task string arguments.