Project
Loading...
Searching...
No Matches
CalibClusReaderSpec.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_CALIBCLUSREADER
15#define O2_TOF_CALIBCLUSREADER
16
17#include "TFile.h"
18#include "TTree.h"
19
23#include "Framework/Task.h"
26
27using namespace o2::framework;
28
29namespace o2
30{
31namespace tof
32{
33
34class CalibClusReader : public Task
35{
36 public:
37 CalibClusReader(bool isCosmics) : mIsCosmics(isCosmics) {}
38 ~CalibClusReader() override = default;
39 void init(InitContext& ic) final;
40 void run(ProcessingContext& pc) final;
41
42 private:
43 void connectTree(const std::string& filename);
44 std::unique_ptr<TFile> mFile = nullptr;
45 std::unique_ptr<TTree> mTree = nullptr;
46 int mState = 0;
47 int mCurrentEntry = 0;
48 bool mIsCosmics = false;
49 std::vector<CalibInfoCluster> mClusInfos, *mPclusInfos = &mClusInfos;
50 std::vector<CosmicInfo> mCosmicInfo, *mPcosmicInfo = &mCosmicInfo;
51 std::vector<o2::tof::CalibInfoTrackCl> mCosmicTrack, *mPcosmicTrack = &mCosmicTrack;
52 std::vector<int> mCosmicTrackSize, *mPcosmicTrackSize = &mCosmicTrackSize;
53};
54
58
59} // namespace tof
60} // namespace o2
61
62#endif /* O2_TOF_CALIBCLUSREADER */
Info from cosmic.
~CalibClusReader() override=default
void init(InitContext &ic) final
void run(ProcessingContext &pc) final
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
DataProcessorSpec getCalibClusReaderSpec(bool isCosmics)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string filename()