Project
Loading...
Searching...
No Matches
CompressedInspectorTask.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
16
17#ifndef O2_TOF_COMPRESSEDINSPECTORTASK
18#define O2_TOF_COMPRESSEDINSPECTORTASK
19
21#include "Framework/Task.h"
24#include <fstream>
25
26class TFile;
27class TH1;
28class TH2;
29
30using namespace o2::framework;
31
32namespace o2
33{
34namespace tof
35{
36
37using namespace compressed;
38
39template <typename RDH>
40class CompressedInspectorTask : public DecoderBaseT<RDH>, public Task
41{
42 public:
44 ~CompressedInspectorTask() override = default;
45 void init(InitContext& ic) final;
46 void run(ProcessingContext& pc) final;
47
48 private:
50 void rdhHandler(const RDH* rdh) override{};
51
52 void headerHandler(const CrateHeader_t* crateHeader, const CrateOrbit_t* crateOrbit) override;
53
54 void frameHandler(const CrateHeader_t* crateHeader, const CrateOrbit_t* crateOrbit,
55 const FrameHeader_t* frameHeader, const PackedHit_t* packedHits) override;
56
57 void trailerHandler(const CrateHeader_t* crateHeader, const CrateOrbit_t* crateOrbit,
58 const CrateTrailer_t* crateTrailer, const Diagnostic_t* diagnostics,
59 const Error_t* errors) override;
60
61 bool mStatus = false;
62 TFile* mFile = nullptr;
63 std::map<std::string, TH1*> mHistos1D;
64 std::map<std::string, TH1*> mHistos2D;
65};
66
67} // namespace tof
68} // namespace o2
69
70#endif /* O2_TOF_COMPRESSEDINSPECTORTASK */
~CompressedInspectorTask() override=default
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...