![]() |
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 "FT0Reconstruction/CTFCoder.h"
#include "FT0Base/FT0DigParam.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 FT0CTFIO |
#define | BOOST_TEST_MAIN |
#define | BOOST_TEST_DYN_LINK |
Functions | |
sw | Start () |
for (int idig=0;idig< 1000;idig++) | |
LOG (info)<< "Generated "<< channels.size()<< " channels in "<< digits.size()<< " digits "<< sw.CpuTime()<< " s" | |
coder | setANSVersion (ansVersion) |
coder | encode (vec, digits, channels) |
sw | Stop () |
TFile | flOut ("test_ctf_ft0.root", "recreate") |
TTree | ctfTree (std::string(o2::base::NameConf::CTFTREENAME).c_str(), "O2 CTF tree") |
ctfImage | print () |
ctfImage | appendToTree (ctfTree, "FT0") |
ctfTree | Write () |
vec | clear () |
TFile | flIn ("test_ctf_ft0.root") |
std::unique_ptr< TTree > | tree ((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str())) |
BOOST_CHECK (tree) | |
coder | decode (ctfImage, digitsD, channelsD) |
BOOST_CHECK (digitsD.size()==digits.size()) | |
BOOST_CHECK (channelsD.size()==channels.size()) | |
for (int i=digits.size();i--;) | |
Variables | |
std::vector< o2::ctf::ANSHeader > | ANSVersions {o2::ctf::ANSVersionCompat, o2::ctf::ANSVersion1} |
std::vector< ChannelData > | channels |
TStopwatch | sw |
o2::InteractionRecord | ir (0, 0) |
int | trg_gate = FT0DigParam::Instance().mTime_trg_gate |
constexpr int | MAXChan = 4 * (Geometry::NCellsA + Geometry::NCellsC) |
std::vector< o2::ctf::BufferType > | vec |
auto * | ctfImage = o2::ft0::CTF::get(vec.data()) |
std::vector< Digit > | digitsD |
std::vector< ChannelData > | channelsD |
#define BOOST_TEST_DYN_LINK |
Definition at line 14 of file test_ctf_io_ft0.cxx.
#define BOOST_TEST_MAIN |
Definition at line 13 of file test_ctf_io_ft0.cxx.
#define BOOST_TEST_MODULE Test FT0CTFIO |
Definition at line 12 of file test_ctf_io_ft0.cxx.
BOOST_CHECK | ( | channelsD. | size() = =channels.size() | ) |
BOOST_CHECK | ( | digitsD. | size() = =digits.size() | ) |
BOOST_CHECK | ( | tree | ) |
vec clear | ( | ) |
TTree ctfTree | ( | std::string(o2::base::NameConf::CTFTREENAME).c_str() | , |
"O2 CTF tree" | |||
) |
TFile flIn | ( | "test_ctf_ft0.root" | ) |
TFile flOut | ( | "test_ctf_ft0.root" | , |
"recreate" | |||
) |
for | ( | int | i = digits.size(); i--; | ) |
Definition at line 146 of file test_ctf_io_ft0.cxx.
for | ( | ) |
Definition at line 46 of file test_ctf_io_ft0.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 34 of file test_ctf_io_ft0.cxx.
std::vector<ChannelData> channels |
Definition at line 39 of file test_ctf_io_ft0.cxx.
std::vector<ChannelData> channelsD |
Definition at line 131 of file test_ctf_io_ft0.cxx.
const auto ctfImage = o2::ft0::CTF::get(vec.data()) |
Definition at line 110 of file test_ctf_io_ft0.cxx.
std::vector<Digit> digitsD |
Definition at line 130 of file test_ctf_io_ft0.cxx.
o2::InteractionRecord ir(0, 0) | ( | 0 | , |
0 | |||
) |
|
constexpr |
Definition at line 45 of file test_ctf_io_ft0.cxx.
TStopwatch sw |
Definition at line 40 of file test_ctf_io_ft0.cxx.
int trg_gate = FT0DigParam::Instance().mTime_trg_gate |
Definition at line 44 of file test_ctf_io_ft0.cxx.
std::vector<o2::ctf::BufferType> vec |
Definition at line 96 of file test_ctf_io_ft0.cxx.