1 #ifndef FWCore_Framework_EventProcessor_h 2 #define FWCore_Framework_EventProcessor_h 46 class ExceptionToActionTable;
47 class BranchIDListHelper;
48 class MergeableRunProductMetadata;
49 class ThinnedAssociationsHelper;
51 class HistoryAppender;
58 namespace eventsetup {
60 class EventSetupsController;
74 enum StatusCode { epSuccess=0, epException=1, epOther=2, epSignal=3,
75 epInputComplete=4, epTimedOut=5, epCountComplete=6 };
85 std::vector<std::string>
const& defaultServices = std::vector<std::string>(),
86 std::vector<std::string>
const& forcedServices = std::vector<std::string>());
91 std::vector<std::string>
const& defaultServices,
92 std::vector<std::string>
const& forcedServices = std::vector<std::string>());
130 std::vector<ModuleDescription const*>
131 getAllModuleDescriptions()
const;
138 int totalEvents()
const;
142 int totalEventsPassed()
const;
146 int totalEventsFailed()
const;
150 void enableEndPaths(
bool active);
154 bool endPathsEnabled()
const;
161 void clearCounters();
192 return lastSourceTransition_;}
193 std::pair<edm::ProcessHistoryID, edm::RunNumber_t> nextRunID();
197 void closeInputFile(
bool cleaningUpAfterException);
198 void openOutputFiles();
199 void closeOutputFiles();
201 void respondToOpenInputFile();
202 void respondToCloseInputFile();
204 void startingNewLoop();
207 void prepareForNextLoop();
208 bool shouldWeCloseOutput()
const;
213 bool& eventSetupForInstanceSucceeded);
216 bool globalBeginSucceeded,
bool cleaningUpAfterException,
217 bool eventSetupForInstanceSucceeded);
220 void endUnfinishedLumi();
223 std::shared_ptr<void>
const& iRunResource,
227 void globalEndLumiAsync(
edm::WaitingTaskHolder iTask, std::shared_ptr<LuminosityBlockProcessingStatus> iLumiStatus);
229 unsigned int iStreamIndex,
230 std::shared_ptr<LuminosityBlockProcessingStatus> iLumiStatus);
231 std::pair<ProcessHistoryID,RunNumber_t> readRun();
232 std::pair<ProcessHistoryID,RunNumber_t> readAndMergeRun();
237 void writeLumiAsync(
WaitingTaskHolder, std::shared_ptr<LuminosityBlockProcessingStatus> );
240 bool shouldWeStop()
const;
242 void setExceptionMessageFiles(
std::string& message);
243 void setExceptionMessageRuns(
std::string& message);
244 void setExceptionMessageLumis(
std::string& message);
246 bool setDeferredException(std::exception_ptr);
253 void init(std::shared_ptr<ProcessDesc>& processDesc,
257 bool readNextEventForStream(
unsigned int iStreamIndex,
261 unsigned int iStreamIndex);
265 void readEvent(
unsigned int iStreamIndex);
269 unsigned int iStreamIndex);
272 unsigned int iStreamIndex);
313 std::atomic<unsigned int> streamLumiActive_{0};
342 bool firstEventInBlock_=
true;
348 bool printDependencies_ =
false;
356 return runToCompletion();
ProcessContext processContext_
SharedResourcesAcquirer sourceResourcesAcquirer_
edm::propagate_const< std::unique_ptr< InputSource > > input_
std::unique_ptr< ExceptionToActionTable const > act_table_
ProcessConfiguration const & processConfiguration() const
edm::propagate_const< std::unique_ptr< HistoryAppender > > historyAppender_
std::unique_ptr< edm::LimitedTaskQueue > lumiQueue_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper() const
edm::propagate_const< std::shared_ptr< ProductRegistry > > preg_
std::set< std::pair< std::string, std::string > > ExcludedData
std::string exceptionMessageRuns_
PreallocationConfiguration preallocations_
unsigned int LuminosityBlockNumber_t
std::vector< SubProcess > subProcesses_
MergeableRunProductProcesses mergeableRunProductProcesses_
ServiceToken serviceToken_
std::atomic< bool > deferredExceptionPtrIsSet_
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper() const
std::string exceptionMessageLumis_
std::shared_ptr< ProductRegistry const > preg() const
std::vector< edm::SerialTaskQueue > streamQueues_
InputSource::ItemType lastTransitionType() const
ExcludedDataMap eventSetupDataToExcludeFromPrefetching_
edm::propagate_const< std::shared_ptr< EDLooperBase > > looper_
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
std::shared_ptr< ProcessConfiguration const > processConfiguration_
std::shared_ptr< std::recursive_mutex > sourceMutex_
std::string exceptionMessageFiles_
std::shared_ptr< BranchIDListHelper > & branchIDListHelper()
std::shared_ptr< EDLooperBase > & looper()
InputSource::ItemType lastSourceTransition_
StatusCode asyncStopStatusCodeFromProcessingEvents_
edm::propagate_const< std::unique_ptr< FileBlock > > fb_
std::map< std::string, ExcludedData > ExcludedDataMap
edm::propagate_const< std::unique_ptr< eventsetup::EventSetupsController > > espController_
bool forceESCacheClearOnNewRun_
std::vector< std::shared_ptr< LuminosityBlockProcessingStatus > > streamLumiStatus_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
std::shared_ptr< ProductRegistry > & preg()
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
std::exception_ptr deferredExceptionPtr_
edm::SerialTaskQueue iovQueue_
PathsAndConsumesOfModules pathsAndConsumesOfModules_
bool asyncStopRequestedWhileProcessingEvents_
std::shared_ptr< ActivityRegistry > actReg_
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
std::shared_ptr< ThinnedAssociationsHelper > & thinnedAssociationsHelper()
std::shared_ptr< EDLooperBase const > looper() const
PrincipalCache principalCache_