Project
Loading...
Searching...
No Matches
CalibInfoReaderSpec.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
13
14#ifndef O2_TOF_CALIBINFOREADER
15#define O2_TOF_CALIBINFOREADER
16
17#include "TFile.h"
18
20#include "Framework/Task.h"
23#include <string>
24
25class TTree;
26
27using namespace o2::framework;
28
29namespace o2
30{
31namespace tof
32{
33
34class CalibInfoReader : public Task
35{
36 public:
37 CalibInfoReader(int instance, int ninstances, const char* filename, bool toftpc = false) : mInstance(instance), mNinstances(ninstances), mFileName(filename), mTOFTPC(toftpc) {}
38 ~CalibInfoReader() override = default;
39 void init(InitContext& ic) final;
40 void run(ProcessingContext& pc) final;
41
42 private:
43 int mState = 0;
44 int mInstance;
45 int mNinstances;
46 std::string mFileName{};
47 FILE* mFile = nullptr;
48 TTree* mTree = nullptr;
49 bool mTOFTPC = false;
50 int mCurrentEntry = 0;
51 int mGlobalEntry = 0;
52 std::vector<o2::dataformats::CalibInfoTOF> mVect, *mPvect = &mVect;
53 o2::tof::Diagnostic mDia, *mPdia = &mDia;
54 std::vector<std::pair<int, unsigned long>> mIndices;
55};
56
59framework::DataProcessorSpec getCalibInfoReaderSpec(int instance, int ninstances, const char* filename, bool toftpc = false);
60
61} // namespace tof
62} // namespace o2
63
64#endif /* O2_TOF_CALIBINFOREADER */
Class to store the output of the matching to TOF for calibration.
Definition of the TOF cluster.
~CalibInfoReader() override=default
void run(ProcessingContext &pc) final
CalibInfoReader(int instance, int ninstances, const char *filename, bool toftpc=false)
void init(InitContext &ic) final
Diagnostic class for TOF.
Definition Diagnostic.h:32
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
framework::DataProcessorSpec getCalibInfoReaderSpec(int instance, int ninstances, const char *filename, bool toftpc=false)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string filename()