Skip to content

Commit d1cdffd

Browse files
authored
Merge pull request #21 from awegrzyn/configuration-1
Remove convertConfigurationNodeToPTree
2 parents e4d9bbd + ca117b1 commit d1cdffd

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

src/ReadoutUtils.cxx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
#include "RAWDataHeader.h"
66

77

8-
#include <Configuration/Visitor.h>
9-
#include <Configuration/Tree.h>
10-
118
// function to convert a string to a 64-bit integer value
129
// allowing usual "base units" in suffix (k,M,G,T)
1310
// input can be decimal (1.5M is valid, will give 1.5*1024*1024)
@@ -61,23 +58,6 @@ std::string ReadoutUtils::NumberOfBytesToString(double value,const char*suffix)
6158
return std::string(bufStr);
6259
}
6360

64-
void convertConfigurationNodeToPTree(const o2::configuration::tree::Node& node, boost::property_tree::ptree &pt, std::string basePath="", const char separator='.')
65-
{
66-
o2::configuration::visitor::apply(node,
67-
[&](const o2::configuration::tree::Branch& branch) {
68-
if (basePath.length()!=0) {basePath+=separator;}
69-
for (const auto& keyValuePair : branch) {
70-
convertConfigurationNodeToPTree(keyValuePair.second, pt, basePath+keyValuePair.first);
71-
}
72-
},
73-
[&](const o2::configuration::tree::Leaf& leaf) {
74-
std::string value= o2::configuration::tree::convert<std::string>(leaf);
75-
pt.put(basePath,value);
76-
}
77-
);
78-
}
79-
80-
8161
void dumpRDH(o2::Header::RAWDataHeader *rdh) {
8262
printf("RDH:\tversion=%d\theader size=%d\tblock length=%d\n",(int)rdh->version,(int)rdh->headerSize,(int)rdh->blockLength);
8363
printf("\tTRG orbit=%d bc=%d\n",(int)rdh->triggerOrbit,(int)rdh->triggerBC);

src/ReadoutUtils.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
#include <string>
55

6-
#include <Configuration/Visitor.h>
7-
#include <Configuration/Tree.h>
86
#include <Common/Configuration.h>
97

108
#include "RAWDataHeader.h"
@@ -20,14 +18,6 @@ long long getNumberOfBytesFromString(const char * inputString);
2018
// suffix is the "base unit" to add after calculated prefix, e.g. Byte-> kBytes
2119
std::string NumberOfBytesToString(double value,const char*suffix);
2220

23-
// Function to convert a O2 Configuration Node object to a boost property tree
24-
// The input configuration Node (which is a tree structure) is visited and destination property tree filled recursively.
25-
// node: input O2 Configuration node object
26-
// pt: destination property_tree object where to copy input configuration structure
27-
// basePath: where to store top node of input configuration structure in destination property tree
28-
// separator: separator character for destination property tree elements
29-
void convertConfigurationNodeToPTree(const o2::configuration::tree::Node& node, boost::property_tree::ptree &pt, std::string basePath="", const char separator='.');
30-
3121
}
3222

3323

0 commit comments

Comments
 (0)