All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
sim::DumpOpDetBacktrackerRecords Class Reference
Inheritance diagram for sim::DumpOpDetBacktrackerRecords:

Public Types

using Parameters = art::EDAnalyzer::Table< Config >
 

Public Member Functions

 DumpOpDetBacktrackerRecords (Parameters const &config)
 Configuration-checking constructor. More...
 
 DumpOpDetBacktrackerRecords (DumpOpDetBacktrackerRecords const &)=delete
 
 DumpOpDetBacktrackerRecords (DumpOpDetBacktrackerRecords &&)=delete
 
DumpOpDetBacktrackerRecordsoperator= (DumpOpDetBacktrackerRecords const &)=delete
 
DumpOpDetBacktrackerRecordsoperator= (DumpOpDetBacktrackerRecords &&)=delete
 
void analyze (art::Event const &event) override
 
template<typename Stream >
void DumpOpDetBacktrackerRecord (Stream &&out, sim::OpDetBacktrackerRecord const &simchannel, std::string indent="", bool bIndentFirst=true) const
 Dumps the content of the specified OpDetBacktrackerRecord in the output stream. More...
 

Private Attributes

art::InputTag fInputChannels
 name of OpDetBacktrackerRecord's data product More...
 
std::string fOutputCategory
 name of the stream for output More...
 

Detailed Description

Definition at line 53 of file DumpOpDetBacktrackerRecords_module.cc.

Member Typedef Documentation

using sim::DumpOpDetBacktrackerRecords::Parameters = art::EDAnalyzer::Table<Config>

Definition at line 56 of file DumpOpDetBacktrackerRecords_module.cc.

Constructor & Destructor Documentation

sim::DumpOpDetBacktrackerRecords::DumpOpDetBacktrackerRecords ( Parameters const &  config)
explicit

Configuration-checking constructor.

Definition at line 104 of file DumpOpDetBacktrackerRecords_module.cc.

105  : EDAnalyzer(config)
106  , fInputChannels(config().InputOpDetBacktrackerRecord())
107  , fOutputCategory(config().OutputCategory())
108 {}
art::InputTag fInputChannels
name of OpDetBacktrackerRecord&#39;s data product
std::string fOutputCategory
name of the stream for output
sim::DumpOpDetBacktrackerRecords::DumpOpDetBacktrackerRecords ( DumpOpDetBacktrackerRecords const &  )
delete
sim::DumpOpDetBacktrackerRecords::DumpOpDetBacktrackerRecords ( DumpOpDetBacktrackerRecords &&  )
delete

Member Function Documentation

void sim::DumpOpDetBacktrackerRecords::analyze ( art::Event const &  event)
override

Definition at line 123 of file DumpOpDetBacktrackerRecords_module.cc.

123  {
124 
125  // get the particles from the event
126  auto const& OpDetBacktrackerRecord
127  = *(event.getValidHandle<std::vector<sim::OpDetBacktrackerRecord>>(fInputChannels));
128 
129  mf::LogVerbatim(fOutputCategory) << "Event " << event.id()
130  << " : data product '" << fInputChannels.encode() << "' contains "
131  << OpDetBacktrackerRecord.size() << " OpDetBacktrackerRecord";
132 
133  unsigned int iOpDetBacktrackerRecord = 0;
134  for (sim::OpDetBacktrackerRecord const& simChannel: OpDetBacktrackerRecord) {
135 
136  // a bit of a header
137  mf::LogVerbatim log(fOutputCategory);
138  log << "[#" << (iOpDetBacktrackerRecord++) << "] ";
139  DumpOpDetBacktrackerRecord(log, simChannel, " ", false);
140 
141  } // for
142  mf::LogVerbatim(fOutputCategory) << "\n";
143 
144 } // sim::DumpOpDetBacktrackerRecords::analyze()
art::InputTag fInputChannels
name of OpDetBacktrackerRecord&#39;s data product
Energy deposited on a readout Optical Detector by simulated tracks.
void DumpOpDetBacktrackerRecord(Stream &&out, sim::OpDetBacktrackerRecord const &simchannel, std::string indent="", bool bIndentFirst=true) const
Dumps the content of the specified OpDetBacktrackerRecord in the output stream.
std::string fOutputCategory
name of the stream for output
template<typename Stream >
void sim::DumpOpDetBacktrackerRecords::DumpOpDetBacktrackerRecord ( Stream &&  out,
sim::OpDetBacktrackerRecord const &  simchannel,
std::string  indent = "",
bool  bIndentFirst = true 
) const

Dumps the content of the specified OpDetBacktrackerRecord in the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
simchannelthe OpDetBacktrackerRecord to be dumped
indentbase indentation string (default: none)
bIndentFirstif first output line should be indented (default: yes)

The indent string is prepended to every line of output, with the possible exception of the first one, in case bIndentFirst is true.

The output starts on the current line, and the last line is NOT broken.

Definition at line 113 of file DumpOpDetBacktrackerRecords_module.cc.

116  {
117  if (bIndentFirst) out << indent;
118  channel.Dump(out, indent);
119 } // sim::DumpOpDetBacktrackerRecords::DumpOpDetBacktrackerRecords()
DumpOpDetBacktrackerRecords& sim::DumpOpDetBacktrackerRecords::operator= ( DumpOpDetBacktrackerRecords const &  )
delete
DumpOpDetBacktrackerRecords& sim::DumpOpDetBacktrackerRecords::operator= ( DumpOpDetBacktrackerRecords &&  )
delete

Member Data Documentation

art::InputTag sim::DumpOpDetBacktrackerRecords::fInputChannels
private

name of OpDetBacktrackerRecord's data product

Definition at line 94 of file DumpOpDetBacktrackerRecords_module.cc.

std::string sim::DumpOpDetBacktrackerRecords::fOutputCategory
private

name of the stream for output

Definition at line 95 of file DumpOpDetBacktrackerRecords_module.cc.


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