LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::DataFlow Class Reference

Classes

struct  Config
 

Public Member Functions

 DataFlow (fhicl::TableFragment< Config > const &cfg)
 
void preProcessEvent ()
 
void postProcessEvent ()
 
void processEventProvenance (art::Provenance const &prov)
 

Private Attributes

std::ofstream out_
 
int nEvents_
 
std::string colorscheme_
 
int debug_
 

Detailed Description

Definition at line 28 of file DataFlowDumper_module.cc.

Constructor & Destructor Documentation

art::DataFlow::DataFlow ( fhicl::TableFragment< Config > const &  cfg)
explicit

Definition at line 57 of file DataFlowDumper_module.cc.

References art::errors::FileOpenError, and out_.

58  : out_(cfg().dotfile())
59  , nEvents_(0)
60  , colorscheme_(cfg().colorscheme())
61  , debug_(cfg().debuglevel())
62 {
63  if (!out_) {
65  << "Failed to create output file: " << cfg().dotfile();
66  }
67 }
std::string colorscheme_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66

Member Function Documentation

void art::DataFlow::postProcessEvent ( )

Definition at line 76 of file DataFlowDumper_module.cc.

References nEvents_, and out_.

77 {
78  out_ << "}\n\n";
79  ++nEvents_;
80 }
void art::DataFlow::preProcessEvent ( )

Definition at line 70 of file DataFlowDumper_module.cc.

References nEvents_, and out_.

71 {
72  out_ << "digraph d" << nEvents_ << " {\n";
73 }
void art::DataFlow::processEventProvenance ( art::Provenance const &  prov)

Definition at line 187 of file DataFlowDumper_module.cc.

References colorscheme_, debug_, DEFINE_ART_MODULE, out_, art::Provenance::parents(), write_creator_line(), write_parentage_line(), and write_product_node().

188 {
191  for (art::ProductID const parent : p.parents()) {
192  write_parentage_line(p, parent, out_, debug_);
193  }
194 }
std::string colorscheme_
void write_product_node(art::Provenance const &p, std::ostream &os, int debug)
void write_creator_line(art::Provenance const &p, std::string const &colorscheme, std::ostream &os, int debug)
void write_parentage_line(art::Provenance const &p, art::ProductID const parent, std::ostream &os, int debug)

Member Data Documentation

std::string art::DataFlow::colorscheme_
private

Definition at line 51 of file DataFlowDumper_module.cc.

Referenced by processEventProvenance().

int art::DataFlow::debug_
private

Definition at line 52 of file DataFlowDumper_module.cc.

Referenced by processEventProvenance().

int art::DataFlow::nEvents_
private

Definition at line 50 of file DataFlowDumper_module.cc.

Referenced by postProcessEvent(), and preProcessEvent().

std::ofstream art::DataFlow::out_
private

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