#include <FPGATrackSimOutputHeaderTool.h>
|
| Gaudi::Property< std::vector< std::string > > | m_inpath {this, "InFileName", {"."}, "input file paths"} |
| Gaudi::Property< std::string > | m_rwoption {this, "RWstatus", std::string("READ"), "define read or write file option: READ, RECREATE, HEADER"} |
| Gaudi::Property< std::string > | m_treeName {this, "OutputTreeName", "FPGATrackSimLogicalEventTree", "Name of the output TTree to create."} |
| ServiceHandle< ITHistSvc > | m_tHistSvc {this, "THistSvc", "THistSvc"} |
| Gaudi::Property< int > | m_eventLimit {this, "EventLimit", 10000 , "Maximum Number of Events to Output"} |
| Gaudi::Property< bool > | m_requireActivation {this, "RequireActivation", false , "Only output if activated on event, good for doing a single region in a large file"} |
| std::atomic< unsigned > | m_event = 0 |
| std::atomic< unsigned > | m_totevent = 0 |
| std::atomic< unsigned > | m_file = 0 |
| bool | m_activated {false} |
| std::vector< FPGATrackSimLogicalEventInputHeader * > | m_eventInputHeaders |
| std::vector< FPGATrackSimLogicalEventOutputHeader * > | m_eventOutputHeaders |
| std::vector< std::string > | m_branchNameIns |
| std::vector< std::string > | m_branchNameOuts |
| TFile * | m_infile = nullptr |
| TTree * | m_EventTree = nullptr |
| StoreGateSvc_t | m_evtStore |
| | Pointer to StoreGate (event store by default)
|
| StoreGateSvc_t | m_detStore |
| | Pointer to StoreGate (detector store by default)
|
| std::vector< SG::VarHandleKeyArray * > | m_vhka |
| bool | m_varHandleArraysDeclared |
◆ StoreGateSvc_t
◆ FPGATrackSimOutputHeaderTool()
| FPGATrackSimOutputHeaderTool::FPGATrackSimOutputHeaderTool |
( |
const std::string & | algname, |
|
|
const std::string & | name, |
|
|
const IInterface * | ifc ) |
◆ ~FPGATrackSimOutputHeaderTool()
| virtual FPGATrackSimOutputHeaderTool::~FPGATrackSimOutputHeaderTool |
( |
| ) |
|
|
virtualdefault |
◆ activateEventOutput()
| void FPGATrackSimOutputHeaderTool::activateEventOutput |
( |
| ) |
|
|
inline |
◆ addInputBranch()
◆ addOutputBranch()
◆ configureReadBranches()
| StatusCode FPGATrackSimOutputHeaderTool::configureReadBranches |
( |
| ) |
|
Definition at line 51 of file FPGATrackSimOutputHeaderTool.cxx.
51 {
52
53
54 if (
m_rwoption.value() != std::string(
"READ")) {
55 ATH_MSG_FATAL(
"Called configureReadBranches() when ROOT file was not opened in READ mode.");
56 return StatusCode::FAILURE;
57 }
58
59
60
63 if (!
m_EventTree->GetListOfBranches()->FindObject(branchName.c_str())) {
64 ATH_MSG_FATAL(
"Configured input branch: " << branchName <<
" not found!");
65 return StatusCode::FAILURE;
66 }
67 TBranch *branchIn =
m_EventTree->GetBranch(branchName.c_str());
69 m_EventTree->SetBranchStatus(branchName.c_str(), 1);
70 }
71
72
75 if (!
m_EventTree->GetListOfBranches()->FindObject(branchName.c_str())) {
76 ATH_MSG_FATAL(
"Configured output branch: " << branchName <<
" not found!");
77 return StatusCode::FAILURE;
78 }
79 TBranch *branchIn =
m_EventTree->GetBranch(branchName.c_str());
81 m_EventTree->SetBranchStatus(branchName.c_str(), 1);
82 }
83
84 return StatusCode::SUCCESS;
85}
◆ declareGaudiProperty()
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
158 {
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
◆ declareProperty()
Definition at line 145 of file AthCommonDataStore.h.
145 {
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
◆ detStore()
◆ evtStore()
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ fileName()
| std::string FPGATrackSimOutputHeaderTool::fileName |
( |
| ) |
|
|
inline |
◆ finalize()
| StatusCode FPGATrackSimOutputHeaderTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getEventTree()
| TTree * FPGATrackSimOutputHeaderTool::getEventTree |
( |
| ) |
|
|
inline |
◆ initialize()
| StatusCode FPGATrackSimOutputHeaderTool::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 88 of file FPGATrackSimOutputHeaderTool.cxx.
89{
90
91 const std::vector<Gaudi::Details::PropertyBase*> props = this->getProperties();
92 for( Gaudi::Details::PropertyBase* prop : props ) {
93 if (prop->ownerTypeName()==this->type()) {
94 ATH_MSG_DEBUG(
"Property:\t" << prop->name() <<
"\t : \t" << prop->toString());
95 }
96 }
97
99
100 if(
m_rwoption.value()!=std::string(
"HEADER"))
101 {
103 {
105 return StatusCode::FAILURE;
106 }
108 }
109
110 if (
m_rwoption.value() == std::string(
"READ")) {
112 }
else if (
m_rwoption.value()==std::string(
"RECREATE") ||
m_rwoption.value()==std::string(
"HEADER")) {
113
114
116
117
118 if (
m_rwoption.value() == std::string(
"HEADER")) {
120 }
121
122 } else {
124 return StatusCode::FAILURE;
125 }
126
129 return StatusCode::SUCCESS;
130}
#define ATH_CHECK
Evaluate an expression and check for errors.
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg()
◆ msgLvl()
| bool AthCommonMsg< AlgTool >::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
◆ openFile()
| StatusCode FPGATrackSimOutputHeaderTool::openFile |
( |
std::string const & | path | ) |
|
|
private |
Definition at line 14 of file FPGATrackSimOutputHeaderTool.cxx.
15{
16
18
19
22
25 return StatusCode::FAILURE;
26 }
27
28 if (
m_rwoption.value() == std::string(
"READ")) {
29
33 return StatusCode::FAILURE;
34 }
35
37 }
38
41 return StatusCode::SUCCESS;
42}
path
python interpreter configuration --------------------------------------—
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ readData()
| StatusCode FPGATrackSimOutputHeaderTool::readData |
( |
bool & | last | ) |
|
Definition at line 229 of file FPGATrackSimOutputHeaderTool.cxx.
230{
231 if (
m_rwoption.value() != std::string(
"READ")) {
233 return StatusCode::SUCCESS;
234 }
235
238 }
239
242 }
243
245 last = false;
249
251 }
252 else {
253 last = true;
254 return StatusCode::SUCCESS;
255 }
256 }
257
258
261 if (statIn <= 0)
ATH_MSG_WARNING(
"Error in reading from branch " << branchName);
262 }
263
266 if (statOut <= 0)
ATH_MSG_WARNING(
"Error in reading from branch " << branchName);
267 }
268
271
272 return StatusCode::SUCCESS;
273}
#define ATH_MSG_WARNING(x)
◆ renounce()
Definition at line 380 of file AthCommonDataStore.h.
381 {
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
Definition at line 308 of file AthCommonDataStore.h.
308 {
309
310
313 for (
auto k :
keys) {
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka
◆ writeData()
| StatusCode FPGATrackSimOutputHeaderTool::writeData |
( |
| ) |
|
Definition at line 179 of file FPGATrackSimOutputHeaderTool.cxx.
179 {
180
181 if (
m_rwoption.value() == std::string(
"READ")) {
183 return StatusCode::SUCCESS;
184 }
185
187
188
194
197 }
204 }
205 }
206
207
210 }
211
212
215 }
216
217
219 ATH_MSG_ERROR(
"Tried to fill output ROOT file with no configured input or output headers.");
220 return StatusCode::FAILURE;
221 }
222
223 return StatusCode::SUCCESS;
224}
◆ m_activated
| bool FPGATrackSimOutputHeaderTool::m_activated {false} |
|
private |
◆ m_branchNameIns
| std::vector<std::string> FPGATrackSimOutputHeaderTool::m_branchNameIns |
|
private |
◆ m_branchNameOuts
| std::vector<std::string> FPGATrackSimOutputHeaderTool::m_branchNameOuts |
|
private |
◆ m_detStore
◆ m_event
| std::atomic<unsigned> FPGATrackSimOutputHeaderTool::m_event = 0 |
|
private |
◆ m_eventInputHeaders
◆ m_eventLimit
| Gaudi::Property<int> FPGATrackSimOutputHeaderTool::m_eventLimit {this, "EventLimit", 10000 , "Maximum Number of Events to Output"} |
|
private |
◆ m_eventOutputHeaders
◆ m_EventTree
| TTree* FPGATrackSimOutputHeaderTool::m_EventTree = nullptr |
|
private |
◆ m_evtStore
◆ m_file
| std::atomic<unsigned> FPGATrackSimOutputHeaderTool::m_file = 0 |
|
private |
◆ m_infile
| TFile* FPGATrackSimOutputHeaderTool::m_infile = nullptr |
|
private |
◆ m_inpath
| Gaudi::Property<std::vector<std::string> > FPGATrackSimOutputHeaderTool::m_inpath {this, "InFileName", {"."}, "input file paths"} |
|
private |
◆ m_requireActivation
| Gaudi::Property<bool> FPGATrackSimOutputHeaderTool::m_requireActivation {this, "RequireActivation", false , "Only output if activated on event, good for doing a single region in a large file"} |
|
private |
Definition at line 78 of file FPGATrackSimOutputHeaderTool.h.
78{this, "RequireActivation", false , "Only output if activated on event, good for doing a single region in a large file"};
◆ m_rwoption
| Gaudi::Property<std::string> FPGATrackSimOutputHeaderTool::m_rwoption {this, "RWstatus", std::string("READ"), "define read or write file option: READ, RECREATE, HEADER"} |
|
private |
Definition at line 66 of file FPGATrackSimOutputHeaderTool.h.
66{this, "RWstatus", std::string("READ"), "define read or write file option: READ, RECREATE, HEADER"};
◆ m_tHistSvc
| ServiceHandle<ITHistSvc> FPGATrackSimOutputHeaderTool::m_tHistSvc {this, "THistSvc", "THistSvc"} |
|
private |
◆ m_totevent
| std::atomic<unsigned> FPGATrackSimOutputHeaderTool::m_totevent = 0 |
|
private |
◆ m_treeName
| Gaudi::Property<std::string> FPGATrackSimOutputHeaderTool::m_treeName {this, "OutputTreeName", "FPGATrackSimLogicalEventTree", "Name of the output TTree to create."} |
|
private |
Definition at line 69 of file FPGATrackSimOutputHeaderTool.h.
69{this, "OutputTreeName", "FPGATrackSimLogicalEventTree", "Name of the output TTree to create."};
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files: