26 oss <<
val.get<
int>();
32 oss << (int)
val.get<int16_t>();
50 oss <<
val.get<
float>();
53 oss <<
val.get<
double>();
56 oss <<
val.get<
const char*>();
59 oss <<
val.get<
bool>();
102 f.template operator()<std::vector<std::string>>();
151 return reinterpret_cast<T*
>(std::memcpy(std::malloc(
size *
sizeof(T)),
values,
size *
sizeof(T)));
159 if (!visitStoredObject(mType, [
this]<
typename T>() {
new (&mStore) T{}; })) {
160 std::memset(&mStore, 0,
sizeof(mStore));
178 if (visitStoredObject(mType, [
this, &
other]<
typename T>() {
new (&mStore) T(*
reinterpret_cast<T const*
>(&
other.mStore)); })) {
184 auto const*
value = *
reinterpret_cast<char const* const*
>(&
other.mStore);
185 *
reinterpret_cast<char**
>(&mStore) =
value !=
nullptr ? strdup(
value) :
nullptr;
189 *
reinterpret_cast<int**
>(&mStore) =
copyBuffer(*
reinterpret_cast<int* const*
>(&
other.mStore), mSize);
192 *
reinterpret_cast<float**
>(&mStore) =
copyBuffer(*
reinterpret_cast<float* const*
>(&
other.mStore), mSize);
195 *
reinterpret_cast<double**
>(&mStore) =
copyBuffer(*
reinterpret_cast<double* const*
>(&
other.mStore), mSize);
198 *
reinterpret_cast<bool**
>(&mStore) =
copyBuffer(*
reinterpret_cast<bool* const*
>(&
other.mStore), mSize);
202 mStore =
other.mStore;
206void Variant::moveStore(Variant&
other)
noexcept
209 if (visitStoredObject(mType, [
this, &
other]<
typename T>() {
new (&mStore)
T(std::move(*
reinterpret_cast<T*
>(&
other.mStore))); })) {
212 mStore =
other.mStore;
214 if (holdsMallocedPointer(mType)) {
215 *
reinterpret_cast<void**
>(&
other.mStore) =
nullptr;
219void Variant::destroyStore() noexcept
222 if (visitStoredObject(mType, [
this]<
typename T>() { std::destroy_at(
reinterpret_cast<T*
>(&mStore)); })) {
226 if (holdsMallocedPointer(mType)) {
227 free(*
reinterpret_cast<void**
>(&mStore));
248 if (
this != &
other) {
251 *
this = std::move(copy);
258 if (
this != &
other) {
267std::pair<std::vector<std::string>, std::vector<std::string>>
extractLabels(boost::property_tree::ptree
const&
tree)
271 auto lrc =
tree.get_child_optional(labels_rows_str);
273 labels_rows = basicVectorFromBranch<std::string>(lrc.value());
275 auto lcc =
tree.get_child_optional(labels_cols_str);
277 labels_cols = basicVectorFromBranch<std::string>(lcc.value());
unsigned short int uint16_t
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 First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
std::vector< std::string > labels_rows
std::vector< std::string > labels_cols
Variant for configuration parameter storage. Owns stored data.
std::string asString() const
Variant & operator=(const Variant &other)
Variant(VariantType type=VariantType::Unknown)
GLsizei const GLfloat * value
GLint GLint GLsizei GLint GLenum GLenum type
GLenum GLsizei GLsizei GLint * values
Defining ITS Vertex explicitly as messageable.
std::ostream & operator<<(std::ostream &s, ChannelType const &type)
Stream operators so that we can use ChannelType with Boost.Test.
std::pair< std::vector< std::string >, std::vector< std::string > > extractLabels(boost::property_tree::ptree const &tree)
size_t copyBuffer(const std::vector< uint64_t > &b64, std::vector< std::byte > &b8, uint64_t prefix=0)
static void write(std::ostream &o, Variant const &v)
VectorOfTObjectPtrs other
std::unique_ptr< TTree > tree((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str()))