![]() |
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 "CPVReconstruction/CTFCoder.h"#include "DataFormatsCPV/CTF.h"#include "DataFormatsCPV/Cluster.h"#include "Framework/Logger.h"#include <TFile.h>#include <TRandom.h>#include <TStopwatch.h>#include <TSystem.h>#include <TMath.h>#include <cstring>Go to the source code of this file.
Macros | |
| #define | BOOST_TEST_MODULE Test CPVCTFIO |
| #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, triggers, clusters) |
| sw | Stop () |
| LOG (info)<< "Compressed in "<< sw.CpuTime()<< " s" | |
| TFile | flOut ("test_ctf_cpv.root", "recreate") |
| TTree | ctfTree (std::string(o2::base::NameConf::CTFTREENAME).c_str(), "O2 CTF tree") |
| ctfImage | print () |
| ctfImage | appendToTree (ctfTree, "CPV") |
| ctfTree | Write () |
| vec | clear () |
| TFile | flIn ("test_ctf_cpv.root") |
| std::unique_ptr< TTree > | tree ((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str())) |
| BOOST_CHECK (tree) | |
| coder | decode (ctfImage, triggersD, clustersD) |
| BOOST_CHECK (triggersD.size()==triggers.size()) | |
| BOOST_CHECK (clustersD.size()==clusters.size()) | |
Variables | |
| std::vector< o2::ctf::ANSHeader > | ANSVersions {o2::ctf::ANSVersionCompat, o2::ctf::ANSVersion1} |
| std::vector< Cluster > | clusters |
| TStopwatch | sw |
| o2::InteractionRecord | ir (0, 0) |
| Cluster | clu |
| std::vector< o2::ctf::BufferType > | vec |
| auto * | ctfImage = o2::cpv::CTF::get(vec.data()) |
| std::vector< TriggerRecord > | triggersD |
| std::vector< Cluster > | clustersD |
| #define BOOST_TEST_DYN_LINK |
Definition at line 14 of file test_ctf_io_cpv.cxx.
| #define BOOST_TEST_MAIN |
Definition at line 13 of file test_ctf_io_cpv.cxx.
| #define BOOST_TEST_MODULE Test CPVCTFIO |
Definition at line 12 of file test_ctf_io_cpv.cxx.
| BOOST_CHECK | ( | clustersD. | size() = =clusters.size() | ) |
| BOOST_CHECK | ( | tree | ) |
| BOOST_CHECK | ( | triggersD. | size() = =triggers.size() | ) |
| vec clear | ( | ) |
| TTree ctfTree | ( | std::string(o2::base::NameConf::CTFTREENAME).c_str() | , |
| "O2 CTF tree" | |||
| ) |
| TFile flIn | ( | "test_ctf_cpv.root" | ) |
| TFile flOut | ( | "test_ctf_cpv.root" | , |
| "recreate" | |||
| ) |
| for | ( | ) |
Definition at line 47 of file test_ctf_io_cpv.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_cpv.cxx.
| Cluster clu |
Definition at line 46 of file test_ctf_io_cpv.cxx.
| std::vector<Cluster> clusters |
Definition at line 42 of file test_ctf_io_cpv.cxx.
| std::vector<Cluster> clustersD |
Definition at line 101 of file test_ctf_io_cpv.cxx.
| const auto ctfImage = o2::cpv::CTF::get(vec.data()) |
Definition at line 77 of file test_ctf_io_cpv.cxx.
| o2::InteractionRecord ir(0, 0) | ( | 0 | , |
| 0 | |||
| ) |
| TStopwatch sw |
Definition at line 43 of file test_ctf_io_cpv.cxx.
| std::vector<TriggerRecord> triggersD |
Definition at line 100 of file test_ctf_io_cpv.cxx.
| std::vector<o2::ctf::BufferType> vec |
Definition at line 65 of file test_ctf_io_cpv.cxx.