Project
Loading...
Searching...
No Matches
DataSourceOnline.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
15
16#ifndef O2EVE_DATASOURCEONLINE_H
17#define O2EVE_DATASOURCEONLINE_H
18
22#include <string>
23#include <vector>
24
25class TObject;
26
27namespace o2
28{
29namespace event_visualisation
30{
31
33{
34 protected:
35 static std::vector<std::string> sourceFilextensions;
42
43 protected:
44 std::string mFileTime;
45
46 public:
47 DataSourceOnline(const std::vector<std::string>& path);
48
49 ~DataSourceOnline() override = default;
51
53 void operator=(DataSourceOnline const&) = delete;
54
55 int getEventCount() override;
56 void setCurrentEvent(Int_t currentEvent) override;
57 Int_t getCurrentEvent() override;
58
59 bool refresh() override; // recompute
60
61 std::vector<std::pair<VisualisationEvent, EVisualisationGroup>> getVisualisationList(int no, float minTime, float maxTime, float range) override;
62 void rollToNext() override { mFileWatcher.rollToNext(); };
63 void changeDataFolder(const std::vector<std::string>& newFolders) override { mFileWatcher.changeFolder(newFolders); };
64 void saveCurrentEvent(std::string targetFolder) override { mFileWatcher.saveCurrentFileToFolder(targetFolder); };
65 int getRunNumber() const override { return this->mRunNumber; }
66 void setRunNumber(int runNumber) override { this->mRunNumber = runNumber; }
68 void setRunType(parameters::GRPECS::RunType runType) override { this->mRunType = runType; }
69 std::string getEventName() override { return mFileWatcher.currentItem(); };
70 std::string getEventAbsoluteFilePath() override { return mFileWatcher.currentFilePath(); };
71 int getFirstTForbit() const override { return this->mFirstTForbit; }
72 void setFirstTForbit(int firstTForbit) override { this->mFirstTForbit = firstTForbit; }
73 std::string getFileTime() const override { return this->mFileTime; }
74 void setFileTime(std::string fileTime) override { this->mFileTime = fileTime; }
75 int getTrackMask() const override { return this->mTrackMask; }
76 void setTrackMask(int trackMask) override { this->mTrackMask = trackMask; }
77 int getClusterMask() const override { return this->mClusterMask; }
78 void setClusterMask(int clusterMask) override { this->mClusterMask = clusterMask; }
80};
81
82} // namespace event_visualisation
83} // namespace o2
84
85#endif // O2EVE_DATASOURCEONLINE_H
Abstract base class for Detector-specific reading from file(s)
Observing folder for created and removed files - preserving current.
parameters::GRPECS::RunType getRunType() override
DataSourceOnline(DataSourceOnline const &)=delete
void setTrackMask(int trackMask) override
void setFileTime(std::string fileTime) override
void operator=(DataSourceOnline const &)=delete
Deleted assigment operator.
std::string getFileTime() const override
static std::vector< std::string > sourceFilextensions
void setRunType(parameters::GRPECS::RunType runType) override
o2::parameters::GRPECS::RunType mRunType
o2::detectors::DetID::mask_t getDetectorsMask() override
void saveCurrentEvent(std::string targetFolder) override
void setCurrentEvent(Int_t currentEvent) override
void setClusterMask(int clusterMask) override
void setRunNumber(int runNumber) override
void changeDataFolder(const std::vector< std::string > &newFolders) override
std::vector< std::pair< VisualisationEvent, EVisualisationGroup > > getVisualisationList(int no, float minTime, float maxTime, float range) override
void setFirstTForbit(int firstTForbit) override
std::string currentFilePath() const
name of the file (with path) but guards replaced with file names
void saveCurrentFileToFolder(const std::string &destinationFolder)
copies
void rollToNext()
round robin next item
std::string currentItem() const
name of the file (without path) but guards replaced with file names
void changeFolder(const std::string &path)
switch to observe other folder
GLenum GLint * range
Definition glcorearb.h:1899
GLsizei const GLchar *const * path
Definition glcorearb.h:3591
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...