15#ifndef ALICEO2_FILEFETCHER_H_
16#define ALICEO2_FILEFETCHER_H_
19#include <unordered_map>
54 const std::string& selRegex =
"",
55 const std::string& remRegex =
"",
56 const std::string& copyCmd =
"",
57 const std::string& copyDir =
"/tmp");
75 size_t getNFiles()
const {
return mInputFiles.size(); }
82 size_t nextInQueue()
const;
83 void processInput(
const std::string& input);
84 void processInput(
const std::vector<std::string>& input);
85 void processDirectory(
const std::string&
name);
86 bool addInputFile(
const std::string& fname);
87 std::string createCopyName(
const std::string& fname)
const;
88 bool copyFile(
size_t id);
89 bool isRemote(
const std::string& fname)
const;
94 std::string mCopyDirName{
"/tmp"};
95 std::string mCopyCmdLogFile{};
96 std::string mCopyCmd{};
97 std::unique_ptr<std::regex> mSelRegex;
98 std::unique_ptr<std::regex> mRemRegex;
99 std::unordered_map<std::string, size_t> mCopied{};
100 std::vector<FileRef> mInputFiles{};
102 size_t mMaxInQueue{5};
103 bool mRunning =
false;
104 bool mNoRemoteCopy =
false;
105 bool mFailure =
false;
106 size_t mMaxLoops = 0;
108 size_t mNFilesProc = 0;
109 size_t mNFilesProcOK = 0;
110 float mFailThreshold = 0.f;
111 mutable std::mutex mMtx;
113 std::thread mFetcherThread{};
115 ClassDefNV(FileFetcher, 1);
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
const auto & getFileRef(size_t i) const
size_t getNRemoteFiles() const
void discardFile(const std::string &fname)
size_t getNFilesProc() const
void setMaxLoops(size_t v)
size_t getQueueSize() const
float getFailThreshold() const
size_t getMaxFilesInQueue() const
void setFailThreshold(float f)
size_t popFromQueue(bool discard=false)
std::string getNextFileInQueue() const
void setMaxFilesInQueue(size_t s)
size_t getNFilesProcOK() const
GLuint const GLchar * name
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Common utility functions.
const auto & getOrigName() const
const auto & getLocalName() const