CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
statemachine::HandleFiles Class Reference

#include <EPStates.h>

Inheritance diagram for statemachine::HandleFiles:

Public Types

typedef mpl::list
< sc::transition< Event, Error >
, sc::transition< Lumi, Error >
, sc::transition< Run, Error >
, sc::transition< File, Error >
, sc::transition< Stop,
EndingLoop >, sc::transition
< Restart, Error > > 
reactions
 

Public Member Functions

void closeFiles ()
 
void exit ()
 
void goToNewInputFile ()
 
 HandleFiles (my_context ctx)
 
bool shouldWeCloseOutput ()
 
 ~HandleFiles ()
 

Private Attributes

edm::IEventProcessorep_
 
bool exitCalled_
 

Detailed Description

Definition at line 134 of file EPStates.h.

Member Typedef Documentation

typedef mpl::list< sc::transition<Event, Error>, sc::transition<Lumi, Error>, sc::transition<Run, Error>, sc::transition<File, Error>, sc::transition<Stop, EndingLoop>, sc::transition<Restart, Error> > statemachine::HandleFiles::reactions

Definition at line 147 of file EPStates.h.

Constructor & Destructor Documentation

statemachine::HandleFiles::HandleFiles ( my_context  ctx)

Definition at line 56 of file EPStates.cc.

56  :
57  my_base(ctx),
58  ep_(context<Machine>().ep()),
59  exitCalled_(false) { }
edm::IEventProcessor & ep_
Definition: EPStates.h:153
statemachine::HandleFiles::~HandleFiles ( )

Definition at line 67 of file EPStates.cc.

References closeFiles(), ep_, exitCalled_, argparse::message, runTheMatrix::msg, and edm::IEventProcessor::setExceptionMessageFiles().

67  {
68  if (!exitCalled_) {
69  try {
70  closeFiles();
71  }
72  catch (...) {
73  std::ostringstream message;
74  message << "------------------------------------------------------------\n"
75  << "Another exception was caught while trying to clean up after the primary fatal exception.\n"
76  << " We give up trying to clean up at this point.\n";
77  std::string msg(message.str());
79  }
80  }
81  }
virtual void setExceptionMessageFiles(std::string &message)=0
edm::IEventProcessor & ep_
Definition: EPStates.h:153
string message
Definition: argparse.py:126

Member Function Documentation

void statemachine::HandleFiles::closeFiles ( )
void statemachine::HandleFiles::exit ( )

Definition at line 61 of file EPStates.cc.

References edm::IEventProcessor::alreadyHandlingException(), closeFiles(), ep_, and exitCalled_.

Referenced by argparse.ArgumentParser::error().

61  {
62  if (ep_.alreadyHandlingException()) return;
63  exitCalled_ = true;
64  closeFiles();
65  }
edm::IEventProcessor & ep_
Definition: EPStates.h:153
virtual bool alreadyHandlingException() const =0
void statemachine::HandleFiles::goToNewInputFile ( )
bool statemachine::HandleFiles::shouldWeCloseOutput ( )

Definition at line 98 of file EPStates.cc.

References ep_, dtDQMClient_cfg::fileMode, statemachine::NOMERGE, and edm::IEventProcessor::shouldWeCloseOutput().

98  {
99  if (context<Machine>().fileMode() == NOMERGE) return true;
100  return ep_.shouldWeCloseOutput();
101  }
edm::IEventProcessor & ep_
Definition: EPStates.h:153
virtual bool shouldWeCloseOutput() const =0

Member Data Documentation

edm::IEventProcessor& statemachine::HandleFiles::ep_
private

Definition at line 153 of file EPStates.h.

Referenced by closeFiles(), exit(), goToNewInputFile(), shouldWeCloseOutput(), and ~HandleFiles().

bool statemachine::HandleFiles::exitCalled_
private

Definition at line 154 of file EPStates.h.

Referenced by exit(), and ~HandleFiles().