#include <FPGATrackSimReadRawRandomHitsTool.h>
|
| FPGATrackSimReadRawRandomHitsTool (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~FPGATrackSimReadRawRandomHitsTool ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | readData (FPGATrackSimEventInputHeader *header, bool &last) override |
|
virtual StatusCode | writeData (FPGATrackSimEventInputHeader *header) override |
|
virtual StatusCode | finalize () override |
|
StatusCode | readData (FPGATrackSimEventInputHeader *header, bool &last, bool doReset) |
|
| FPGATrackSimReadRawRandomHitsTool (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~FPGATrackSimReadRawRandomHitsTool ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | readData (FPGATrackSimEventInputHeader *header, bool &last) override |
|
virtual StatusCode | writeData (FPGATrackSimEventInputHeader *header) override |
|
virtual StatusCode | finalize () override |
|
StatusCode | readData (FPGATrackSimEventInputHeader *header, bool &last, bool doReset) |
|
|
StringProperty | m_inpath {this, "InFileName", "httsim_smartwrapper.root", "input path"} |
|
unsigned | m_entry = 0 |
|
unsigned int | m_nEntries = 0U |
|
◆ FPGATrackSimReadRawRandomHitsTool() [1/2]
FPGATrackSimReadRawRandomHitsTool::FPGATrackSimReadRawRandomHitsTool |
( |
const std::string & |
algname, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
ifc |
|
) |
| |
◆ ~FPGATrackSimReadRawRandomHitsTool() [1/2]
virtual FPGATrackSimReadRawRandomHitsTool::~FPGATrackSimReadRawRandomHitsTool |
( |
| ) |
|
|
virtualdefault |
◆ FPGATrackSimReadRawRandomHitsTool() [2/2]
FPGATrackSimReadRawRandomHitsTool::FPGATrackSimReadRawRandomHitsTool |
( |
const std::string & |
, |
|
|
const std::string & |
, |
|
|
const IInterface * |
|
|
) |
| |
◆ ~FPGATrackSimReadRawRandomHitsTool() [2/2]
virtual FPGATrackSimReadRawRandomHitsTool::~FPGATrackSimReadRawRandomHitsTool |
( |
| ) |
|
|
virtualdefault |
◆ finalize() [1/2]
StatusCode FPGATrackSimReadRawRandomHitsTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ finalize() [2/2]
virtual StatusCode FPGATrackSimReadRawRandomHitsTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize() [1/2]
StatusCode FPGATrackSimReadRawRandomHitsTool::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 14 of file FPGATrackSimReadRawRandomHitsTool.cxx.
18 m_infile = TFile::Open(
m_inpath.value().c_str(),
"READ");
19 if (m_infile ==
nullptr){
21 return StatusCode::FAILURE;
25 m_EventTree = (TTree*) m_infile->Get(
"FPGATrackSimEventTree");
26 if (m_EventTree ==
nullptr || m_EventTree->GetEntries() == -1 ){
28 return StatusCode::FAILURE;
31 std::string branchName=
"FPGATrackSimEventInputHeader";
32 if(!m_EventTree->GetListOfBranches()->FindObject(branchName.c_str())){
34 return StatusCode::FAILURE;
37 TBranch *
branch = m_EventTree->GetBranch(branchName.c_str());
41 branch->SetAddress(&m_eventHeader);
43 return StatusCode::SUCCESS;
◆ initialize() [2/2]
virtual StatusCode FPGATrackSimReadRawRandomHitsTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ readData() [1/4]
◆ readData() [2/4]
◆ readData() [3/4]
Definition at line 53 of file FPGATrackSimReadRawRandomHitsTool.cxx.
58 m_EventTree->GetEntry(
m_entry++);
62 unsigned long int mbc = 0;
71 for (
const auto& truthtrack :
header->optional().getTruthTracks())
73 if (truthtrack.getBarcode() > mbc) mbc = truthtrack.getBarcode();
78 for (
const auto& offlinetrack :
header->optional().getOfflineTracks())
85 for (
auto truthtrack : m_eventHeader->optional().getTruthTracks())
87 truthtrack.setBarcode(truthtrack.getBarcode() + mbc);
90 for (
auto offlinetrack : m_eventHeader->optional().getOfflineTracks())
92 offlinetrack.setBarcode(offlinetrack.getBarcode() + mbc);
96 header->setOptional(optional);
99 for (
auto rawhit : m_eventHeader->hits())
104 mt.
maximize(uniquecode, rawhit.getBarcodePt());
105 rawhit.setBarcode(rawhit.getBarcode() + mbc);
110 return StatusCode::SUCCESS;
◆ readData() [4/4]
◆ writeData() [1/2]
◆ writeData() [2/2]
◆ m_entry
unsigned FPGATrackSimReadRawRandomHitsTool::m_entry = 0 |
|
private |
◆ m_inpath
StringProperty FPGATrackSimReadRawRandomHitsTool::m_inpath {this, "InFileName", "httsim_smartwrapper.root", "input path"} |
|
private |
◆ m_nEntries
unsigned int FPGATrackSimReadRawRandomHitsTool::m_nEntries = 0U |
|
private |
The documentation for this class was generated from the following files: