![]() |
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 "ZDCReconstruction/CTFCoder.h"#include "DataFormatsZDC/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 ZDCCTFIO |
| #define | BOOST_TEST_MAIN |
| #define | BOOST_TEST_DYN_LINK |
Functions | |
| sw | Start () |
| for (int irof=0;irof< 1000;irof++) | |
| pedsdata | resize (norbits) |
| coder | setANSVersion (ansVersion) |
| coder | encode (vec, bcdata, chandata, pedsdata) |
| sw | Stop () |
| LOG (info)<< "Compressed in "<< sw.CpuTime()<< " s" | |
| TFile | flOut ("test_ctf_zdc.root", "recreate") |
| TTree | ctfTree (std::string(o2::base::NameConf::CTFTREENAME).c_str(), "O2 CTF tree") |
| ctfImage | print () |
| ctfImage | appendToTree (ctfTree, "ZDC") |
| ctfTree | Write () |
| vec | clear () |
| TFile | flIn ("test_ctf_zdc.root") |
| std::unique_ptr< TTree > | tree ((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str())) |
| BOOST_CHECK (tree) | |
| coder | decode (ctfImage, bcdataD, chandataD, pedsdataD) |
Variables | |
| std::vector< o2::ctf::ANSHeader > | ANSVersions {o2::ctf::ANSVersionCompat, o2::ctf::ANSVersion1} |
| std::vector< ChannelData > | chandata |
| std::vector< OrbitData > | pedsdata |
| TStopwatch | sw |
| o2::InteractionRecord | ir (0, 0) |
| std::array< float, NTimeBinsPerBC > | chanVals |
| const auto & | irFirst = bcdata.front().ir |
| const auto | irLast = bcdata.back().ir |
| o2::InteractionRecord | irPed (o2::constants::lhc::LHCMaxBunches - 1, irFirst.orbit) |
| int | norbits = irLast.orbit - irFirst.orbit + 1 |
| std::vector< o2::ctf::BufferType > | vec |
| auto * | ctfImage = o2::zdc::CTF::get(vec.data()) |
| std::vector< BCData > | bcdataD |
| std::vector< ChannelData > | chandataD |
| std::vector< OrbitData > | pedsdataD |
| #define BOOST_TEST_DYN_LINK |
Definition at line 14 of file test_ctf_io_zdc.cxx.
| #define BOOST_TEST_MAIN |
Definition at line 13 of file test_ctf_io_zdc.cxx.
| #define BOOST_TEST_MODULE Test ZDCCTFIO |
Definition at line 12 of file test_ctf_io_zdc.cxx.
| BOOST_CHECK | ( | tree | ) |
| vec clear | ( | ) |
| TTree ctfTree | ( | std::string(o2::base::NameConf::CTFTREENAME).c_str() | , |
| "O2 CTF tree" | |||
| ) |
| TFile flIn | ( | "test_ctf_zdc.root" | ) |
| TFile flOut | ( | "test_ctf_zdc.root" | , |
| "recreate" | |||
| ) |
| for | ( | ) |
Definition at line 53 of file test_ctf_io_zdc.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 35 of file test_ctf_io_zdc.cxx.
| std::vector<BCData> bcdataD |
Definition at line 124 of file test_ctf_io_zdc.cxx.
| std::vector<ChannelData> chandata |
Definition at line 40 of file test_ctf_io_zdc.cxx.
| std::vector<ChannelData> chandataD |
Definition at line 125 of file test_ctf_io_zdc.cxx.
| std::array<float, NTimeBinsPerBC> chanVals |
Definition at line 50 of file test_ctf_io_zdc.cxx.
| const auto ctfImage = o2::zdc::CTF::get(vec.data()) |
Definition at line 102 of file test_ctf_io_zdc.cxx.
| o2::InteractionRecord ir(0, 0) | ( | 0 | , |
| 0 | |||
| ) |
| const auto& irFirst = bcdata.front().ir |
Definition at line 76 of file test_ctf_io_zdc.cxx.
| const auto irLast = bcdata.back().ir |
Definition at line 76 of file test_ctf_io_zdc.cxx.
| o2::InteractionRecord irPed(o2::constants::lhc::LHCMaxBunches - 1, irFirst.orbit) | ( | o2::constants::lhc::LHCMaxBunches - | 1, |
| irFirst. | orbit | ||
| ) |
| int norbits = irLast.orbit - irFirst.orbit + 1 |
Definition at line 78 of file test_ctf_io_zdc.cxx.
| std::vector<OrbitData> pedsdata |
Definition at line 41 of file test_ctf_io_zdc.cxx.
| std::vector<OrbitData> pedsdataD |
Definition at line 126 of file test_ctf_io_zdc.cxx.
| TStopwatch sw |
Definition at line 47 of file test_ctf_io_zdc.cxx.
| std::vector<o2::ctf::BufferType> vec |
Definition at line 90 of file test_ctf_io_zdc.cxx.