 |
ATLAS Offline Software
|
Go to the documentation of this file.
22 ATH_MSG_INFO (
"FPGATrackSimMergeOutputsAlg::initialize()");
36 for (
unsigned iregion = 0; iregion <
N; iregion++) {
37 regionsFound[iregion] =
false;
46 return StatusCode::FAILURE;
56 TBranch *dpb =
m_dataprep_tree->GetBranch(
"LogicalEventInputHeader_PostCluster");
59 return StatusCode::FAILURE;
71 for (
unsigned iregion = 0; iregion <
N; iregion++) {
76 else if (regionsFound[iregion]) {
77 ATH_MSG_ERROR(
"Found two files with region number " << iregion <<
" and I do not know which one to use!");
78 return StatusCode::FAILURE;
81 regionsFound[iregion] =
true;
85 TBranch *
b =
m_trees[
ifile][iregion]->GetBranch(
"LogicalEventOutputHeader");
88 return StatusCode::FAILURE;
92 m_trees[
ifile][iregion]->SetBranchStatus(
"LogicalEventSecond*",0);
93 m_trees[
ifile][iregion]->SetBranchStatus(
"LogicalEventFirstP*",0);
94 m_trees[
ifile][iregion]->SetBranchStatus(
"LogicalEventSpace*",0);
95 m_trees[
ifile][iregion]->SetBranchStatus(
"LogicalEventStrip*",0);
102 return StatusCode::FAILURE;
105 return StatusCode::SUCCESS;
111 const EventContext& ctx = getContext();
116 ATH_CHECK(FPGATracks_Handle.
record (std::make_unique<FPGATrackSimTrackCollection>()));
120 ATH_CHECK(FPGAHits_Handle.
record (std::make_unique<FPGATrackSimHitCollection>()));
123 const std::vector<FPGATrackSimHit>
hits = tower.hits();
124 FPGAHits_Handle->insert(FPGAHits_Handle->end(), make_move_iterator(
hits.begin()), make_move_iterator(
hits.end()));
128 for (
unsigned iregion = 0; iregion <
N; iregion++) {
131 ATH_MSG_ERROR(
"Tried reading in more events than the tree had available!");
132 return StatusCode::FAILURE;
138 for (
const auto &
track : tracks) {
139 if (
track.passedOR()) FPGATracks->push_back(
track);
146 for (
const auto &
track : *FPGATracks) {
151 return StatusCode::SUCCESS;
158 return StatusCode::SUCCESS;
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitKey
virtual StatusCode finalize() override
unsigned long m_tracksPassOR
std::vector< TFile * > m_files
virtual StatusCode execute() override
TGraphErrors * GetEntries(TH2F *histo)
ToolHandle< FPGATrackSimOverlapRemovalTool > m_overlapRemovalTool
virtual StatusCode initialize() override
FPGATrackSimMergeOutputsAlg(const std::string &name, ISvcLocator *pSvcLocator)
T * Get(TFile &f, const std::string &n, const std::string &dir="", const chainmap_t *chainmap=0, std::vector< std::string > *saved=0)
get a histogram given a path, and an optional initial directory if histogram is not found,...
std::vector< std::vector< TTree * > > m_trees
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
FPGATrackSimLogicalEventInputHeader * m_dataprep
std::vector< std::vector< FPGATrackSimLogicalEventOutputHeader * > > m_eventOutputHeaders
std::vector< FPGATrackSimTrack > FPGATrackSimTrackCollection
unsigned long m_alltracks
SG::WriteHandleKey< FPGATrackSimTrackCollection > m_FPGATrackKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Gaudi::Property< std::vector< std::string > > m_inpaths
vec_fb< typename boost::int_t< sizeof(T) *8 >::exact, N > ivec