Public Member Functions | Private Member Functions | Private Attributes | List of all members
WireCell::Root::RootfileCreation_depos Class Reference

#include <RootfileCreation.h>

Inheritance diagram for WireCell::Root::RootfileCreation_depos:
WireCell::IDepoFilter WireCell::IConfigurable WireCell::IFunctionNode< IDepo, IDepo > WireCell::IComponent< IConfigurable > WireCell::IFunctionNodeBase WireCell::Interface WireCell::INode WireCell::IComponent< INode > WireCell::Interface

Public Member Functions

 RootfileCreation_depos ()
 
virtual ~RootfileCreation_depos ()
 
virtual bool operator() (const WireCell::IDepo::pointer &indepo, WireCell::IDepo::pointer &outdepo)
 The calling signature: More...
 
virtual WireCell::Configuration default_configuration () const
 IConfigurable. More...
 
virtual void configure (const WireCell::Configuration &config)
 Accept a configuration. More...
 
- Public Member Functions inherited from WireCell::IDepoFilter
virtual ~IDepoFilter ()
 
virtual std::string signature ()
 Set the signature for all subclasses. More...
 
- Public Member Functions inherited from WireCell::IFunctionNode< IDepo, IDepo >
virtual ~IFunctionNode ()
 
virtual bool operator() (const boost::any &anyin, boost::any &anyout)
 The calling signature: More...
 
virtual std::vector< std::stringinput_types ()
 
virtual std::vector< std::stringoutput_types ()
 
- Public Member Functions inherited from WireCell::IFunctionNodeBase
virtual ~IFunctionNodeBase ()
 
virtual NodeCategory category ()
 Return the behavior category type. More...
 
virtual int concurrency ()
 By default assume all subclasses are stateless. More...
 
- Public Member Functions inherited from WireCell::INode
virtual ~INode ()
 
virtual void reset ()
 
- Public Member Functions inherited from WireCell::IComponent< INode >
virtual ~IComponent ()
 
- Public Member Functions inherited from WireCell::Interface
virtual ~Interface ()
 
- Public Member Functions inherited from WireCell::IConfigurable
virtual ~IConfigurable ()
 
- Public Member Functions inherited from WireCell::IComponent< IConfigurable >
virtual ~IComponent ()
 

Private Member Functions

void create_file ()
 

Private Attributes

Configuration m_cfg
 

Additional Inherited Members

- Public Types inherited from WireCell::IDepoFilter
typedef std::shared_ptr< IDepoFilterpointer
 
- Public Types inherited from WireCell::IFunctionNode< IDepo, IDepo >
typedef IDepo input_type
 
typedef IDepo output_type
 
typedef std::shared_ptr< const IDepoinput_pointer
 
typedef std::shared_ptr< const IDepooutput_pointer
 
typedef IFunctionNode< IDepo, IDeposignature_type
 
- Public Types inherited from WireCell::IFunctionNodeBase
typedef std::shared_ptr< IFunctionNodeBasepointer
 
- Public Types inherited from WireCell::INode
enum  NodeCategory {
  unknown, sourceNode, sinkNode, functionNode,
  queuedoutNode, joinNode, splitNode, faninNode,
  fanoutNode, multioutNode, hydraNode
}
 
- Public Types inherited from WireCell::IComponent< INode >
typedef std::shared_ptr< INodepointer
 Access subclass facet by pointer. More...
 
typedef std::vector< pointervector
 Vector of shared pointers. More...
 
- Public Types inherited from WireCell::Interface
typedef std::shared_ptr< Interfacepointer
 
- Public Types inherited from WireCell::IComponent< IConfigurable >
typedef std::shared_ptr< IConfigurablepointer
 Access subclass facet by pointer. More...
 
typedef std::vector< pointervector
 Vector of shared pointers. More...
 

Detailed Description

Definition at line 13 of file RootfileCreation.h.

Constructor & Destructor Documentation

Root::RootfileCreation_depos::RootfileCreation_depos ( )

Definition at line 16 of file RootfileCreation.cxx.

16  {
17 }
Root::RootfileCreation_depos::~RootfileCreation_depos ( )
virtual

Definition at line 19 of file RootfileCreation.cxx.

19  {
20 }

Member Function Documentation

void Root::RootfileCreation_depos::configure ( const WireCell::Configuration config)
virtual

Accept a configuration.

Implements WireCell::IConfigurable.

Definition at line 23 of file RootfileCreation.cxx.

void Root::RootfileCreation_depos::create_file ( )
private

Definition at line 49 of file RootfileCreation.cxx.

49  {
50  const std::string ofname = m_cfg["output_filename"].asString();
51  const std::string mode = m_cfg["root_file_mode"].asString();
52  TFile* output_tf = TFile::Open(ofname.c_str(), mode.c_str());
53  output_tf->Close("R");
54  delete output_tf;
55  output_tf = nullptr;
56 }
std::string string
Definition: nybbler.cc:12
WireCell::Configuration Root::RootfileCreation_depos::default_configuration ( ) const
virtual

IConfigurable.

Reimplemented from WireCell::IConfigurable.

Definition at line 29 of file RootfileCreation.cxx.

30 {
32  cfg["output_filename"] = "";
33  cfg["root_file_mode"] = "RECREATE";
34  return cfg;
35 }
cfg
Definition: dbjson.py:29
Json::Value Configuration
Definition: Configuration.h:50
bool Root::RootfileCreation_depos::operator() ( const WireCell::IDepo::pointer in,
WireCell::IDepo::pointer out 
)
virtual

The calling signature:

Implements WireCell::IFunctionNode< IDepo, IDepo >.

Definition at line 37 of file RootfileCreation.cxx.

39 {
40  outdepo = indepo;
41  if (!indepo) {
42  // eos
43  std::cerr << "RootfileCreation_depos: EOS\n";
44  return true;
45  }
46  return true;
47 }

Member Data Documentation

Configuration WireCell::Root::RootfileCreation_depos::m_cfg
private

Definition at line 28 of file RootfileCreation.h.


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