Public Member Functions | |
AsciiOutputModule (ParameterSet const &pset) | |
virtual | ~AsciiOutputModule () |
Static Public Member Functions | |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
Private Member Functions | |
virtual void | write (EventPrincipal const &e) |
virtual void | writeLuminosityBlock (LuminosityBlockPrincipal const &) |
virtual void | writeRun (RunPrincipal const &) |
Private Attributes | |
int | counter_ |
int | prescale_ |
int | verbosity_ |
Definition at line 19 of file AsciiOutputModule.cc.
edm::AsciiOutputModule::AsciiOutputModule | ( | ParameterSet const & | pset | ) | [explicit] |
Definition at line 35 of file AsciiOutputModule.cc.
References prescale_.
: OutputModule(pset), prescale_(pset.getUntrackedParameter<unsigned int>("prescale")), verbosity_(pset.getUntrackedParameter<unsigned int>("verbosity")), counter_(0) { if (prescale_ == 0) prescale_ = 1; }
edm::AsciiOutputModule::~AsciiOutputModule | ( | ) | [virtual] |
Definition at line 43 of file AsciiOutputModule.cc.
References counter_.
{ LogAbsolute("AsciiOut") << ">>> processed " << counter_ << " events" << std::endl; }
void edm::AsciiOutputModule::fillDescriptions | ( | ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented from edm::OutputModule.
Definition at line 84 of file AsciiOutputModule.cc.
References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), edm::OutputModule::fillDescription(), edm::ParameterDescriptionNode::setComment(), and edm::ParameterSetDescription::setComment().
{ ParameterSetDescription desc; desc.setComment("Outputs event information into text file."); desc.addUntracked("prescale", 1U) ->setComment("prescale factor"); desc.addUntracked("verbosity", 1U) ->setComment("0: no output\n" "1: event ID and timestamp only\n" ">1: full output"); OutputModule::fillDescription(desc); descriptions.add("asciiOutput", desc); }
void edm::AsciiOutputModule::write | ( | EventPrincipal const & | e | ) | [private, virtual] |
Implements edm::OutputModule.
Definition at line 48 of file AsciiOutputModule.cc.
References edm::ProcessHistory::begin(), counter_, edm::ProcessHistory::end(), edm::Principal::getAllProvenance(), i, edm::EventPrincipal::id(), prescale_, edm::Principal::processHistory(), edm::OutputModule::selected(), edm::EventPrincipal::time(), edm::Timestamp::value(), and verbosity_.
{ if ((++counter_ % prescale_) != 0 || verbosity_ <= 0) return; // Run const& run = evt.getRun(); // this is still unused LogAbsolute("AsciiOut")<< ">>> processing event # " << e.id() << " time " << e.time().value() << std::endl; if (verbosity_ <= 1) return; // Write out non-EDProduct contents... // ... list of process-names for (ProcessHistory::const_iterator it = e.processHistory().begin(), itEnd = e.processHistory().end(); it != itEnd; ++it) { LogAbsolute("AsciiOut") << it->processName() << " "; } // ... collision id LogAbsolute("AsciiOut") << '\n' << e.id() << '\n'; // Loop over products, and write some output for each... std::vector<Provenance const*> provs; e.getAllProvenance(provs); for(std::vector<Provenance const*>::const_iterator i = provs.begin(), iEnd = provs.end(); i != iEnd; ++i) { BranchDescription const& desc = (*i)->product(); if (selected(desc)) { LogAbsolute("AsciiOut") << **i << '\n'; } } }
virtual void edm::AsciiOutputModule::writeLuminosityBlock | ( | LuminosityBlockPrincipal const & | ) | [inline, private, virtual] |
virtual void edm::AsciiOutputModule::writeRun | ( | RunPrincipal const & | ) | [inline, private, virtual] |
int edm::AsciiOutputModule::counter_ [private] |
Definition at line 32 of file AsciiOutputModule.cc.
Referenced by write(), and ~AsciiOutputModule().
int edm::AsciiOutputModule::prescale_ [private] |
Definition at line 30 of file AsciiOutputModule.cc.
Referenced by AsciiOutputModule(), and write().
int edm::AsciiOutputModule::verbosity_ [private] |
Definition at line 31 of file AsciiOutputModule.cc.
Referenced by write().