1 #ifndef FWCore_Framework_EventProcessor_h
2 #define FWCore_Framework_EventProcessor_h
26 #include "boost/shared_ptr.hpp"
27 #include "boost/thread/condition.hpp"
35 namespace statemachine {
43 class BranchIDListHelper;
45 class HistoryAppender;
48 namespace eventsetup {
50 class EventSetupsController;
53 namespace event_processor {
81 std::vector<std::string>
const& defaultServices = std::vector<std::string>(),
82 std::vector<std::string>
const& forcedServices = std::vector<std::string>());
87 std::vector<std::string>
const& defaultServices,
88 std::vector<std::string>
const& forcedServices = std::vector<std::string>());
165 std::vector<ModuleDescription const*>
294 void init(boost::shared_ptr<ProcessDesc>& processDesc,
328 boost::shared_ptr<ProductRegistry const>
preg_;
333 boost::shared_ptr<eventsetup::EventSetupProvider>
esp_;
353 std::unique_ptr<FileBlock>
fb_;
std::string emptyRunLumiMode_
unsigned int numberOfSequentialEventsPerChild_
event_processor::State getState() const
virtual void closeOutputFiles()
static boost::mutex mutex
bool stateMachineWasInErrorState_
StatusCode waitForAsyncCompletion(unsigned int timeout_seconds)
boost::shared_ptr< boost::thread > event_loop_
virtual void beginLumi(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi)
ActivityRegistry::PostProcessEvent postProcessEventSignal_
bool alreadyHandlingException_
boost::shared_ptr< EDLooperBase > looper_
virtual void setExceptionMessageFiles(std::string &message)
void possiblyContinueAfterForkChildFailure()
virtual void writeLumi(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi)
void clearCounters()
Clears counters used by trigger report.
int numberOfForkedChildren_
StatusCode doneAsync(event_processor::Msg m)
virtual StatusCode runToCompletion(bool onlineStateTransitions)
boost::shared_ptr< ActivityRegistry > actReg_
StatusCode shutdownAsync(unsigned int timeout_secs=60 *2)
void setRunNumber(RunNumber_t runNumber)
virtual void deleteRunFromCache(statemachine::Run const &run)
virtual void rewindInput()
std::set< std::pair< std::string, std::string > > ExcludedData
std::auto_ptr< statemachine::Machine > createStateMachine()
std::string exceptionMessageRuns_
unsigned int LuminosityBlockNumber_t
char const * msgName(event_processor::Msg m) const
EventProcessor(std::string const &config, ServiceToken const &token=ServiceToken(), serviceregistry::ServiceLegacy=serviceregistry::kOverlapIsError, std::vector< std::string > const &defaultServices=std::vector< std::string >(), std::vector< std::string > const &forcedServices=std::vector< std::string >())
bool forkProcess(std::string const &jobReportFile)
virtual void beginRun(statemachine::Run const &run)
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
StatusCode waitTillDoneAsync(unsigned int timeout_seconds=0)
boost::condition stopper_
bool continueAfterChildFailure_
std::string last_error_text_
void terminateMachine(std::auto_ptr< statemachine::Machine > &)
virtual int readAndCacheLumi()
ServiceToken serviceToken_
bool endPathsEnabled() const
virtual bool alreadyHandlingException() const
std::string exceptionMessageLumis_
virtual void setExceptionMessageLumis(std::string &message)
boost::shared_ptr< ProcessConfiguration const > processConfiguration_
virtual void setExceptionMessageRuns(std::string &message)
std::unique_ptr< HistoryAppender > historyAppender_
std::unique_ptr< FileBlock > fb_
ExcludedDataMap eventSetupDataToExcludeFromPrefetching_
void declareRunNumber(RunNumber_t runNumber)
virtual void readAndProcessEvent()
volatile event_processor::State state_
EventProcessor & operator=(EventProcessor const &)=delete
void connectSigs(EventProcessor *ep)
static void asyncRun(EventProcessor *)
std::auto_ptr< Schedule > schedule_
ActivityRegistry::PostProcessEvent & postProcessEventSignal()
char const * stateName(event_processor::State s) const
std::string exceptionMessageFiles_
boost::shared_ptr< ProductRegistry const > preg_
virtual statemachine::Run readAndMergeRun()
char const * currentStateName() const
virtual void respondToCloseInputFile()
volatile pthread_t event_loop_id_
ActivityRegistry::PreProcessEvent & preProcessEventSignal()
virtual void writeRun(statemachine::Run const &run)
void changeState(event_processor::Msg)
virtual statemachine::Run readAndCacheRun()
virtual void respondToOpenInputFile()
virtual bool shouldWeCloseOutput() const
virtual void doErrorStuff()
StatusCode statusAsync() const
virtual void endLumi(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi, bool cleaningUpAfterException)
virtual void respondToOpenOutputFiles()
std::unique_ptr< InputSource > input_
std::map< std::string, ExcludedData > ExcludedDataMap
virtual void openOutputFiles()
void init(boost::shared_ptr< ProcessDesc > &processDesc, ServiceToken const &token, serviceregistry::ServiceLegacy)
bool forceESCacheClearOnNewRun_
boost::condition starter_
virtual void deleteLumiFromCache(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi)
virtual void closeInputFile(bool cleaningUpAfterException)
int totalEventsFailed() const
virtual void respondToCloseOutputFiles()
virtual void prepareForNextLoop()
virtual void endRun(statemachine::Run const &run, bool cleaningUpAfterException)
std::auto_ptr< SubProcess > subProcess_
virtual void startingNewLoop()
ActivityRegistry::PreProcessEvent preProcessEventSignal_
StatusCode stopAsync(unsigned int timeout_secs=60 *2)
std::unique_ptr< ActionTable const > act_table_
std::vector< ModuleDescription const * > getAllModuleDescriptions() const
std::unique_ptr< eventsetup::EventSetupsController > espController_
int totalEventsPassed() const
virtual int readAndMergeLumi()
boost::shared_ptr< BranchIDListHelper > branchIDListHelper_
PrincipalCache principalCache_
bool hasSubProcess() const
virtual bool shouldWeStop() const
void enableEndPaths(bool active)
void getTriggerReport(TriggerReport &rep) const