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(bool onlineStateTransitions) = 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  virtual void respondToOpenOutputFiles() = 0;
53  virtual void respondToCloseOutputFiles() = 0;
54 
55  virtual void startingNewLoop() = 0;
56  virtual bool endOfLoop() = 0;
57  virtual void rewindInput() = 0;
58  virtual void prepareForNextLoop() = 0;
59  virtual bool shouldWeCloseOutput() const = 0;
60 
61  virtual void doErrorStuff() = 0;
62 
63  virtual void beginRun(statemachine::Run const& run) = 0;
64  virtual void endRun(statemachine::Run const& run, bool cleaningUpAfterException) = 0;
65 
66  virtual void beginLumi(ProcessHistoryID const& phid, RunNumber_t run, LuminosityBlockNumber_t lumi) = 0;
67  virtual void endLumi(ProcessHistoryID const& phid, RunNumber_t run, LuminosityBlockNumber_t lumi, bool cleaningUpAfterException) = 0;
68 
69  virtual statemachine::Run readAndCacheRun() = 0;
70  virtual statemachine::Run readAndMergeRun() = 0;
71  virtual int readAndCacheLumi() = 0;
72  virtual int readAndMergeLumi() = 0;
73  virtual void writeRun(statemachine::Run const& run) = 0;
74  virtual void deleteRunFromCache(statemachine::Run const& run) = 0;
75  virtual void writeLumi(ProcessHistoryID const& phid, RunNumber_t run, LuminosityBlockNumber_t lumi) = 0;
77 
78  virtual void readAndProcessEvent() = 0;
79  virtual bool shouldWeStop() const = 0;
80 
81  virtual void setExceptionMessageFiles(std::string& message) = 0;
82  virtual void setExceptionMessageRuns(std::string& message) = 0;
83  virtual void setExceptionMessageLumis(std::string& message) = 0;
84 
85  virtual bool alreadyHandlingException() const = 0;
86  };
87 }
88 
89 #endif
virtual void respondToCloseOutputFiles()=0
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
virtual int readAndCacheLumi()=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
Definition: EventID.h:31
virtual void setExceptionMessageLumis(std::string &message)=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 statemachine::Run readAndCacheRun()=0
virtual bool shouldWeCloseOutput() const =0
virtual void closeOutputFiles()=0
virtual void respondToOpenOutputFiles()=0
virtual void respondToOpenInputFile()=0
virtual void respondToCloseInputFile()=0
virtual bool alreadyHandlingException() const =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
Definition: EventRange.h:32
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 StatusCode runToCompletion(bool onlineStateTransitions)=0
virtual void prepareForNextLoop()=0