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

#include <RootfileCreation.h>

Inheritance diagram for WireCell::Root::RootfileCreation_frames:
WireCell::IFrameFilter WireCell::IConfigurable WireCell::IFunctionNode< IFrame, IFrame > WireCell::IComponent< IConfigurable > WireCell::IFunctionNodeBase WireCell::Interface WireCell::INode WireCell::IComponent< INode > WireCell::Interface

Public Member Functions

 RootfileCreation_frames ()
 
virtual ~RootfileCreation_frames ()
 
virtual bool operator() (const IFrame::pointer &in, IFrame::pointer &out)
 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::IFrameFilter
virtual ~IFrameFilter ()
 
virtual std::string signature ()
 Set the signature for all subclasses. More...
 
- Public Member Functions inherited from WireCell::IFunctionNode< IFrame, IFrame >
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::IFrameFilter
typedef std::shared_ptr< IFrameFilterpointer
 
- Public Types inherited from WireCell::IFunctionNode< IFrame, IFrame >
typedef IFrame input_type
 
typedef IFrame output_type
 
typedef std::shared_ptr< const IFrameinput_pointer
 
typedef std::shared_ptr< const IFrameoutput_pointer
 
typedef IFunctionNode< IFrame, IFramesignature_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 32 of file RootfileCreation.h.

Constructor & Destructor Documentation

Root::RootfileCreation_frames::RootfileCreation_frames ( )

Definition at line 59 of file RootfileCreation.cxx.

59  {
60 }
Root::RootfileCreation_frames::~RootfileCreation_frames ( )
virtual

Definition at line 62 of file RootfileCreation.cxx.

62  {
63 }

Member Function Documentation

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

Accept a configuration.

Implements WireCell::IConfigurable.

Definition at line 66 of file RootfileCreation.cxx.

void Root::RootfileCreation_frames::create_file ( )
private

Definition at line 80 of file RootfileCreation.cxx.

80  {
81  const std::string ofname = m_cfg["output_filename"].asString();
82  const std::string mode = m_cfg["root_file_mode"].asString();
83 
84  // std::cout << "Xin: " << ofname << std::endl;
85 
86  TFile* output_tf = TFile::Open(ofname.c_str(), mode.c_str());
87  output_tf->Close("R");
88  delete output_tf;
89  output_tf = nullptr;
90 }
std::string string
Definition: nybbler.cc:12
WireCell::Configuration Root::RootfileCreation_frames::default_configuration ( ) const
virtual

IConfigurable.

Reimplemented from WireCell::IConfigurable.

Definition at line 72 of file RootfileCreation.cxx.

73 {
75  cfg["output_filename"] = "";
76  cfg["root_file_mode"] = "RECREATE";
77  return cfg;
78 }
cfg
Definition: dbjson.py:29
Json::Value Configuration
Definition: Configuration.h:50
bool Root::RootfileCreation_frames::operator() ( const IFrame::pointer in,
IFrame::pointer out 
)
virtual

The calling signature:

Implements WireCell::IFunctionNode< IFrame, IFrame >.

Definition at line 93 of file RootfileCreation.cxx.

93  {
94  out = in;
95  if (!in) {
96  // eos
97  std::cerr << "RootfileCreation_frames: EOS\n";
98  return true;
99  }
100  return true;
101 }

Member Data Documentation

Configuration WireCell::Root::RootfileCreation_frames::m_cfg
private

Definition at line 44 of file RootfileCreation.h.


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