![]() |
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 "MCHCTF/CTFCoder.h"#include "DataFormatsMCH/CTF.h"#include "DataFormatsMCH/ROFRecord.h"#include "DataFormatsMCH/Digit.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 MCHCTFIO |
| #define | BOOST_TEST_MAIN |
| #define | BOOST_TEST_DYN_LINK |
Functions | |
| sw | Start () |
| for (int irof=0;irof< 1000;irof++) | |
| coder | setANSVersion (ansVersion) |
| coder | encode (vec, rofs, digs) |
| sw | Stop () |
| LOG (info)<< "Compressed in "<< sw.CpuTime()<< " s" | |
| TFile | flOut ("test_ctf_mch.root", "recreate") |
| TTree | ctfTree (std::string(o2::base::NameConf::CTFTREENAME).c_str(), "O2 CTF tree") |
| ctfImage | print () |
| ctfImage | appendToTree (ctfTree, "MCH") |
| ctfTree | Write () |
| vec | clear () |
| TFile | flIn ("test_ctf_mch.root") |
| std::unique_ptr< TTree > | tree ((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str())) |
| BOOST_CHECK (tree) | |
| coder | decode (ctfImage, rofsD, digsD) |
| BOOST_TEST (rofs==rofsD, boost::test_tools::per_element()) | |
| BOOST_TEST (digs==digsD, boost::test_tools::per_element()) | |
Variables | |
| std::vector< o2::ctf::ANSHeader > | ANSVersions {o2::ctf::ANSVersionCompat, o2::ctf::ANSVersion1} |
| std::vector< Digit > | digs |
| TStopwatch | sw |
| o2::InteractionRecord | ir0 (3, 5) |
| o2::InteractionRecord | ir (ir0) |
| std::vector< o2::ctf::BufferType > | vec |
| auto * | ctfImage = o2::mch::CTF::get(vec.data()) |
| std::vector< ROFRecord > | rofsD |
| std::vector< Digit > | digsD |
| #define BOOST_TEST_DYN_LINK |
Definition at line 14 of file test_ctf_io_mch.cxx.
| #define BOOST_TEST_MAIN |
Definition at line 13 of file test_ctf_io_mch.cxx.
| #define BOOST_TEST_MODULE Test MCHCTFIO |
Definition at line 12 of file test_ctf_io_mch.cxx.
| BOOST_CHECK | ( | tree | ) |
| BOOST_TEST | ( | rofs | = =rofsD, |
| boost::test_tools::per_element() | |||
| ) |
| vec clear | ( | ) |
| TTree ctfTree | ( | std::string(o2::base::NameConf::CTFTREENAME).c_str() | , |
| "O2 CTF tree" | |||
| ) |
| TFile flIn | ( | "test_ctf_mch.root" | ) |
| TFile flOut | ( | "test_ctf_mch.root" | , |
| "recreate" | |||
| ) |
| for | ( | ) |
Definition at line 47 of file test_ctf_io_mch.cxx.
| 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 37 of file test_ctf_io_mch.cxx.
| const auto ctfImage = o2::mch::CTF::get(vec.data()) |
Definition at line 80 of file test_ctf_io_mch.cxx.
| std::vector<Digit> digs |
Definition at line 42 of file test_ctf_io_mch.cxx.
| std::vector<Digit> digsD |
Definition at line 103 of file test_ctf_io_mch.cxx.
| o2::InteractionRecord ir(ir0) | ( | ir0 | ) |
| o2::InteractionRecord ir0(3, 5) | ( | 3 | , |
| 5 | |||
| ) |
| std::vector<ROFRecord> rofsD |
Definition at line 102 of file test_ctf_io_mch.cxx.
| TStopwatch sw |
Definition at line 43 of file test_ctf_io_mch.cxx.
| std::vector<o2::ctf::BufferType> vec |
Definition at line 68 of file test_ctf_io_mch.cxx.