Project
Loading...
Searching...
No Matches
test_cmv-trigger.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
15
16#include <vector>
17#include <string>
20#include "Framework/Task.h"
22#include "Framework/Logger.h"
26#include "Headers/DataHeader.h"
29
30using namespace o2::framework;
31
32void customize(std::vector<ConfigParamSpec>&) {}
33
35
36namespace o2::tpc
37{
38
40{
41 public:
43 {
44 const auto tf = processing_helpers::getCurrentTF(pc);
45
46 for (auto& ref : o2::framework::InputRecordWalker(pc.inputs(), mFilter)) {
47 auto const* hdr = o2::framework::DataRefUtils::getHeader<o2::header::DataHeader*>(ref);
48 const uint32_t firstCRU = hdr->subSpecification >> 7;
49 const bool triggered = pc.inputs().get<bool>(ref);
50 if (triggered) {
51 LOGP(info, "TF {:6} first CRU {:3}: {}", tf, firstCRU, "triggered");
52 }
53 }
54 }
55
60
61 private:
62 const std::vector<o2::framework::InputSpec> mFilter = {
64};
65
67{
68 std::vector<o2::framework::InputSpec> inputSpecs;
70
72 "tpc-cmv-trigger",
73 inputSpecs,
74 {},
75 o2::framework::AlgorithmSpec{o2::framework::adaptFromTask<CMVTriggerDevice>()}};
76}
77
78} // namespace o2::tpc
79
81{
82 WorkflowSpec workflow;
83 workflow.emplace_back(o2::tpc::getCMVTriggerSpec());
84 return workflow;
85}
TPCZSHDR * hdr
A helper class to iteratate over all parts of all input routes.
TPC device for processing CMVs on FLPs.
A helper class to iteratate over all parts of all input routes.
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void run(o2::framework::ProcessingContext &pc) final
static constexpr header::DataDescription getDataDescriptionCMVTrigger()
Data description for the per-CRU per-TF trigger flag (empty span = not triggered or disabled; {1} = t...
GLint ref
Definition glcorearb.h:291
constexpr o2::header::DataOrigin gDataOriginTPC
Definition DataHeader.h:576
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
std::vector< DataProcessorSpec > WorkflowSpec
@ Me
Only quit this data processor.
uint32_t getCurrentTF(o2::framework::ProcessingContext &pc)
Global TPC definitions and constants.
Definition SimTraits.h:168
o2::framework::DataProcessorSpec getCMVTriggerSpec()
std::unique_ptr< GPUReconstructionTimeframe > tf
void customize(std::vector< ConfigParamSpec > &)
WorkflowSpec defineDataProcessing(ConfigContext const &config)
This function hooks up the the workflow specifications into the DPL driver.