1 #ifndef FWCore_Framework_EventProcessor_h
2 #define FWCore_Framework_EventProcessor_h
24 #include "boost/shared_ptr.hpp"
25 #include "boost/scoped_ptr.hpp"
26 #include "boost/thread/condition.hpp"
27 #include "boost/utility.hpp"
35 namespace statemachine {
44 class HistoryAppender;
47 namespace eventsetup {
52 namespace event_processor {
80 std::vector<std::string>
const& defaultServices = std::vector<std::string>(),
81 std::vector<std::string>
const& forcedServices = std::vector<std::string>());
86 std::vector<std::string>
const& defaultServices,
87 std::vector<std::string>
const& forcedServices = std::vector<std::string>());
154 StatusCode run(
int numberEventsToProcess,
bool repeatable =
true);
171 std::vector<ModuleDescription const*>
309 bool forkProcess(std::string
const& jobReportFile);
316 void init(boost::shared_ptr<ProcessDesc>& processDesc,
349 boost::shared_ptr<SignallingProductRegistry>
preg_;
353 boost::shared_ptr<eventsetup::EventSetupProvider>
esp_;
373 boost::shared_ptr<FileBlock>
fb_;
404 return run(-1,
false);
std::string emptyRunLumiMode_
unsigned int numberOfSequentialEventsPerChild_
boost::shared_ptr< SignallingProductRegistry > preg_
boost::shared_ptr< InputSource > input_
event_processor::State getState() const
virtual void beginLumi(ProcessHistoryID const &phid, int run, int lumi)
virtual void closeOutputFiles()
StatusCode skip(int numberToSkip)
static boost::mutex mutex
bool stateMachineWasInErrorState_
StatusCode waitForAsyncCompletion(unsigned int timeout_seconds)
boost::shared_ptr< boost::thread > event_loop_
ActivityRegistry::PostProcessEvent postProcessEventSignal_
bool alreadyHandlingException_
boost::shared_ptr< EDLooperBase > looper_
virtual void setExceptionMessageFiles(std::string &message)
void clearCounters()
Clears counters used by trigger report.
int numberOfForkedChildren_
virtual int readAndCacheLumi(bool merge)
StatusCode doneAsync(event_processor::Msg m)
virtual StatusCode runToCompletion(bool onlineStateTransitions)
virtual statemachine::Run readAndCacheRun(bool merge)
boost::shared_ptr< ActivityRegistry > actReg_
StatusCode shutdownAsync(unsigned int timeout_secs=60 *2)
virtual StatusCode runEventCount(int numberOfEventsToProcess)
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::string exceptionMessageRuns_
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_
std::string last_error_text_
ServiceToken serviceToken_
virtual void endLumi(ProcessHistoryID const &phid, int run, int lumi, bool cleaningUpAfterException)
bool endPathsEnabled() const
virtual bool alreadyHandlingException() const
std::string exceptionMessageLumis_
sigc::signal< void, Event const &, EventSetup const & > PostProcessEvent
virtual void setExceptionMessageLumis(std::string &message)
sigc::signal< void, EventID const &, Timestamp const & > PreProcessEvent
virtual void setExceptionMessageRuns(std::string &message)
ExcludedDataMap eventSetupDataToExcludeFromPrefetching_
void declareRunNumber(RunNumber_t runNumber)
virtual void readAndProcessEvent()
volatile event_processor::State state_
virtual void writeLumi(ProcessHistoryID const &phid, int run, int lumi)
boost::shared_ptr< ProcessConfiguration > processConfiguration_
void connectSigs(EventProcessor *ep)
static void asyncRun(EventProcessor *)
boost::scoped_ptr< eventsetup::EventSetupsController > espController_
std::auto_ptr< statemachine::Machine > machine_
std::auto_ptr< Schedule > schedule_
ActivityRegistry::PostProcessEvent & postProcessEventSignal()
char const * stateName(event_processor::State s) const
std::string exceptionMessageFiles_
StatusCode runCommon(bool onlineStateTransitions, int numberOfEventsToProcess)
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 void respondToOpenInputFile()
virtual bool shouldWeCloseOutput() const
virtual void doErrorStuff()
StatusCode statusAsync() const
bool merge(LuminosityBlockRange &lh, LuminosityBlockRange &rh)
virtual void respondToOpenOutputFiles()
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 closeInputFile(bool cleaningUpAfterException)
boost::shared_ptr< ActionTable const > act_table_
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)
virtual void deleteLumiFromCache(ProcessHistoryID const &phid, int run, int lumi)
std::vector< ModuleDescription const * > getAllModuleDescriptions() const
int totalEventsPassed() const
boost::shared_ptr< FileBlock > fb_
PrincipalCache principalCache_
bool hasSubProcess() const
virtual bool shouldWeStop() const
void enableEndPaths(bool active)
boost::scoped_ptr< HistoryAppender > historyAppender_
void getTriggerReport(TriggerReport &rep) const