1 #ifndef FWCore_Framework_EventProcessor_h 2 #define FWCore_Framework_EventProcessor_h 33 #include "boost/thread/condition.hpp" 50 class ExceptionToActionTable;
51 class BranchIDListHelper;
52 class ThinnedAssociationsHelper;
54 class HistoryAppender;
60 namespace eventsetup {
62 class EventSetupsController;
76 std::vector<std::string>
const& defaultServices = std::vector<std::string>(),
77 std::vector<std::string>
const& forcedServices = std::vector<std::string>());
82 std::vector<std::string>
const& defaultServices,
83 std::vector<std::string>
const& forcedServices = std::vector<std::string>());
121 std::vector<ModuleDescription const*>
122 getAllModuleDescriptions()
const;
129 int totalEvents()
const;
133 int totalEventsPassed()
const;
137 int totalEventsFailed()
const;
141 void enableEndPaths(
bool active);
145 bool endPathsEnabled()
const;
152 void clearCounters();
176 virtual StatusCode runToCompletion()
override;
181 virtual void readFile()
override;
182 virtual void closeInputFile(
bool cleaningUpAfterException)
override;
183 virtual void openOutputFiles()
override;
184 virtual void closeOutputFiles()
override;
186 virtual void respondToOpenInputFile()
override;
187 virtual void respondToCloseInputFile()
override;
189 virtual void startingNewLoop()
override;
190 virtual bool endOfLoop()
override;
191 virtual void rewindInput()
override;
192 virtual void prepareForNextLoop()
override;
193 virtual bool shouldWeCloseOutput()
const override;
195 virtual void doErrorStuff()
override;
205 virtual int readLuminosityBlock()
override;
206 virtual int readAndMergeLumi()
override;
212 virtual void readAndProcessEvent()
override;
213 virtual bool shouldWeStop()
const override;
216 virtual void setExceptionMessageRuns(
std::string& message)
override;
217 virtual void setExceptionMessageLumis(
std::string& message)
override;
219 virtual bool alreadyHandlingException()
const override;
222 bool forkProcess(
std::string const& jobReportFile);
229 void init(std::shared_ptr<ProcessDesc>& processDesc,
233 void terminateMachine(std::unique_ptr<statemachine::Machine>);
234 std::unique_ptr<statemachine::Machine> createStateMachine();
238 void possiblyContinueAfterForkChildFailure();
240 bool readNextEventForStream(
unsigned int iStreamIndex,
241 std::atomic<bool>* finishedProcessingEvents);
243 void handleNextEventForStreamAsync(
WaitingTask* iTask,
244 unsigned int iStreamIndex,
245 std::atomic<bool>* finishedProcessingEvents);
249 void readEvent(
unsigned int iStreamIndex);
253 unsigned int iStreamIndex);
256 bool checkForAsyncStopRequest(StatusCode&);
324 bool firstEventInBlock_=
true;
330 bool printDependencies_ =
false;
338 return runToCompletion();
std::string emptyRunLumiMode_
unsigned int numberOfSequentialEventsPerChild_
ProcessContext processContext_
SharedResourcesAcquirer sourceResourcesAcquirer_
edm::propagate_const< std::unique_ptr< InputSource > > input_
std::unique_ptr< ExceptionToActionTable const > act_table_
bool stateMachineWasInErrorState_
bool alreadyHandlingException_
ProcessConfiguration const & processConfiguration() const
edm::propagate_const< std::unique_ptr< HistoryAppender > > historyAppender_
int numberOfForkedChildren_
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_
bool continueAfterChildFailure_
ServiceToken serviceToken_
std::atomic< bool > deferredExceptionPtrIsSet_
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper() const
std::string exceptionMessageLumis_
std::shared_ptr< ProductRegistry const > preg() const
ExcludedDataMap eventSetupDataToExcludeFromPrefetching_
InputSource::ItemType nextItemTypeFromProcessingEvents_
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()
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_
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_
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_