Project
Loading...
Searching...
No Matches
LocalRootFileService.cxx
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.
12#include "Framework/Logger.h"
13
14#include <cstdio>
15#include <cstdarg>
16#include <string>
17#include <climits>
18#include <cassert>
19
20namespace o2
21{
22namespace framework
23{
24
25// All we do is to printout
26std::shared_ptr<TFile> LocalRootFileService::open(const char* format, ...)
27{
28 char buffer[PATH_MAX];
29 va_list arglist;
30 va_start(arglist, format);
31 vsnprintf(buffer, PATH_MAX, format, arglist);
32 va_end(arglist);
33 return std::make_shared<TFile>(buffer, "recreate");
34}
35
36std::string LocalRootFileService::format(const char* format, ...)
37{
38 char buffer[PATH_MAX];
39 va_list arglist;
40 va_start(arglist, format);
41 vsnprintf(buffer, PATH_MAX, format, arglist);
42 va_end(arglist);
43 return std::move(std::string(buffer));
44}
45
46} // namespace framework
47} // namespace o2
std::shared_ptr< TFile > open(const char *fmt,...) final
std::string format(const char *fmt,...) final
GLuint buffer
Definition glcorearb.h:655
GLint GLint GLsizei GLint GLenum format
Definition glcorearb.h:275
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...