LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
evgen::TextFileGen Class Reference
Inheritance diagram for evgen::TextFileGen:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Types

using ModuleType = EDProducer
 
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 

Public Member Functions

 TextFileGen (fhicl::ParameterSet const &p)
 
void produce (art::Event &e) override
 
void beginJob () override
 
void beginRun (art::Run &run) override
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
void fillProductDescriptions ()
 
void registerProducts (ProductDescriptions &productsToRegister)
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
std::unique_ptr< Worker > makeWorker (WorkerParams const &wp)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Protected Member Functions

ConsumesCollector & consumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Private Member Functions

std::pair< unsigned, unsigned > readEventInfo (std::istream &is)
 
simb::MCTruth readNextHepEvt ()
 

Private Attributes

unsigned long int fOffset
 
std::ifstream * fInputFile
 
std::string fInputFileName
 Name of text file containing events to simulate. More...
 
double fMoveY
 Project particles to a new y plane. More...
 

Detailed Description

This module assumes that the input file has the hepevt format for each event to be simulated. See

http://cepa.fnal.gov/psm/simulation/mcgen/lund/pythia_manual/pythia6.3/pythia6301/node39.html

for details on the format. In brief each event contains at least two lines. The first line contains two entries, the event number (which is ignored in ART/LArSoft) and the number of particles in the event. Each following line containes 15 entries to describe each particle. The entries are:

  1. status code (should be set to 1 for any particle to be tracked, others won't be tracked)
  2. the pdg code for the particle
  3. the entry of the first mother for this particle in the event, 0 means no mother
  4. the entry of the second mother for this particle in the event, 0 means no mother
  5. the entry of the first daughter for this particle in the event, 0 means no daughter
  6. the entry of the second daughter for this particle in the event, 0 means no daughter
  7. x component of the particle momentum
  8. y component of the particle momentum
  9. z component of the particle momentum
  10. energy of the particle
  11. mass of the particle
  12. x position of the particle initial position
  13. y position of the particle initial position
  14. z position of the particle initial position
  15. time of the particle production

For example, if you want to simulate a single muon with a 5 GeV energy moving only in the z direction, the entry would be

0 1
1 13 0 0 0 0 0. 0. 1.0 5.0011 0.105 1.0 1.0 1.0 0.0

There are some assumptions that go into using this format that may not be obvious. The first is that only particles with status code = 1 are tracked in the LArSoft/Geant4 combination making the mother daughter relations somewhat irrelevant. That also means that you should let Geant4 handle any decays.

The units in LArSoft are cm for distances and ns for time. The use of TLorentzVector below does not imply space and time have the same units (do not use TLorentzVector::Boost()).

Definition at line 83 of file TextFileGen_module.cc.

Member Typedef Documentation

Definition at line 17 of file EDProducer.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::detail::Producer::Table = Modifier::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 26 of file Producer.h.

Constructor & Destructor Documentation

evgen::TextFileGen::TextFileGen ( fhicl::ParameterSet const &  p)
explicit

Definition at line 101 of file TextFileGen_module.cc.

References fInputFile, fInputFileName, fMoveY, and fOffset.

102  : EDProducer{p}
103  , fOffset{p.get<unsigned long int>("Offset")}
104  , fInputFile(0)
105  , fInputFileName{p.get<std::string>("InputFileName")}
106  , fMoveY{p.get<double>("MoveY", -1e9)}
107 {
108  if (fMoveY > -1e8) {
109  mf::LogWarning("TextFileGen") << "Particles will be moved to a new plane y = " << fMoveY
110  << " cm.\n";
111  }
112 
113  produces<std::vector<simb::MCTruth>>();
114  produces<sumdata::RunData, art::InRun>();
115 }
unsigned long int fOffset
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.cc:6
std::string fInputFileName
Name of text file containing events to simulate.
std::ifstream * fInputFile
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
double fMoveY
Project particles to a new y plane.

Member Function Documentation

void evgen::TextFileGen::beginJob ( )
overridevirtual

Reimplemented from art::EDProducer.

Definition at line 118 of file TextFileGen_module.cc.

References fInputFile, fInputFileName, fOffset, and readEventInfo().

119 {
120  fInputFile = new std::ifstream(fInputFileName.c_str());
121 
122  // check that the file is a good one
123  if (!fInputFile->good())
124  throw cet::exception("TextFileGen")
125  << "input text file " << fInputFileName << " cannot be read.\n";
126 
127  for (unsigned i = 0; i != fOffset; ++i) {
128  auto const [eventNo, nparticles] = readEventInfo(*fInputFile);
129  for (unsigned p = 0; p != nparticles; ++p) {
130  constexpr auto all_chars_until = std::numeric_limits<unsigned>::max();
131  fInputFile->ignore(all_chars_until, '\n');
132  }
133  }
134 }
std::pair< unsigned, unsigned > readEventInfo(std::istream &is)
unsigned long int fOffset
std::string fInputFileName
Name of text file containing events to simulate.
std::ifstream * fInputFile
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void evgen::TextFileGen::beginRun ( art::Run run)
overridevirtual

Reimplemented from art::EDProducer.

Definition at line 137 of file TextFileGen_module.cc.

References geo::GeometryCore::DetectorName(), art::fullRun(), and art::Run::put().

138 {
140  run.put(std::make_unique<sumdata::RunData>(geo->DetectorName()), art::fullRun());
141 }
constexpr auto fullRun()
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: Run.h:121
std::string const & DetectorName() const
Returns a string with the name of the detector, as configured.
Definition: GeometryCore.h:203
Namespace collecting geometry-related classes utilities.
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::consumes ( InputTag const &  tag)
protectedinherited

Definition at line 61 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumes().

62  {
63  return collector_.consumes<T, BT>(tag);
64  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ProductToken< T > consumes(InputTag const &)
ConsumesCollector & art::ModuleBase::consumesCollector ( )
protectedinherited

Definition at line 57 of file ModuleBase.cc.

References art::ModuleBase::collector_.

58  {
59  return collector_;
60  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename T , BranchType BT>
void art::ModuleBase::consumesMany ( )
protectedinherited

Definition at line 75 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumesMany().

76  {
77  collector_.consumesMany<T, BT>();
78  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::consumesView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::consumesView ( InputTag const &  tag)
inherited

Definition at line 68 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumesView().

69  {
70  return collector_.consumesView<T, BT>(tag);
71  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ViewToken< Element > consumesView(InputTag const &)
void art::detail::Producer::doBeginJob ( SharedResources const &  resources)
inherited

Definition at line 22 of file Producer.cc.

References art::detail::Producer::beginJobWithFrame(), and art::detail::Producer::setupQueues().

23  {
24  setupQueues(resources);
25  ProcessingFrame const frame{ScheduleID{}};
26  beginJobWithFrame(frame);
27  }
virtual void setupQueues(SharedResources const &)=0
virtual void beginJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Producer::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 65 of file Producer.cc.

References art::detail::Producer::beginRunWithFrame(), art::RangeSet::forRun(), art::RunPrincipal::makeRun(), r, art::RunPrincipal::runID(), and art::ModuleContext::scheduleID().

66  {
67  auto r = rp.makeRun(mc, RangeSet::forRun(rp.runID()));
68  ProcessingFrame const frame{mc.scheduleID()};
69  beginRunWithFrame(r, frame);
70  r.commitProducts();
71  return true;
72  }
TRandom r
Definition: spectrum.C:23
virtual void beginRunWithFrame(Run &, ProcessingFrame const &)=0
static RangeSet forRun(RunID)
Definition: RangeSet.cc:51
bool art::detail::Producer::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 85 of file Producer.cc.

References art::detail::Producer::beginSubRunWithFrame(), art::RangeSet::forSubRun(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::SubRunPrincipal::subRunID().

86  {
87  auto sr = srp.makeSubRun(mc, RangeSet::forSubRun(srp.subRunID()));
88  ProcessingFrame const frame{mc.scheduleID()};
89  beginSubRunWithFrame(sr, frame);
90  sr.commitProducts();
91  return true;
92  }
virtual void beginSubRunWithFrame(SubRun &, ProcessingFrame const &)=0
static RangeSet forSubRun(SubRunID)
Definition: RangeSet.cc:57
void art::detail::Producer::doEndJob ( )
inherited

Definition at line 30 of file Producer.cc.

References art::detail::Producer::endJobWithFrame().

31  {
32  ProcessingFrame const frame{ScheduleID{}};
33  endJobWithFrame(frame);
34  }
virtual void endJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Producer::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 75 of file Producer.cc.

References art::detail::Producer::endRunWithFrame(), art::RunPrincipal::makeRun(), r, art::ModuleContext::scheduleID(), and art::Principal::seenRanges().

76  {
77  auto r = rp.makeRun(mc, rp.seenRanges());
78  ProcessingFrame const frame{mc.scheduleID()};
79  endRunWithFrame(r, frame);
80  r.commitProducts();
81  return true;
82  }
TRandom r
Definition: spectrum.C:23
virtual void endRunWithFrame(Run &, ProcessingFrame const &)=0
bool art::detail::Producer::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 95 of file Producer.cc.

References art::detail::Producer::endSubRunWithFrame(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::Principal::seenRanges().

96  {
97  auto sr = srp.makeSubRun(mc, srp.seenRanges());
98  ProcessingFrame const frame{mc.scheduleID()};
99  endSubRunWithFrame(sr, frame);
100  sr.commitProducts();
101  return true;
102  }
virtual void endSubRunWithFrame(SubRun &, ProcessingFrame const &)=0
bool art::detail::Producer::doEvent ( EventPrincipal ep,
ModuleContext const &  mc,
std::atomic< std::size_t > &  counts_run,
std::atomic< std::size_t > &  counts_passed,
std::atomic< std::size_t > &  counts_failed 
)
inherited

Definition at line 105 of file Producer.cc.

References art::detail::Producer::checkPutProducts_, e, art::EventPrincipal::makeEvent(), art::detail::Producer::produceWithFrame(), and art::ModuleContext::scheduleID().

110  {
111  auto e = ep.makeEvent(mc);
112  ++counts_run;
113  ProcessingFrame const frame{mc.scheduleID()};
114  produceWithFrame(e, frame);
115  e.commitProducts(checkPutProducts_, &expectedProducts<InEvent>());
116  ++counts_passed;
117  return true;
118  }
bool const checkPutProducts_
Definition: Producer.h:70
Float_t e
Definition: plot.C:35
virtual void produceWithFrame(Event &, ProcessingFrame const &)=0
void art::detail::Producer::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited

Definition at line 44 of file Producer.cc.

References art::detail::Producer::respondToCloseInputFileWithFrame().

45  {
46  ProcessingFrame const frame{ScheduleID{}};
48  }
virtual void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::detail::Producer::doRespondToCloseOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 58 of file Producer.cc.

References art::detail::Producer::respondToCloseOutputFilesWithFrame().

59  {
60  ProcessingFrame const frame{ScheduleID{}};
62  }
virtual void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::detail::Producer::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited

Definition at line 37 of file Producer.cc.

References art::detail::Producer::respondToOpenInputFileWithFrame().

38  {
39  ProcessingFrame const frame{ScheduleID{}};
41  }
virtual void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::detail::Producer::doRespondToOpenOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 51 of file Producer.cc.

References art::detail::Producer::respondToOpenOutputFilesWithFrame().

52  {
53  ProcessingFrame const frame{ScheduleID{}};
55  }
virtual void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::Modifier::fillProductDescriptions ( )
inherited

Definition at line 10 of file Modifier.cc.

References art::ProductRegistryHelper::fillDescriptions(), and art::ModuleBase::moduleDescription().

11  {
13  }
void fillDescriptions(ModuleDescription const &md)
ModuleDescription const & moduleDescription() const
Definition: ModuleBase.cc:13
std::array< std::vector< ProductInfo >, NumBranchTypes > const & art::ModuleBase::getConsumables ( ) const
inherited

Definition at line 43 of file ModuleBase.cc.

References art::ModuleBase::collector_, and art::ConsumesCollector::getConsumables().

44  {
45  return collector_.getConsumables();
46  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables() const
std::unique_ptr< Worker > art::ModuleBase::makeWorker ( WorkerParams const &  wp)
inherited

Definition at line 37 of file ModuleBase.cc.

References art::ModuleBase::doMakeWorker(), and art::NumBranchTypes.

38  {
39  return doMakeWorker(wp);
40  }
virtual std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp)=0
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::mayConsume ( InputTag const &  tag)
protectedinherited

Definition at line 82 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsume().

83  {
84  return collector_.mayConsume<T, BT>(tag);
85  }
ProductToken< T > mayConsume(InputTag const &)
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename T , BranchType BT>
void art::ModuleBase::mayConsumeMany ( )
protectedinherited

Definition at line 96 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeMany().

97  {
98  collector_.mayConsumeMany<T, BT>();
99  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::mayConsumeView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::mayConsumeView ( InputTag const &  tag)
inherited

Definition at line 89 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeView().

90  {
91  return collector_.mayConsumeView<T, BT>(tag);
92  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ViewToken< Element > mayConsumeView(InputTag const &)
ModuleDescription const & art::ModuleBase::moduleDescription ( ) const
inherited

Definition at line 13 of file ModuleBase.cc.

References art::errors::LogicError.

Referenced by art::OutputModule::doRespondToOpenInputFile(), art::OutputModule::doWriteEvent(), art::Modifier::fillProductDescriptions(), art::OutputModule::makePlugins_(), art::OutputWorker::OutputWorker(), reco::shower::LArPandoraModularShowerCreation::produce(), art::Modifier::registerProducts(), and art::OutputModule::registerProducts().

14  {
15  if (md_.has_value()) {
16  return *md_;
17  }
18 
20  "There was an error while calling moduleDescription().\n"}
21  << "The moduleDescription() base-class member function cannot be called\n"
22  "during module construction. To determine which module is "
23  "responsible\n"
24  "for calling it, find the '<module type>:<module "
25  "label>@Construction'\n"
26  "tag in the message prefix above. Please contact artists@fnal.gov\n"
27  "for guidance.\n";
28  }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::optional< ModuleDescription > md_
Definition: ModuleBase.h:55
void evgen::TextFileGen::produce ( art::Event e)
overridevirtual

Implements art::EDProducer.

Definition at line 144 of file TextFileGen_module.cc.

References fInputFile, fInputFileName, art::Event::put(), and readNextHepEvt().

145 {
146  // check that the file is still good
147  if (!fInputFile->good())
148  throw cet::exception("TextFileGen")
149  << "input text file " << fInputFileName << " cannot be read in produce().\n";
150 
151  //Now, read the Event to be used.
152 
153  // check that the file is still good
154  if (!fInputFile->good())
155  throw cet::exception("TextFileGen")
156  << "input text file " << fInputFileName << " cannot be read in produce().\n";
157  auto truthcol = std::make_unique<std::vector<simb::MCTruth>>();
158  truthcol->push_back(readNextHepEvt());
159 
160  e.put(std::move(truthcol));
161 }
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: Event.h:77
std::string fInputFileName
Name of text file containing events to simulate.
std::ifstream * fInputFile
simb::MCTruth readNextHepEvt()
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
std::pair< unsigned, unsigned > evgen::TextFileGen::readEventInfo ( std::istream &  is)
private

Definition at line 228 of file TextFileGen_module.cc.

References DEFINE_ART_MODULE.

Referenced by beginJob(), and readNextHepEvt().

229 {
230  std::string line;
231  getline(iss, line);
232  std::istringstream buffer{line};
233 
234  // Parse read line for the event number and particles per event
235  unsigned event, nparticles;
236  buffer >> event >> nparticles;
237  return {event, nparticles};
238 }
Event finding and building.
simb::MCTruth evgen::TextFileGen::readNextHepEvt ( )
private

Definition at line 163 of file TextFileGen_module.cc.

References simb::MCTruth::Add(), simb::MCParticle::AddTrajectoryPoint(), energy, fInputFile, fMoveY, part, and readEventInfo().

Referenced by produce().

164 {
165 
166  // declare the variables for reading in the event record
167  int status = 0;
168  int pdg = 0;
169  int firstMother = 0;
170  int secondMother = 0;
171  int firstDaughter = 0;
172  int secondDaughter = 0;
173  double xMomentum = 0.;
174  double yMomentum = 0.;
175  double zMomentum = 0.;
176  double energy = 0.;
177  double mass = 0.;
178  double xPosition = 0.;
179  double yPosition = 0.;
180  double zPosition = 0.;
181  double time = 0.;
182 
183  // read in line to get event number and number of particles
184  std::string oneLine;
185  std::istringstream inputLine;
186  simb::MCTruth nextEvent;
187  auto const [eventNo, nParticles] = readEventInfo(*fInputFile);
188 
189  // now read in all the lines for the particles
190  // in this interaction. only particles with
191  // status = 1 get tracked in Geant4.
192  for (unsigned short i = 0; i < nParticles; ++i) {
193  std::getline(*fInputFile, oneLine);
194  inputLine.clear();
195  inputLine.str(oneLine);
196 
197  inputLine >> status >> pdg >> firstMother >> secondMother >> firstDaughter >> secondDaughter >>
198  xMomentum >> yMomentum >> zMomentum >> energy >> mass >> xPosition >> yPosition >>
199  zPosition >> time;
200 
201  //Project the particle to a new y plane
202  if (fMoveY > -1e8) {
203  double totmom = sqrt(pow(xMomentum, 2) + pow(yMomentum, 2) + pow(zMomentum, 2));
204  double kx = xMomentum / totmom;
205  double ky = yMomentum / totmom;
206  double kz = zMomentum / totmom;
207  if (ky) {
208  double l = (fMoveY - yPosition) / ky;
209  xPosition += kx * l;
210  yPosition += ky * l;
211  zPosition += kz * l;
212  }
213  }
214 
215  TLorentzVector pos(xPosition, yPosition, zPosition, time);
216  TLorentzVector mom(xMomentum, yMomentum, zMomentum, energy);
217 
218  simb::MCParticle part(i, pdg, "primary", firstMother, mass, status);
219  part.AddTrajectoryPoint(pos, mom);
220 
221  nextEvent.Add(part);
222 
223  } // end loop on particles.
224 
225  return nextEvent;
226 }
std::pair< unsigned, unsigned > readEventInfo(std::istream &is)
std::ifstream * fInputFile
TString part[npart]
Definition: Style.C:32
double energy
Definition: plottest35.C:25
void Add(simb::MCParticle const &part)
Definition: MCTruth.h:80
Event generator information.
Definition: MCTruth.h:32
double fMoveY
Project particles to a new y plane.
void art::Modifier::registerProducts ( ProductDescriptions productsToRegister)
inherited

Definition at line 16 of file Modifier.cc.

References art::ModuleBase::moduleDescription(), and art::ProductRegistryHelper::registerProducts().

17  {
18  ProductRegistryHelper::registerProducts(productsToRegister,
20  }
void registerProducts(ProductDescriptions &productsToRegister, ModuleDescription const &md)
ModuleDescription const & moduleDescription() const
Definition: ModuleBase.cc:13
void art::ModuleBase::setModuleDescription ( ModuleDescription const &  md)
inherited

Definition at line 31 of file ModuleBase.cc.

References art::ModuleBase::md_.

32  {
33  md_ = md;
34  }
std::optional< ModuleDescription > md_
Definition: ModuleBase.h:55
void art::ModuleBase::sortConsumables ( std::string const &  current_process_name)
inherited

Definition at line 49 of file ModuleBase.cc.

References art::ModuleBase::collector_, and art::ConsumesCollector::sortConsumables().

50  {
51  // Now that we know we have seen all the consumes declarations,
52  // sort the results for fast lookup later.
53  collector_.sortConsumables(current_process_name);
54  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
void sortConsumables(std::string const &current_process_name)

Member Data Documentation

std::ifstream* evgen::TextFileGen::fInputFile
private

Definition at line 95 of file TextFileGen_module.cc.

Referenced by beginJob(), produce(), readNextHepEvt(), and TextFileGen().

std::string evgen::TextFileGen::fInputFileName
private

Name of text file containing events to simulate.

Definition at line 96 of file TextFileGen_module.cc.

Referenced by beginJob(), produce(), and TextFileGen().

double evgen::TextFileGen::fMoveY
private

Project particles to a new y plane.

Definition at line 97 of file TextFileGen_module.cc.

Referenced by readNextHepEvt(), and TextFileGen().

unsigned long int evgen::TextFileGen::fOffset
private

Definition at line 94 of file TextFileGen_module.cc.

Referenced by beginJob(), and TextFileGen().


The documentation for this class was generated from the following file: