Project
Loading...
Searching...
No Matches
NameConf.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
12#ifndef ALICEO2_NAME_GENERATOR_H_
13#define ALICEO2_NAME_GENERATOR_H_
14
17#include <string_view>
18
21namespace o2
22{
23namespace base
24{
25
26// Class for standardization of the names for output files and trees
28{
29 public:
30 // Filename of collision context
31 static std::string getCollisionContextFileName(const std::string_view prefix = "");
32
33 // Filename of general run parameters (GRP)
34 static std::string getGRPFileName(const std::string_view prefix = STANDARDSIMPREFIX);
35
36 // Filename of general run parameters from ECS (GRPECS)
37 static std::string getGRPECSFileName(const std::string_view prefix = STANDARDSIMPREFIX);
38
39 // Filename of general run parameters from LHCIF (GRPLHCIF)
40 static std::string getGRPLHCIFFileName(const std::string_view prefix = STANDARDSIMPREFIX);
41
42 // Filename of general run parameters fof B field (GRPMagField)
43 static std::string getGRPMagFieldFileName(const std::string_view prefix = STANDARDSIMPREFIX);
44
45 // Filename to store kinematics + TrackRefs
46 static std::string getMCKinematicsFileName(const std::string_view prefix = STANDARDSIMPREFIX)
47 {
48 return o2::utils::Str::concat_string(prefix, "_", KINE_STRING, ".root");
49 }
50
51 // Filename to store kinematics + TrackRefs
52 static std::string getMCHeadersFileName(const std::string_view prefix = STANDARDSIMPREFIX)
53 {
54 return o2::utils::Str::concat_string(prefix, "_", MCHEADER_STRING, ".root");
55 }
56
57 // Filename to store final MC configuration file
58 static std::string getMCConfigFileName(const std::string_view prefix = STANDARDSIMPREFIX)
59 {
60 return o2::utils::Str::concat_string(prefix, "_", CONFIG_STRING, ".ini");
61 }
62
63 // Filename for TFIDInfo vector
64 static std::string getTFIDInfoFileName(const std::string_view prefix = "o2");
65
66 static constexpr std::string_view CCDBOBJECT = "ccdb_object"; // hardcoded
67 static constexpr std::string_view CCDBMETA = "ccdb_meta"; // hardcoded
68 static constexpr std::string_view CCDBQUERY = "ccdb_query"; // hardcoded
69 static constexpr std::string_view CCDBRunTag = "runNumber";
70 static constexpr std::string_view CCDBDefaultEntry = "default";
71
72 // Filename to store geometry file
73 static std::string getGeomFileName(const std::string_view prefix = "");
74 static std::string getAlignedGeomFileName(const std::string_view prefix = "");
75
76 // Filename to store material LUT file
77 static std::string getMatLUTFileName(const std::string_view prefix = "");
78
79 // Filename to store summary about simulation processes and cut values
80 static std::string getCutProcFileName(const std::string_view prefix = "");
81
82 // TGeometry object name
83 static constexpr std::string_view GEOMOBJECTNAME_FAIR = "FAIRGeom"; // hardcoded
84
85 // public standard TTree key (for MC ) -- not a function
86 static constexpr std::string_view MCTTREENAME = "o2sim"; // hardcoded
87
88 // standard name for digitization configuration output
89 static constexpr std::string_view DIGITIZATIONCONFIGFILE = "o2simdigitizerworkflow_configuration.ini";
90
91 // public standard CTF dictionary
92 static constexpr std::string_view CTFDICT = "ctf_dictionary"; // hardcoded
93
94 // CTF tree name
95 static constexpr std::string_view CTFTREENAME = "ctf"; // hardcoded
96
97 // CTF Filename
98 static std::string getCTFFileName(uint32_t run, uint32_t orb, uint32_t id, const std::string& host, const std::string_view prefix = "o2_ctf");
99
100 // CTF Dictionary
101 static std::string getCTFDictFileName();
102
103 // Default CCDB server
104 static std::string getCCDBServer();
105
106 protected:
107 // helper method to build filenames
108 static std::string buildFileName(const std::string_view prefix, const std::string_view delimiter, const std::string_view defPrefix, const std::string_view defName,
109 const std::string_view extension, const std::string_view optDir = "");
110
111 // unmodifiable constants used to construct filenames etc
112 static constexpr std::string_view STANDARDSIMPREFIX = "o2sim";
113 static constexpr std::string_view HITS_STRING = "Hits"; // hardcoded
114 static constexpr std::string_view DIGITS_STRING = "Digits"; // hardcoded
115 static constexpr std::string_view GRP_STRING = "grp"; // hardcoded
116 static constexpr std::string_view GRPECS_STRING = "grpecs"; // hardcoded
117 static constexpr std::string_view GRPLHCIF_STRING = "grplhcif"; // hardcoded
118 static constexpr std::string_view GRPMAGFIELD_STRING = "grpMagField"; // hardcoded
119 static constexpr std::string_view KINE_STRING = "Kine"; // hardcoded
120 static constexpr std::string_view MCHEADER_STRING = "MCHeader"; // hardcoded
121 static constexpr std::string_view GEOM_FILE_STRING = "geometry";
122 static constexpr std::string_view ALIGNEDGEOM_FILE_STRING = "geometry-aligned";
123 static constexpr std::string_view CUT_FILE_STRING = "proc-cut";
124 static constexpr std::string_view CONFIG_STRING = "configuration";
125 static constexpr std::string_view ROOT_EXT_STRING = "root";
126 static constexpr std::string_view DAT_EXT_STRING = "dat";
127 static constexpr std::string_view ALPIDECLUSDICTFILENAME = "dictionary";
128 static constexpr std::string_view NOISEFILENAME = "NoiseMap";
129 static constexpr std::string_view MATBUDLUT = "matbud";
130 static constexpr std::string_view COLLISIONCONTEXT = "collisioncontext";
131 static constexpr std::string_view ALIGNPATH = "Calib/Align";
132 static constexpr std::string_view TFIDINFO = "tfidinfo";
133
134 // these are configurable paths for some commonly used files
135 std::string mDirGRP = "none"; // directory for GRP file ("none" == "")
136 std::string mDirGRPECS = "none"; // directory for GRPECS file ("none" == "")
137 std::string mDirGRPLHCIF = "none"; // directory for GRPLHCIF file ("none" == "")
138 std::string mDirGRPMagField = "none"; // directory for GRPMagField file ("none" == "")
139 std::string mDirGeom = "none"; // directory for geometry file
140 std::string mDirMatLUT = "none"; // directory for material LUT
141 std::string mDirCollContext = "none"; // directory for collision context
142 std::string mDirTFIDINFO = "none"; // directory for TFIDInfo vector
143 std::string mCCDBServer = "http://alice-ccdb.cern.ch/"; // default CCDB server
144
145 O2ParamDef(NameConf, "NameConf");
146};
147
148} // namespace base
149} // namespace o2
150
151#endif
static constexpr std::string_view NOISEFILENAME
Definition NameConf.h:128
static std::string getAlignedGeomFileName(const std::string_view prefix="")
Definition NameConf.cxx:46
std::string mDirGRPECS
Definition NameConf.h:136
static constexpr std::string_view ALIGNPATH
Definition NameConf.h:131
static constexpr std::string_view GRP_STRING
Definition NameConf.h:115
static constexpr std::string_view MCHEADER_STRING
Definition NameConf.h:120
std::string mDirTFIDINFO
Definition NameConf.h:142
static constexpr std::string_view GRPMAGFIELD_STRING
Definition NameConf.h:118
std::string mDirGRPLHCIF
Definition NameConf.h:137
static std::string getGRPECSFileName(const std::string_view prefix=STANDARDSIMPREFIX)
Definition NameConf.cxx:64
static constexpr std::string_view CCDBQUERY
Definition NameConf.h:68
static constexpr std::string_view ROOT_EXT_STRING
Definition NameConf.h:125
static std::string getGeomFileName(const std::string_view prefix="")
Definition NameConf.cxx:40
static std::string getGRPLHCIFFileName(const std::string_view prefix=STANDARDSIMPREFIX)
Definition NameConf.cxx:70
static std::string getMCKinematicsFileName(const std::string_view prefix=STANDARDSIMPREFIX)
Definition NameConf.h:46
static std::string getCTFFileName(uint32_t run, uint32_t orb, uint32_t id, const std::string &host, const std::string_view prefix="o2_ctf")
Definition NameConf.cxx:93
static constexpr std::string_view DAT_EXT_STRING
Definition NameConf.h:126
static constexpr std::string_view CCDBMETA
Definition NameConf.h:67
static std::string getCutProcFileName(const std::string_view prefix="")
Definition NameConf.cxx:82
static std::string getCTFDictFileName()
Definition NameConf.cxx:98
static constexpr std::string_view CCDBOBJECT
Definition NameConf.h:66
static constexpr std::string_view DIGITS_STRING
Definition NameConf.h:114
static constexpr std::string_view CCDBRunTag
Definition NameConf.h:69
static std::string getGRPFileName(const std::string_view prefix=STANDARDSIMPREFIX)
Definition NameConf.cxx:58
std::string mDirCollContext
Definition NameConf.h:141
static std::string getMCConfigFileName(const std::string_view prefix=STANDARDSIMPREFIX)
Definition NameConf.h:58
std::string mDirGeom
Definition NameConf.h:139
std::string mDirGRP
Definition NameConf.h:135
static constexpr std::string_view KINE_STRING
Definition NameConf.h:119
static std::string getMatLUTFileName(const std::string_view prefix="")
Definition NameConf.cxx:88
static constexpr std::string_view DIGITIZATIONCONFIGFILE
Definition NameConf.h:89
static std::string buildFileName(const std::string_view prefix, const std::string_view delimiter, const std::string_view defPrefix, const std::string_view defName, const std::string_view extension, const std::string_view optDir="")
Definition NameConf.cxx:20
static constexpr std::string_view CONFIG_STRING
Definition NameConf.h:124
static constexpr std::string_view CCDBDefaultEntry
Definition NameConf.h:70
static constexpr std::string_view GRPLHCIF_STRING
Definition NameConf.h:117
static constexpr std::string_view GEOMOBJECTNAME_FAIR
Definition NameConf.h:83
static constexpr std::string_view ALIGNEDGEOM_FILE_STRING
Definition NameConf.h:122
static std::string getMCHeadersFileName(const std::string_view prefix=STANDARDSIMPREFIX)
Definition NameConf.h:52
static std::string getCollisionContextFileName(const std::string_view prefix="")
Definition NameConf.cxx:52
static constexpr std::string_view CUT_FILE_STRING
Definition NameConf.h:123
static constexpr std::string_view ALPIDECLUSDICTFILENAME
Definition NameConf.h:127
static constexpr std::string_view MCTTREENAME
Definition NameConf.h:86
static constexpr std::string_view STANDARDSIMPREFIX
Definition NameConf.h:112
static constexpr std::string_view COLLISIONCONTEXT
Definition NameConf.h:130
static constexpr std::string_view HITS_STRING
Definition NameConf.h:113
static constexpr std::string_view MATBUDLUT
Definition NameConf.h:129
static constexpr std::string_view GRPECS_STRING
Definition NameConf.h:116
std::string mDirMatLUT
Definition NameConf.h:140
O2ParamDef(NameConf, "NameConf")
static std::string getTFIDInfoFileName(const std::string_view prefix="o2")
Definition NameConf.cxx:104
static std::string getCCDBServer()
Definition NameConf.cxx:110
std::string mDirGRPMagField
Definition NameConf.h:138
std::string mCCDBServer
Definition NameConf.h:143
static std::string getGRPMagFieldFileName(const std::string_view prefix=STANDARDSIMPREFIX)
Definition NameConf.cxx:76
static constexpr std::string_view GEOM_FILE_STRING
Definition NameConf.h:121
static constexpr std::string_view CTFDICT
Definition NameConf.h:92
static constexpr std::string_view TFIDINFO
Definition NameConf.h:132
static constexpr std::string_view CTFTREENAME
Definition NameConf.h:95
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static std::string concat_string(Ts const &... ts)