CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
IEventProcessor.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_IEventProcessor_h
2 #define FWCore_Framework_IEventProcessor_h
3 
4 /*
5 Abstract base class for Event Processors
6 
7 Original Authors: W. David Dagenhart, Marc Paterno
8 */
9 
13 
14 
15 #include <string>
16 
17 namespace statemachine {
18  class Restart;
19  class Run;
20 }
21 
22 namespace edm {
24  public:
25 
26  // Status codes:
27  // 0 successful completion
28  // 1 exception of unknown type caught
29  // 2 everything else
30  // 3 signal received
31  // 4 input complete
32  // 5 call timed out
33  // 6 input count complete
36 
37  // Eventually, we might replace StatusCode with a class. This
38  // class should have an automatic conversion to 'int'.
39  typedef Status StatusCode ;
40 
41  virtual ~IEventProcessor();
42 
43  virtual StatusCode runToCompletion() = 0;
44 
45  virtual void readFile() = 0;
46  virtual void closeInputFile(bool cleaningUpAfterException) = 0;
47  virtual void openOutputFiles() = 0;
48  virtual void closeOutputFiles() = 0;
49 
50  virtual void respondToOpenInputFile() = 0;
51  virtual void respondToCloseInputFile() = 0;
52 
53  virtual void startingNewLoop() = 0;
54  virtual bool endOfLoop() = 0;
55  virtual void rewindInput() = 0;
56  virtual void prepareForNextLoop() = 0;
57  virtual bool shouldWeCloseOutput() const = 0;
58 
59  virtual void doErrorStuff() = 0;
60 
61  virtual void beginRun(statemachine::Run const& run) = 0;
62  virtual void endRun(statemachine::Run const& run, bool cleaningUpAfterException) = 0;
63 
64  virtual void beginLumi(ProcessHistoryID const& phid, RunNumber_t run, LuminosityBlockNumber_t lumi) = 0;
65  virtual void endLumi(ProcessHistoryID const& phid, RunNumber_t run, LuminosityBlockNumber_t lumi, bool cleaningUpAfterException) = 0;
66 
67  virtual statemachine::Run readRun() = 0;
68  virtual statemachine::Run readAndMergeRun() = 0;
69  virtual int readLuminosityBlock() = 0;
70  virtual int readAndMergeLumi() = 0;
71  virtual void writeRun(statemachine::Run const& run) = 0;
72  virtual void deleteRunFromCache(statemachine::Run const& run) = 0;
73  virtual void writeLumi(ProcessHistoryID const& phid, RunNumber_t run, LuminosityBlockNumber_t lumi) = 0;
75 
76  virtual void readAndProcessEvent() = 0;
77  virtual bool shouldWeStop() const = 0;
78 
79  virtual void setExceptionMessageFiles(std::string& message) = 0;
80  virtual void setExceptionMessageRuns(std::string& message) = 0;
81  virtual void setExceptionMessageLumis(std::string& message) = 0;
82 
83  virtual bool alreadyHandlingException() const = 0;
84  };
85 }
86 
87 #endif
virtual void endRun(statemachine::Run const &run, bool cleaningUpAfterException)=0
virtual void setExceptionMessageFiles(std::string &message)=0
virtual void beginLumi(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi)=0
tuple lumi
Definition: fjr2json.py:35
virtual bool shouldWeStop() const =0
virtual void writeLumi(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi)=0
virtual void openOutputFiles()=0
virtual void readAndProcessEvent()=0
unsigned int LuminosityBlockNumber_t
virtual void setExceptionMessageLumis(std::string &message)=0
virtual int readLuminosityBlock()=0
virtual void rewindInput()=0
virtual void startingNewLoop()=0
virtual statemachine::Run readAndMergeRun()=0
virtual void readFile()=0
virtual void endLumi(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi, bool cleaningUpAfterException)=0
virtual void deleteRunFromCache(statemachine::Run const &run)=0
virtual bool shouldWeCloseOutput() const =0
virtual void closeOutputFiles()=0
virtual void respondToOpenInputFile()=0
virtual void respondToCloseInputFile()=0
virtual StatusCode runToCompletion()=0
virtual bool alreadyHandlingException() const =0
virtual statemachine::Run readRun()=0
virtual void setExceptionMessageRuns(std::string &message)=0
virtual int readAndMergeLumi()=0
virtual bool endOfLoop()=0
virtual void closeInputFile(bool cleaningUpAfterException)=0
unsigned int RunNumber_t
virtual void doErrorStuff()=0
virtual void beginRun(statemachine::Run const &run)=0
virtual void deleteLumiFromCache(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi)=0
virtual void writeRun(statemachine::Run const &run)=0
virtual void prepareForNextLoop()=0