Project
Loading...
Searching...
No Matches
TestbeamAnalysis.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#ifndef ALICEO2_FOCAL_TESTBEAMANALYSIS_H
12#define ALICEO2_FOCAL_TESTBEAMANALYSIS_H
13
14#include <memory>
15#include <string>
16#include <string_view>
17#include <TFile.h>
20
21namespace o2::focal
22{
23
25{
26 public:
27 TestbeamAnalysis() = default;
28 virtual ~TestbeamAnalysis() = default;
29
30 void run();
31 void setInputFile(const std::string_view inputfile) { mInputFilename = inputfile.data(); }
32 void setVerbose(bool doVerbose) { mVerbose = doVerbose; }
33
34 protected:
35 virtual void init() {}
36 virtual void process(const Event& event) {}
37 virtual void terminate() {}
38
39 int getCurrentEventNumber() const { return mCurrentEventNumber; }
40
41 private:
42 std::unique_ptr<EventReader> mEventReader;
43 std::unique_ptr<TFile> mCurrentFile;
44 std::string mInputFilename;
45 int mCurrentEventNumber = 0;
46 bool mVerbose = false;
47
48 ClassDefNV(TestbeamAnalysis, 1);
49};
50
51} // namespace o2::focal
52#endif // ALICEO2_FOCAL_TESTBEAMANALYSIS_H
void setVerbose(bool doVerbose)
void setInputFile(const std::string_view inputfile)
virtual void process(const Event &event)
virtual ~TestbeamAnalysis()=default
struct _cl_event * event
Definition glcorearb.h:2982