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