![]() |
Project
|
#include <cassert>#include <boost/test/unit_test.hpp>#include <boost/test/data/test_case.hpp>#include <boost/test/data/dataset.hpp>#include "DataFormatsTOF/CTF.h"#include "TOFBase/Geo.h"#include "TOFBase/Digit.h"#include "CommonUtils/NameConf.h"#include "TOFReconstruction/CTFCoder.h"#include "Framework/Logger.h"#include <TFile.h>#include <TRandom.h>#include <TStopwatch.h>#include <cstring>Go to the source code of this file.
Macros | |
| #define | BOOST_TEST_MODULE Test TOFCTFIO |
| #define | BOOST_TEST_MAIN |
| #define | BOOST_TEST_DYN_LINK |
Functions | |
| sw | Start () |
| for (int irof=0;irof< 100;irof++) | |
| sw | Stop () |
| LOG (info)<< "Generated "<< digits.size()<< " in "<< rows.size()<< " ROFs in "<< sw.CpuTime()<< " s" | |
| coder | setANSVersion (ansVersion) |
| coder | encode (vec, rows, digits, pattVec) |
| TFile | flOut ("test_ctf_tof.root", "recreate") |
| TTree | ctfTree (std::string(o2::base::NameConf::CTFTREENAME).c_str(), "O2 CTF tree") |
| ctfImage | print () |
| ctfImage | appendToTree (ctfTree, "TOF") |
| ctfTree | Write () |
| vec | clear () |
| TFile | flIn ("test_ctf_tof.root") |
| std::unique_ptr< TTree > | tree ((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str())) |
| BOOST_CHECK (tree) | |
| coder | decode (ctfImage, rowsD, digitsD, pattVecD) |
| BOOST_CHECK (rows.size()==rowsD.size()) | |
| BOOST_CHECK (digits.size()==digitsD.size()) | |
| BOOST_CHECK (pattVec.size()==pattVecD.size()) | |
Variables | |
| std::vector< o2::ctf::ANSHeader > | ANSVersions {o2::ctf::ANSVersionCompat, o2::ctf::ANSVersion1} |
| std::vector< ReadoutWindowData > | rows |
| std::vector< uint8_t > | pattVec |
| TStopwatch | sw |
| std::vector< int > | row |
| std::vector< int > | col |
| std::vector< o2::ctf::BufferType > | vec |
| auto * | ctfImage = CTF::get(vec.data()) |
| std::vector< Digit > | digitsD |
| std::vector< ReadoutWindowData > | rowsD |
| std::vector< uint8_t > | pattVecD |
| int | npatt = ctfImage.getHeader().nPatternBytes |
| #define BOOST_TEST_DYN_LINK |
Definition at line 14 of file test_ctf_io_tof.cxx.
| #define BOOST_TEST_MAIN |
Definition at line 13 of file test_ctf_io_tof.cxx.
| #define BOOST_TEST_MODULE Test TOFCTFIO |
Definition at line 12 of file test_ctf_io_tof.cxx.
| BOOST_CHECK | ( | digits. | size() = =digitsD.size() | ) |
| BOOST_CHECK | ( | pattVec. | size() = =pattVecD.size() | ) |
| BOOST_CHECK | ( | rows. | size() = =rowsD.size() | ) |
| BOOST_CHECK | ( | tree | ) |
| vec clear | ( | ) |
| TTree ctfTree | ( | std::string(o2::base::NameConf::CTFTREENAME).c_str() | , |
| "O2 CTF tree" | |||
| ) |
| TFile flIn | ( | "test_ctf_tof.root" | ) |
| TFile flOut | ( | "test_ctf_tof.root" | , |
| "recreate" | |||
| ) |
| for | ( | ) |
Definition at line 48 of file test_ctf_io_tof.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 36 of file test_ctf_io_tof.cxx.
| std::vector<int> col |
Definition at line 47 of file test_ctf_io_tof.cxx.
| const auto ctfImage = CTF::get(vec.data()) |
Definition at line 109 of file test_ctf_io_tof.cxx.
| std::vector<Digit> digitsD |
Definition at line 129 of file test_ctf_io_tof.cxx.
| int npatt = ctfImage.getHeader().nPatternBytes |
Definition at line 150 of file test_ctf_io_tof.cxx.
| std::vector<uint8_t> pattVec |
Definition at line 43 of file test_ctf_io_tof.cxx.
| std::vector<uint8_t> pattVecD |
Definition at line 131 of file test_ctf_io_tof.cxx.
| std::vector<int> row |
Definition at line 47 of file test_ctf_io_tof.cxx.
| std::vector<ReadoutWindowData> rows |
Definition at line 42 of file test_ctf_io_tof.cxx.
| std::vector<ReadoutWindowData> rowsD |
Definition at line 130 of file test_ctf_io_tof.cxx.
| TStopwatch sw |
Definition at line 45 of file test_ctf_io_tof.cxx.
| std::vector<o2::ctf::BufferType> vec |
Definition at line 95 of file test_ctf_io_tof.cxx.