![]()  | 
  
    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 "FDDReconstruction/CTFCoder.h"#include "FDDBase/Constants.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 FDDCTFIO | 
| #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_fdd.root", "recreate") | 
| TTree | ctfTree (std::string(o2::base::NameConf::CTFTREENAME).c_str(), "O2 CTF tree") | 
| ctfImage | print () | 
| ctfImage | appendToTree (ctfTree, "FDD") | 
| ctfTree | Write () | 
| vec | clear () | 
| TFile | flIn ("test_ctf_fdd.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) | 
| std::vector< o2::ctf::BufferType > | vec | 
| auto * | ctfImage = o2::fdd::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_fdd.cxx.
| #define BOOST_TEST_MAIN | 
Definition at line 13 of file test_ctf_io_fdd.cxx.
| #define BOOST_TEST_MODULE Test FDDCTFIO | 
Definition at line 12 of file test_ctf_io_fdd.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_fdd.root" | ) | 
| TFile flOut | ( | "test_ctf_fdd.root" | , | 
| "recreate" | |||
| ) | 
| for | ( | int | i = digits.size(); i--; | ) | 
Definition at line 140 of file test_ctf_io_fdd.cxx.
| for | ( | ) | 
Definition at line 44 of file test_ctf_io_fdd.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_fdd.cxx.
| std::vector<ChannelData> channels | 
Definition at line 39 of file test_ctf_io_fdd.cxx.
| std::vector<ChannelData> channelsD | 
Definition at line 125 of file test_ctf_io_fdd.cxx.
| const auto ctfImage = o2::fdd::CTF::get(vec.data()) | 
Definition at line 104 of file test_ctf_io_fdd.cxx.
| std::vector<Digit> digitsD | 
Definition at line 124 of file test_ctf_io_fdd.cxx.
| o2::InteractionRecord ir(0, 0) | ( | 0 | , | 
| 0 | |||
| ) | 
| TStopwatch sw | 
Definition at line 40 of file test_ctf_io_fdd.cxx.
| std::vector<o2::ctf::BufferType> vec | 
Definition at line 90 of file test_ctf_io_fdd.cxx.