![]() |
Project
|
#include <cassert>
#include <boost/test/unit_test.hpp>
#include <boost/test/data/test_case.hpp>
#include <boost/test/data/dataset.hpp>
#include "DataFormatsITSMFT/CompCluster.h"
#include "DataFormatsITSMFT/CTF.h"
#include "DataFormatsITSMFT/ROFRecord.h"
#include "CommonUtils/NameConf.h"
#include "ITSMFTReconstruction/CTFCoder.h"
#include "ITSMFTReconstruction/LookUp.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 ITSMFTCTFIO |
#define | BOOST_TEST_MAIN |
#define | BOOST_TEST_DYN_LINK |
Functions | |
sw | Start () |
for (int irof=0;irof< 100;irof++) | |
sw | Stop () |
LOG (info)<< "Generated "<< cclusVec.size()<< " in "<< rofRecVec.size()<< " ROFs in "<< sw.CpuTime()<< " s" | |
coder | setANSVersion (ansVersion) |
coder | encode (vec, rofRecVec, cclusVec, pattVec, pattIdConverter, 0) |
TFile | flOut ("test_ctf_itsmft.root", "recreate") |
TTree | ctfTree (std::string(o2::base::NameConf::CTFTREENAME).c_str(), "O2 CTF tree") |
ctfImage | print () |
ctfImage | appendToTree (ctfTree, "ITS") |
ctfTree | Write () |
vec | clear () |
TFile | flIn ("test_ctf_itsmft.root") |
std::unique_ptr< TTree > | tree ((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str())) |
BOOST_CHECK (tree) | |
coder | decode (ctfImage, rofRecVecD, cclusVecD, pattVecD, nullptr, clPattLookup) |
BOOST_CHECK (rofRecVecD.size()==rofRecVec.size()) | |
BOOST_CHECK (cclusVecD.size()==cclusVec.size()) | |
BOOST_CHECK (pattVecD.size()==pattVec.size()) | |
Variables | |
std::vector< o2::ctf::ANSHeader > | ANSVersions {o2::ctf::ANSVersionCompat, o2::ctf::ANSVersion1} |
std::vector< CompClusterExt > | cclusVec |
std::vector< unsigned char > | pattVec |
LookUp | pattIdConverter |
TStopwatch | sw |
std::vector< int > | row |
std::vector< int > | col |
std::vector< o2::ctf::BufferType > | vec |
auto * | ctfImage = o2::itsmft::CTF::get(vec.data()) |
std::vector< ROFRecord > | rofRecVecD |
std::vector< CompClusterExt > | cclusVecD |
std::vector< unsigned char > | pattVecD |
LookUp | clPattLookup |
int | di = rofRecVec.size() / 10 ? rofRecVec.size() / 10 : 1 |
int | npatt = ctfImage.getHeader().nPatternBytes |
#define BOOST_TEST_DYN_LINK |
Definition at line 14 of file test_ctf_io_itsmft.cxx.
#define BOOST_TEST_MAIN |
Definition at line 13 of file test_ctf_io_itsmft.cxx.
#define BOOST_TEST_MODULE Test ITSMFTCTFIO |
Definition at line 12 of file test_ctf_io_itsmft.cxx.
BOOST_CHECK | ( | cclusVecD. | size() = =cclusVec.size() | ) |
BOOST_CHECK | ( | pattVecD. | size() = =pattVec.size() | ) |
BOOST_CHECK | ( | rofRecVecD. | size() = =rofRecVec.size() | ) |
BOOST_CHECK | ( | tree | ) |
vec clear | ( | ) |
TTree ctfTree | ( | std::string(o2::base::NameConf::CTFTREENAME).c_str() | , |
"O2 CTF tree" | |||
) |
coder decode | ( | ctfImage | , |
rofRecVecD | , | ||
cclusVecD | , | ||
pattVecD | , | ||
nullptr | , | ||
clPattLookup | |||
) |
coder encode | ( | vec | , |
rofRecVec | , | ||
cclusVec | , | ||
pattVec | , | ||
pattIdConverter | , | ||
0 | |||
) |
TFile flIn | ( | "test_ctf_itsmft.root" | ) |
TFile flOut | ( | "test_ctf_itsmft.root" | , |
"recreate" | |||
) |
for | ( | ) |
Definition at line 49 of file test_ctf_io_itsmft.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_itsmft.cxx.
std::vector<CompClusterExt> cclusVec |
Definition at line 43 of file test_ctf_io_itsmft.cxx.
std::vector<CompClusterExt> cclusVecD |
Definition at line 117 of file test_ctf_io_itsmft.cxx.
LookUp clPattLookup |
Definition at line 119 of file test_ctf_io_itsmft.cxx.
std::vector<int> col |
Definition at line 48 of file test_ctf_io_itsmft.cxx.
const auto ctfImage = o2::itsmft::CTF::get(vec.data()) |
Definition at line 96 of file test_ctf_io_itsmft.cxx.
int di = rofRecVec.size() / 10 ? rofRecVec.size() / 10 : 1 |
Definition at line 134 of file test_ctf_io_itsmft.cxx.
int npatt = ctfImage.getHeader().nPatternBytes |
Definition at line 150 of file test_ctf_io_itsmft.cxx.
LookUp pattIdConverter |
Definition at line 45 of file test_ctf_io_itsmft.cxx.
std::vector<unsigned char> pattVec |
Definition at line 44 of file test_ctf_io_itsmft.cxx.
std::vector<unsigned char> pattVecD |
Definition at line 118 of file test_ctf_io_itsmft.cxx.
std::vector<ROFRecord> rofRecVecD |
Definition at line 116 of file test_ctf_io_itsmft.cxx.
std::vector<int> row |
Definition at line 48 of file test_ctf_io_itsmft.cxx.
TStopwatch sw |
Definition at line 46 of file test_ctf_io_itsmft.cxx.
std::vector<o2::ctf::BufferType> vec |
Definition at line 82 of file test_ctf_io_itsmft.cxx.