21#include <fairlogger/Logger.h>
35 const std::string o2Root(std::getenv(
"O2_ROOT"));
36 const std::string
file = o2Root +
"/share/Detectors/TPC/files/laserTrackData.txt";
39 std::ifstream infile(
file, std::ifstream::in);
41 if (!infile.is_open()) {
42 LOG(error) <<
"Could not open laser track file " <<
file;
46 while (std::getline(infile, line)) {
47 std::stringstream streamLine(line);
48 streamLine >>
id >>
x >>
alpha >> p0 >>
p1 >>
p2 >> p3 >> p4;
59 const auto& tracks =
c.getLaserTracks();
60 std::vector<LaserTrack> vtracks;
62 for (
const auto& track : tracks) {
63 vtracks.emplace_back(track);
66 std::unique_ptr<TFile> fout(TFile::Open(fileName.data(),
"recreate"));
67 TTree t(
"laserTracks",
"Laser Tracks");
68 t.Branch(
"tracks", &vtracks);
constexpr int p1()
constexpr to accelerate the coordinates changing
void loadTracksFromFile()
load laser tracks from file
static void dumpToTree(const std::string_view fileName)
dump tracks to a tree for simple visualization
GLfloat GLfloat GLfloat alpha
Global TPC definitions and constants.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"