![]() |
Project
|
#include <cassert>#include <boost/test/unit_test.hpp>#include <boost/test/data/test_case.hpp>#include <boost/test/data/dataset.hpp>#include "CommonUtils/NameConf.h"#include "CommonUtils/IRFrameSelector.h"#include "MIDCTF/CTFCoder.h"#include "DataFormatsMID/CTF.h"#include "Framework/Logger.h"#include <TFile.h>#include <TRandom.h>#include <TStopwatch.h>#include <TSystem.h>#include <cstring>Go to the source code of this file.
Macros | |
| #define | BOOST_TEST_MODULE Test MIDCTFIO |
| #define | BOOST_TEST_MAIN |
| #define | BOOST_TEST_DYN_LINK |
Functions | |
| gSystem | Load ("libO2DetectorsCommonDataFormats") |
| sw | Start () |
| for (int irof=0;irof< 1000;irof++) | |
| tfData | buildReferences (irSelector) |
| coder | setANSVersion (ansVersion) |
| coder | encode (vec, tfData) |
| sw | Stop () |
| LOG (info)<< "Compressed in "<< sw.CpuTime()<< " s" | |
| TFile | flOut ("test_ctf_mid.root", "recreate") |
| TTree | ctfTree (std::string(o2::base::NameConf::CTFTREENAME).c_str(), "O2 CTF tree") |
| ctfImage | print () |
| ctfImage | appendToTree (ctfTree, "MID") |
| ctfTree | Write () |
| vec | clear () |
| TFile | flIn ("test_ctf_mid.root") |
| std::unique_ptr< TTree > | tree ((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str())) |
| BOOST_CHECK (tree) | |
| coder | decode (ctfImage, rofDataD, colDataD) |
Variables | |
| std::vector< o2::ctf::ANSHeader > | ANSVersions {o2::ctf::ANSVersionCompat, o2::ctf::ANSVersion1} |
| std::array< std::vector< ROFRecord >, NEvTypes > | rofData {} |
| CTFHelper::TFData | tfData |
| TStopwatch | sw |
| o2::InteractionRecord | ir (0, 0) |
| std::array< uint16_t, 5 > | pattern |
| o2::utils::IRFrameSelector | irSelector |
| std::vector< o2::ctf::BufferType > | vec |
| auto * | ctfImage = o2::mid::CTF::get(vec.data()) |
| std::array< std::vector< ColumnData >, NEvTypes > | colDataD {} |
| std::array< std::vector< ROFRecord >, NEvTypes > | rofDataD {} |
| #define BOOST_TEST_DYN_LINK |
Definition at line 14 of file test_ctf_io_mid.cxx.
| #define BOOST_TEST_MAIN |
Definition at line 13 of file test_ctf_io_mid.cxx.
| #define BOOST_TEST_MODULE Test MIDCTFIO |
Definition at line 12 of file test_ctf_io_mid.cxx.
| BOOST_CHECK | ( | tree | ) |
| tfData buildReferences | ( | irSelector | ) |
| vec clear | ( | ) |
| TTree ctfTree | ( | std::string(o2::base::NameConf::CTFTREENAME).c_str() | , |
| "O2 CTF tree" | |||
| ) |
| TFile flIn | ( | "test_ctf_mid.root" | ) |
| TFile flOut | ( | "test_ctf_mid.root" | , |
| "recreate" | |||
| ) |
| for | ( | ) |
Definition at line 52 of file test_ctf_io_mid.cxx.
| gSystem Load | ( | "libO2DetectorsCommonDataFormats" | ) |
| LOG | ( | info | ) |
| ctfImage print | ( | ) |
| coder setANSVersion | ( | ansVersion | ) |
| sw Start | ( | ) |
| sw Stop | ( | ) |
| std::unique_ptr< TTree > tree | ( | (TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str()) | ) |
| ctfTree Write | ( | ) |
|
inline |
Definition at line 36 of file test_ctf_io_mid.cxx.
| std::array<std::vector<ColumnData>, NEvTypes> colDataD {} |
Definition at line 116 of file test_ctf_io_mid.cxx.
| const auto ctfImage = o2::mid::CTF::get(vec.data()) |
Definition at line 94 of file test_ctf_io_mid.cxx.
| o2::InteractionRecord ir(0, 0) | ( | 0 | , |
| 0 | |||
| ) |
| o2::utils::IRFrameSelector irSelector |
Definition at line 78 of file test_ctf_io_mid.cxx.
| std::array<uint16_t, 5> pattern |
Definition at line 51 of file test_ctf_io_mid.cxx.
| std::array<std::vector<ROFRecord>, NEvTypes> rofData {} |
Definition at line 41 of file test_ctf_io_mid.cxx.
| std::array<std::vector<ROFRecord>, NEvTypes> rofDataD {} |
Definition at line 117 of file test_ctf_io_mid.cxx.
| TStopwatch sw |
Definition at line 48 of file test_ctf_io_mid.cxx.
| CTFHelper::TFData tfData |
Definition at line 42 of file test_ctf_io_mid.cxx.
| std::vector<o2::ctf::BufferType> vec |
Definition at line 82 of file test_ctf_io_mid.cxx.