BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Event.cc
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#include "Event.hh"
19#include "RBDSException.hh"
20#include "RebdsimTypes.hh"
21
22#include "BDSOutputROOTEventAperture.hh"
23#include "BDSOutputROOTEventCollimator.hh"
24#include "BDSOutputROOTEventCoords.hh"
25#include "BDSOutputROOTEventHistograms.hh"
26#include "BDSOutputROOTEventInfo.hh"
27#include "BDSOutputROOTEventLoss.hh"
28#include "BDSOutputROOTEventLossWorld.hh"
29#include "BDSOutputROOTEventTrajectory.hh"
30#include "BDSOutputROOTEventSampler.hh"
31#include "BDSOutputROOTEventSamplerC.hh"
32#include "BDSOutputROOTEventSamplerS.hh"
33
34#include <set>
35#include <vector>
36
37#include "TChain.h"
38
39ClassImp(Event)
40
41Event::Event():
42 tree(nullptr),
43 debug(false),
44 processSamplers(false),
45 dataVersion(0),
46 usePrimaries(false)
47{
48 CommonCtor();
49}
50
51Event::Event(bool debugIn,
52 bool processSamplersIn,
53 int dataVersionIn):
54 tree(nullptr),
55 debug(debugIn),
56 processSamplers(processSamplersIn),
57 dataVersion(dataVersionIn),
58 usePrimaries(false)
59{
60 CommonCtor();
61}
62
63Event::~Event()
64{
65 delete Primary;
66 delete PrimaryGlobal;
67 delete Eloss;
68 delete ElossVacuum;
69 delete ElossTunnel;
70 delete ElossWorld;
71 delete ElossWorldExit;
72 delete PrimaryFirstHit;
73 delete PrimaryLastHit;
74 delete TunnelHit;
75 delete Trajectory;
76 delete Histos;
77 delete Summary;
78 delete Info;
79 delete ApertureImpacts;
80 for (auto s : Samplers)
81 {delete s;}
82 for (auto s : SamplersC)
83 {delete s;}
84 for (auto s : SamplersS)
85 {delete s;}
86 for (auto c : collimators)
87 {delete c;}
88}
89
90void Event::CommonCtor()
91{
92#ifdef __ROOTDOUBLE__
94#else
96#endif
111 ApertureImpacts = new BDSOutputROOTEventAperture();
112}
113
114#ifdef __ROOTDOUBLE__
116#else
118#endif
119{
120 auto found = samplerMap.find(name);
121 if (found != samplerMap.end())
122 {return found->second;}
123 else
124 {
125 if (tree)
126 {
127 auto branch = tree->GetBranch(name.c_str());
128 if (!branch)
129 {return nullptr;}
130 else
131 {
132#ifdef __ROOTDOUBLE__
133 Samplers.push_back(new BDSOutputROOTEventSampler<double>(name));
134#else
135 Samplers.push_back(new BDSOutputROOTEventSampler<float>(name));
136#endif
137 samplerNames.push_back(name); // cache the name in a vector
138 samplerMap[name] = Samplers.back();// cache the sampler in a map
139 tree->SetBranchStatus((name+"*").c_str(), true);
140 RelinkSamplers();
141 return Samplers.back();
142 }
143 }
144 else
145 {return nullptr;}
146 }
147}
148
149#ifdef __ROOTDOUBLE__
151#else
153#endif
154{
155 return index >= (int) Samplers.size() ? nullptr : Samplers[index];
156}
157
158BDSOutputROOTEventSamplerC* Event::GetSamplerC(const std::string& name)
159{
160 auto found = samplerCMap.find(name);
161 return found != samplerCMap.end() ? found->second : nullptr;
162}
163
165{
166 return index >= (int) SamplersC.size() ? nullptr : SamplersC[index];
167}
168
170{
171 auto found = samplerSMap.find(name);
172 return found != samplerSMap.end() ? found->second : nullptr;
173}
174
176{
177 return index >= (int) SamplersS.size() ? nullptr : SamplersS[index];
178}
179
181{
182 // help the user out with some variations on the naming that can be created
183 // due to our storage format
184 std::vector<std::string> variations = {name,
185 "COLL_" + name,
186 "COLL_" + name + "_0"};
187 for (const auto& var : variations)
188 {
189 std::cout << (var == collimatorNames[0]) << std::endl;
190 auto found = collimatorMap.find(var);
191 if (found != collimatorMap.end())
192 {return found->second;}
193 }
194 return nullptr; // wasn't found
195}
196
198{
199 if (index >= (int) collimators.size())
200 {return nullptr;}
201 else
202 {return collimators[index];}
203}
204
206 const RBDS::VectorString* samplerNamesIn,
207 bool allBranchesOn,
208 const RBDS::VectorString* branchesToTurnOn,
209 const RBDS::VectorString* collimatorNamesIn,
210 const RBDS::VectorString* samplerCNamesIn,
211 const RBDS::VectorString* samplerSNamesIn)
212{
213 if (debug)
214 {std::cout << "Event::SetBranchAddress" << std::endl;}
215
216 tree = t; // cache tree used in case we update samplers later
217
218 // turn off all branches by default and build up by turning things back on
219 // loop speed is dependent on how much we load each event -> only what we need
220 t->SetBranchStatus("*", false);
221
222 int nCollimatorsToTurnOn = 0;
223 int ithCollimator = 0;
224
225 RBDS::VectorString bToTurnOn; // local copy as we modify it
226 if (branchesToTurnOn)
227 {bToTurnOn = RBDS::VectorString(*branchesToTurnOn);}
228
229 // Few very small things on always for loading
230 bToTurnOn.emplace_back("Primary");
231 bToTurnOn.emplace_back( dataVersion < 4 ? "Info" : "Summary" );
232 bToTurnOn.emplace_back("PrimaryFirstHit");
233 bToTurnOn.emplace_back("PrimaryLastHit");
234
235 if (allBranchesOn)
236 {
237 t->SetBranchStatus("*", true);
238 bToTurnOn.emplace_back("Eloss");
239 bToTurnOn.emplace_back("Histos");
240 bToTurnOn.emplace_back( dataVersion > 4 ? "ElossTunnel" : "TunnelHit" );
241 bToTurnOn.emplace_back("Trajectory");
242
243 if (dataVersion > 3)
244 {
245 bToTurnOn.emplace_back("PrimaryGlobal");
246 bToTurnOn.emplace_back("ElossVacuum");
247 bToTurnOn.emplace_back("ElossWorld");
248 bToTurnOn.emplace_back("ElossWorldContents");
249 bToTurnOn.emplace_back("ElossWorldExit");
250 // add all collimators but ensure not duplicate from user supplied branch names
251 if (collimatorNamesIn)
252 {
253 bToTurnOn.insert(bToTurnOn.end(), collimatorNamesIn->begin(), collimatorNamesIn->end());
254 bToTurnOn = RemoveDuplicates(bToTurnOn);
255 }
256 }
257 if (dataVersion > 4)
258 {bToTurnOn.emplace_back("ApertureImpacts");}
259 }
260 bToTurnOn = RemoveDuplicates(bToTurnOn);
261
262 // pre-count the number of collimators and create them all at once. Do this so the vector
263 // is never resized and therefore the contents copied / moved in memory. SetBranchAddress
264 // takes & (object*) so pointer to pointer, which would break if the contents of the vector
265 // move. Note, some
266 for (const auto& name : bToTurnOn)
267 {
268 if (name.substr(0,4) == "COLL")
269 {nCollimatorsToTurnOn++;}
270 }
271 collimators.resize(nCollimatorsToTurnOn);
272
273 for (const auto& name : bToTurnOn)
274 {
275 if (name.empty())
276 {std::cerr << "empty string given as argument for branch name"; continue;}
277 std::string nameStar = name + "*";
278 std::string nameDot = name.back() != '.' ? name + "." : name; // note emptystr.back() is undefined behaviour
279 if (debug)
280 {std::cout << "Event::SetBranchAddress> Turning on branch \"" << nameStar << "\"" << std::endl;}
281
282 bool condition1 = ((*t).GetListOfBranches()->FindObject(name.c_str())) != nullptr;
283 bool condition2 = ((*t).GetListOfBranches()->FindObject(nameDot.c_str())) != nullptr;
284 // if we don't find the branch name (tolerating "." suffix), so pass by (some branches are optional)
285 if (! (condition1 || condition2) )
286 {
287 if (debug)
288 {std::cout << "Unknown branch name \"" + name + "\"" << std::endl;}
289 continue;
290 }
291
292 t->SetBranchStatus(nameStar.c_str(), true); // turn the branch loading on
293
294 // we can't automatically do this as SetBranchAddress must use the pointer
295 // of the object type and not the base class (say TObject) so there's no
296 // way to easily map these -> ifs
297 // special case first, then alphabetical as this is how they'll come from a set (optimisation)
298
299 // we record the return result of SetBranchAddress but don't test it - only
300 // for debugging purposes
301 Int_t addressSetResult = 0;
302 if (name == "Primary")
303 {// special case
304 usePrimaries = true;
305 addressSetResult = t->SetBranchAddress("Primary.", &Primary);
306 }
307 else if (name == "ApertureImpacts")
308 {addressSetResult = t->SetBranchAddress("ApertureImpacts.", &ApertureImpacts);}
309 else if (name == "Eloss")
310 {addressSetResult = t->SetBranchAddress("Eloss.", &Eloss);}
311 else if (name == "ElossVacuum")
312 {addressSetResult = t->SetBranchAddress("ElossVacuum.", &ElossVacuum);}
313 else if (name == "ElossTunnel")
314 {addressSetResult = t->SetBranchAddress("ElossTunnel.", &ElossTunnel);}
315 else if (name == "ElossWorld")
316 {addressSetResult = t->SetBranchAddress("ElossWorld.", &ElossWorld);}
317 else if (name == "ElossWorldContents")
318 {addressSetResult = t->SetBranchAddress("ElossWorldContents.", &ElossWorldContents);}
319 else if (name == "ElossWorldExit")
320 {addressSetResult = t->SetBranchAddress("ElossWorldExit.", &ElossWorldExit);}
321 else if (name == "Histos")
322 {addressSetResult = t->SetBranchAddress("Histos.", &Histos);}
323 else if (name == "Info")
324 {addressSetResult = t->SetBranchAddress("Info.", &Info);}
325 else if (name == "Summary")
326 {addressSetResult = t->SetBranchAddress("Summary.", &Summary);}
327 else if (name == "PrimaryGlobal")
328 {addressSetResult = t->SetBranchAddress("PrimaryGlobal.", &PrimaryGlobal);}
329 else if (name == "PrimaryFirstHit")
330 {addressSetResult = t->SetBranchAddress("PrimaryFirstHit.", &PrimaryFirstHit);}
331 else if (name == "PrimaryLastHit")
332 {addressSetResult = t->SetBranchAddress("PrimaryLastHit.", &PrimaryLastHit);}
333 else if (name == "TunnelHit")
334 {addressSetResult = t->SetBranchAddress("TunnelHit.", &TunnelHit);}
335 else if (name == "Trajectory")
336 {addressSetResult = t->SetBranchAddress("Trajectory.", &Trajectory);}
337 else if (name.substr(0,4) == "COLL")
338 {
339 addressSetResult = SetBranchAddressCollimatorSingle(t, nameDot, ithCollimator);
340 ithCollimator++;
341 }
342 if (debug) // has to be done inside loop
343 {std::cout << "SetBranchAddress result: " << addressSetResult << std::endl;}
344 }
345
346 if (debug)
347 {
348 std::cout << "Event::SetBranchAddress> Primary. " << Primary << std::endl;
349 std::cout << "Event::SetBranchAddress> PrimaryGlobal. " << PrimaryGlobal << std::endl;
350 std::cout << "Event::SetBranchAddress> Eloss. " << Eloss << std::endl;
351 std::cout << "Event::SetBranchAddress> ElossTunnel. " << ElossTunnel << std::endl;
352 std::cout << "Event::SetBranchAddress> ElossVacuum. " << ElossVacuum << std::endl;
353 std::cout << "Event::SetBranchAddress> ElossWorld. " << ElossWorld << std::endl;
354 std::cout << "Event::SetBranchAddress> ElossWorldContents. " << ElossWorldContents << std::endl;
355 std::cout << "Event::SetBranchAddress> ElossWorldExit. " << ElossWorldExit << std::endl;
356 std::cout << "Event::SetBranchAddress> PrimaryFirstHit. " << PrimaryFirstHit << std::endl;
357 std::cout << "Event::SetBranchAddress> PrimaryLastHit. " << PrimaryLastHit << std::endl;
358 std::cout << "Event::SetBranchAddress> TunnelHit. " << TunnelHit << std::endl;
359 std::cout << "Event::SetBranchAddress> Trajectory. " << Trajectory << std::endl;
360 std::cout << "Event::SetBranchAddress> Histos. " << Histos << std::endl;
361 std::cout << "Event::SetBranchAddress> Info. " << Info << std::endl;
362 }
363
364 if (processSamplers || samplerNamesIn)
365 {
366 unsigned int nrSamplers = samplerNamesIn->size();
367 Samplers.resize(nrSamplers); // reserve and nominally instantiate instances.
368 for (unsigned int i=0; i < nrSamplers; ++i)
369 {
370 const auto sampName = (*samplerNamesIn)[i];
371#ifdef __ROOTDOUBLE__
373#else
375#endif
376 samplerNames.push_back(sampName); // cache the name in a vector
377 samplerMap[sampName] = Samplers[i];// cache the sampler in a map
378
379 t->SetBranchAddress(sampName.c_str(), &Samplers[i]);
380 t->SetBranchStatus((sampName+"*").c_str(), true);
381 if (debug)
382 {std::cout << "Event::SetBranchAddress> " << (*samplerNamesIn)[i] << " " << Samplers[i] << std::endl;}
383 }
384 }
385
386 if (processSamplers || samplerCNamesIn)
387 {
388 unsigned int nrSamplers = samplerCNamesIn->size();
389 SamplersC.resize(nrSamplers); // reserve and nominally instantiate instances.
390 for (unsigned int i=0; i < nrSamplers; ++i)
391 {
392 const auto sampName = (*samplerCNamesIn)[i];
393 SamplersC[i] = new BDSOutputROOTEventSamplerC(sampName);
394 samplerCNames.push_back(sampName); // cache the name in a vector
395 samplerCMap[sampName] = SamplersC[i];// cache the sampler in a map
396
397 t->SetBranchAddress(sampName.c_str(), &SamplersC[i]);
398 t->SetBranchStatus((sampName+"*").c_str(), true);
399 if (debug)
400 {std::cout << "Event::SetBranchAddress> " << (*samplerCNamesIn)[i] << " " << SamplersC[i] << std::endl;}
401 }
402 }
403
404 if (processSamplers || samplerSNamesIn)
405 {
406 unsigned int nrSamplers = samplerSNamesIn->size();
407 SamplersS.resize(nrSamplers); // reserve and nominally instantiate instances.
408 for (unsigned int i=0; i < nrSamplers; ++i)
409 {
410 const auto sampName = (*samplerSNamesIn)[i];
411 SamplersS[i] = new BDSOutputROOTEventSamplerS(sampName);
412 samplerSNames.push_back(sampName); // cache the name in a vector
413 samplerSMap[sampName] = SamplersS[i];// cache the sampler in a map
414
415 t->SetBranchAddress(sampName.c_str(), &SamplersS[i]);
416 t->SetBranchStatus((sampName+"*").c_str(), true);
417 if (debug)
418 {std::cout << "Event::SetBranchAddress> " << (*samplerSNamesIn)[i] << " " << SamplersS[i] << std::endl;}
419 }
420 }
421}
422
424{
425 if (!tree)
426 {throw RBDSException("Event::RelinkSamplers>", "no tree from set branch address");}
427 for (const auto& item : samplerMap)
428 {tree->SetBranchAddress(item.first.c_str(), (void*)&item.second);}
429}
430
431RBDS::VectorString Event::RemoveDuplicates(const RBDS::VectorString& namesIn) const
432{
433 std::set<std::string> namesSet(namesIn.begin(), namesIn.end());
434 auto namesUnique = RBDS::VectorString(namesSet.begin(), namesSet.end());
435 return namesUnique;
436}
437
438void Event::RegisterCollimator(const std::string& collimatorName)
439{
440 // be careful of push_back to collimators vector as this might invalidate
441 // any &pointers used with SetBranchAddress
443 collimatorNames.push_back(collimatorName);
444 collimators.push_back(collimator);
445 collimatorMap[collimatorName] = collimator;
446}
447
448void Event::RegisterSampler(const std::string& samplerName)
449{
450#ifdef __ROOTDOUBLE__
452 samplerNames.push_back(samplerName);
453 Samplers.push_back(sampler);
454 samplerMap[samplerName] = sampler;
455#else
457 samplerNames.push_back(samplerName);
458 Samplers.push_back(sampler);
459 samplerMap[samplerName] = sampler;
460#endif
461}
462
464 const RBDS::VectorString* collimatorNamesIn)
465{
466 if (collimatorNamesIn)
467 {
468 int i = 0;
469 for (const auto& name : *collimatorNamesIn)
470 {
471 collimators.resize((unsigned int)collimatorNamesIn->size());
473 i++;
474 }
475 }
476}
477
479 const std::string& name,
480 int i)
481{
482 // we must not push_back to collimators (vector) as this might expand it
483 // and invalidate all addresses to pointers in that vector
485 collimatorNames.push_back(name);
486 collimatorMap[name] = collimators[i];
487
488 // record result purely for debugging purposes
489 Int_t addressSetResult = t->SetBranchAddress(name.c_str(), &collimators[i]);
490 if (debug)
491 {std::cout << "Event::SetBranchAddress> " << name << " " << collimators[i] << std::endl;}
492 return addressSetResult;
493}
494
495void Event::Fill(Event* other)
496{
497 Primary->Fill(other->Primary);
499 Eloss->Fill(other->Eloss);
502 ElossWorld->Fill(other->ElossWorld);
504 ElossWorldExit->Fill(other->ElossWorldExit);
507 TunnelHit->Fill(other->TunnelHit);
508 Trajectory->Fill(other->Trajectory);
509 Histos->FillSimple(other->Histos);
510 Summary->Fill(other->Summary);
511 Info->Fill(other->Info);
512 ApertureImpacts->Fill(other->ApertureImpacts);
513
514 for (unsigned long i = 0; i < Samplers.size(); i++)
515 {Samplers[i]->Fill(other->Samplers[i]);}
516
517 for (unsigned long i = 0; i < SamplersC.size(); i++)
518 {SamplersC[i]->Fill(other->SamplersC[i]);}
519
520 for (unsigned long i = 0; i < SamplersS.size(); i++)
521 {SamplersS[i]->Fill(other->SamplersS[i]);}
522
523 for (unsigned long i = 0; i < collimators.size(); i++)
524 {collimators[i]->Fill(other->collimators[i]);}
525}
526
528{
529 Primary->Flush();
530 PrimaryGlobal->Flush();
531 Eloss->Flush();
532 ElossVacuum->Flush();
533 ElossTunnel->Flush();
534 ElossWorld->Flush();
535 ElossWorldContents->Flush();
536 ElossWorldExit->Flush();
537 PrimaryFirstHit->Flush();
538 PrimaryLastHit->Flush();
539 TunnelHit->Flush();
540 Trajectory->Flush();
541 Histos->Flush();
542 Summary->Flush();
543 Info->Flush();
544 ApertureImpacts->Flush();
547}
548
550{
551 for (auto s : Samplers)
552 {s->Flush();}
553 for (auto s : SamplersC)
554 {s->Flush();}
555 for (auto s : SamplersS)
556 {s->Flush();}
557}
558
560{
561 for (auto c : collimators)
562 {c->Flush();}
563}
Data stored for energy deposition hits per event.
Data stored for each collimator per event.
void Fill(const BDSOutputROOTEventCoords *other)
Fill from another instance.
Holder for a set of histograms to be stored.
virtual void Flush()
Flush the contents.
void FillSimple(const BDSOutputROOTEventHistograms *rhs)
Copy (without using the TH->Clone) method from another instance. (Quicker).
Information pertaining to an individual event.
void Fill(const BDSOutputROOTEventInfo *other)
Fill from another instance.
Data stored for world hits per event.
Data stored for energy deposition hits per event.
void Fill(const BDSOutputROOTEventLoss *other)
Fill from another instance.
Information stored per cylindrical sampler per event.
Information stored per spherical sampler per event.
Information stored per sampler per event.
virtual void Flush()
Clean Sampler.
Structure to record a trajectory.
virtual void Flush()
add comment to avoid warning (no need to make persistent, see issue #191)
Event loader.
Definition Event.hh:49
BDSOutputROOTEventLoss * PrimaryLastHit
Local variable ROOT data is mapped to.
Definition Event.hh:135
BDSOutputROOTEventLoss * TunnelHit
Local variable ROOT data is mapped to.
Definition Event.hh:136
void FlushSamplers()
Flushing functions.
Definition Event.cc:549
BDSOutputROOTEventLoss * ElossVacuum
Local variable ROOT data is mapped to.
Definition Event.hh:129
BDSOutputROOTEventSampler< double > * GetSampler(const std::string &name)
Accessor.
Definition Event.cc:115
BDSOutputROOTEventHistograms * Histos
Local variable ROOT data is mapped to.
Definition Event.hh:145
BDSOutputROOTEventCollimator * GetCollimator(const std::string &name)
Accessor.
Definition Event.cc:180
BDSOutputROOTEventLossWorld * ElossWorldExit
Local variable ROOT data is mapped to.
Definition Event.hh:133
void RelinkSamplers()
Definition Event.cc:423
RBDS::VectorString RemoveDuplicates(const RBDS::VectorString &namesIn) const
Utility method.
Definition Event.cc:431
BDSOutputROOTEventLossWorld * ElossWorld
Local variable ROOT data is mapped to.
Definition Event.hh:131
BDSOutputROOTEventLossWorld * ElossWorldContents
Local variable ROOT data is mapped to.
Definition Event.hh:132
void FlushCollimators()
Flushing functions.
Definition Event.cc:559
BDSOutputROOTEventLoss * ElossTunnel
Local variable ROOT data is mapped to.
Definition Event.hh:130
BDSOutputROOTEventSampler< double > * Primary
Local variable ROOT data is mapped to.
Definition Event.hh:123
BDSOutputROOTEventSamplerC * GetSamplerC(const std::string &name)
Accessor.
std::vector< BDSOutputROOTEventSamplerC * > SamplersC
Local variable ROOT data is mapped to.
Definition Event.hh:143
BDSOutputROOTEventSamplerS * GetSamplerS(const std::string &name)
Accessor.
Definition Event.cc:169
void RegisterCollimator(const std::string &collimatorName)
Utility method for interface building events.
Definition Event.cc:438
void Flush()
Flushing functions.
Definition Event.cc:527
BDSOutputROOTEventTrajectory * Trajectory
Local variable ROOT data is mapped to.
Definition Event.hh:137
BDSOutputROOTEventLoss * PrimaryFirstHit
Local variable ROOT data is mapped to.
Definition Event.hh:134
void SetBranchAddressCollimators(TTree *t, const RBDS::VectorString *collimatorNames)
Utility function to avoid repetition of code.
Definition Event.cc:463
std::vector< BDSOutputROOTEventSampler< double > * > Samplers
Local variable ROOT data is mapped to.
Definition Event.hh:139
void Fill(Event *other)
Copy data from another event into this event.
Definition Event.cc:495
Int_t SetBranchAddressCollimatorSingle(TTree *t, const std::string &name, int i)
Utility function to avoid repetition of code.
Definition Event.cc:478
BDSOutputROOTEventInfo * Summary
Local variable ROOT data is mapped to.
Definition Event.hh:146
std::vector< BDSOutputROOTEventSamplerS * > SamplersS
Local variable ROOT data is mapped to.
Definition Event.hh:144
BDSOutputROOTEventLoss * Eloss
Local variable ROOT data is mapped to.
Definition Event.hh:128
void RegisterSampler(const std::string &samplerName)
Utility method for interface building events.
Definition Event.cc:448
BDSOutputROOTEventCoords * PrimaryGlobal
Local variable ROOT data is mapped to.
Definition Event.hh:127
BDSOutputROOTEventInfo * Info
For backwards compatibility.
Definition Event.hh:149
std::vector< BDSOutputROOTEventCollimator * > collimators
Local variable ROOT data is mapped to.
Definition Event.hh:147
void SetBranchAddress(TTree *t, const RBDS::VectorString *samplerNames=nullptr, bool allBranchesOn=false, const RBDS::VectorString *branchesToTurnOn=nullptr, const RBDS::VectorString *collimatorNamesIn=nullptr, const RBDS::VectorString *samplerCNamesIn=nullptr, const RBDS::VectorString *samplerSNamesIn=nullptr)
Definition Event.cc:205
General exception with possible name of object and message.