File indexing completed on 2024-04-06 12:12:05
0001 #ifndef FWCore_Framework_ProcessingController_h
0002 #define FWCore_Framework_ProcessingController_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "DataFormats/Provenance/interface/EventID.h"
0025
0026
0027 namespace edm {
0028
0029 class ProcessingController {
0030 public:
0031 enum ForwardState {
0032 kEventsAheadInFile,
0033 kNextFileExists,
0034 kAtLastEvent,
0035 kUnknownForward
0036 };
0037
0038 enum ReverseState {
0039 kEventsBackwardsInFile,
0040 kPreviousFileExists,
0041 kAtFirstEvent,
0042 kUnknownReverse
0043 };
0044
0045 ProcessingController(ForwardState forwardState, ReverseState reverseState, bool iCanRandomAccess);
0046 ProcessingController(const ProcessingController&) = delete;
0047 const ProcessingController& operator=(const ProcessingController&) = delete;
0048
0049
0050
0051
0052 ForwardState forwardState() const;
0053 ReverseState reverseState() const;
0054
0055
0056 bool canRandomAccess() const;
0057
0058 enum Transition { kToNextEvent, kToPreviousEvent, kToSpecifiedEvent };
0059
0060 Transition requestedTransition() const;
0061
0062
0063
0064 edm::EventID specifiedEventTransition() const;
0065
0066 bool lastOperationSucceeded() const;
0067
0068
0069
0070
0071
0072
0073
0074
0075 void setTransitionToNextEvent();
0076
0077
0078
0079
0080 void setTransitionToPreviousEvent();
0081
0082
0083
0084
0085 void setTransitionToEvent(edm::EventID const& iID);
0086
0087 void setLastOperationSucceeded(bool value);
0088
0089 private:
0090
0091 ForwardState forwardState_;
0092 ReverseState reverseState_;
0093 Transition transition_;
0094 EventID specifiedEvent_;
0095 bool canRandomAccess_;
0096 bool lastOperationSucceeded_;
0097 };
0098 }
0099 #endif