CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EPStates.cc
Go to the documentation of this file.
1 
5 
6 #include <exception>
7 #include <sstream>
8 #include <string>
9 #include <cassert>
10 
11 namespace statemachine {
12  namespace {
13  int const INVALID_RUN_NUMBER = 0;
14  int const INVALID_LUMI = 0;
15  Run const INVALID_RUN(edm::ProcessHistoryID(), INVALID_RUN_NUMBER);
16  HandleLumis::LumiID const InvalidLumiID = HandleLumis::LumiID(edm::ProcessHistoryID(), INVALID_RUN_NUMBER, INVALID_LUMI);
17  }
18 
20  processHistoryID_(phid),
21  runNumber_(runNumber) {
22  }
23 
24  Lumi::Lumi(int id) : id_(id) {}
25 
28  EmptyRunLumiMode emptyRunLumiMode) :
29  ep_(ep),
30  fileMode_(fileMode),
31  emptyRunLumiMode_(emptyRunLumiMode) {
32  }
33 
34  edm::IEventProcessor& Machine::ep() const { return *ep_; }
35  FileMode Machine::fileMode() const { return fileMode_; }
37 
40  }
41 
42  void Machine::startingNewLoop(Stop const& stop) {
43  if (ep_->alreadyHandlingException()) return;
45  }
46 
49  ep_->rewindInput();
50  }
51 
52  Starting::Starting(my_context ctx) : my_base(ctx) { }
53 
55 
56  HandleFiles::HandleFiles(my_context ctx) :
57  my_base(ctx),
58  ep_(context<Machine>().ep()),
59  exitCalled_(false) { }
60 
62  if (ep_.alreadyHandlingException()) return;
63  exitCalled_ = true;
64  closeFiles();
65  }
66 
68  if (!exitCalled_) {
69  try {
70  closeFiles();
71  }
72  catch (...) {
73  std::ostringstream message;
74  message << "------------------------------------------------------------\n"
75  << "Another exception was caught while trying to clean up after the primary fatal exception.\n"
76  << " We give up trying to clean up at this point.\n";
77  std::string msg(message.str());
79  }
80  }
81  }
82 
88  }
89 
93 
94  ep_.readFile();
96  }
97 
99  if (context<Machine>().fileMode() == NOMERGE) return true;
100  return ep_.shouldWeCloseOutput();
101  }
102 
103  EndingLoop::EndingLoop(my_context ctx) :
104  my_base(ctx),
105  ep_(context<Machine>().ep())
106  {
107  if (ep_.alreadyHandlingException() || ep_.endOfLoop()) post_event(Stop());
108  else post_event(Restart());
109  }
110 
112 
114  {
115  return terminate();
116  }
117 
118  Error::Error(my_context ctx) :
119  my_base(ctx),
120  ep_(context<Machine>().ep())
121  {
122  post_event(Stop());
123  ep_.doErrorStuff();
124  }
125 
127 
128  class HandleNewInputFile1;
130 
131  FirstFile::FirstFile(my_context ctx) :
132  my_base(ctx),
133  ep_(context<Machine>().ep())
134  {
135  openFiles();
136  }
137 
139 
141  {
142  if (context<HandleFiles>().shouldWeCloseOutput()) {
143  return transit<NewInputAndOutputFiles>();
144  }
145  else {
146  return transit<HandleNewInputFile1>();
147  }
148  }
149 
151  ep_.readFile();
153 
156  }
157 
159  my_base(ctx)
160  {
161  context<HandleFiles>().goToNewInputFile();
162  }
163 
165 
167  {
168  if (context<HandleFiles>().shouldWeCloseOutput()) {
169  return transit<NewInputAndOutputFiles>();
170  }
171  else {
172  return transit<HandleNewInputFile1>();
173  }
174  }
175 
177  my_base(ctx),
178  ep_(context<Machine>().ep())
179  {
181  }
182 
184 
186  {
187  if (context<HandleFiles>().shouldWeCloseOutput()) {
188  return transit<NewInputAndOutputFiles>();
189  }
190  else {
191  return transit<HandleNewInputFile1>();
192  }
193  }
194 
198 
201 
202  ep_.readFile();
204 
207  }
208 
209  HandleRuns::HandleRuns(my_context ctx) :
210  my_base(ctx),
211  ep_(context<Machine>().ep()),
212  exitCalled_(false),
213  beginRunCalled_(false),
214  currentRun_(INVALID_RUN),
215  runException_(false) { }
216 
218  if (ep_.alreadyHandlingException()) return;
219  exitCalled_ = true;
220  finalizeRun();
221  }
222 
224  if (!exitCalled_) {
225  try {
226  finalizeRun();
227  }
228  catch (cms::Exception& e) {
229  std::ostringstream message;
230  message << "------------------------------------------------------------\n"
231  << "Another exception was caught while trying to clean up runs after\n"
232  << "the primary exception. We give up trying to clean up runs at\n"
233  << "this point. The description of this additional exception follows:\n"
234  << "cms::Exception\n"
235  << e.explainSelf();
236  std::string msg(message.str());
238  }
239  catch (std::bad_alloc& e) {
240  std::ostringstream message;
241  message << "------------------------------------------------------------\n"
242  << "Another exception was caught while trying to clean up runs\n"
243  << "after the primary exception. We give up trying to clean up runs\n"
244  << "at this point. This additional exception was a\n"
245  << "std::bad_alloc exception thrown inside HandleRuns::finalizeRun.\n"
246  << "The job has probably exhausted the virtual memory available\n"
247  << "to the process.\n";
248  std::string msg(message.str());
250  }
251  catch (std::exception& e) {
252  std::ostringstream message;
253  message << "------------------------------------------------------------\n"
254  << "Another exception was caught while trying to clean up runs after\n"
255  << "the primary exception. We give up trying to clean up runs at\n"
256  << "this point. This additional exception was a\n"
257  << "standard library exception thrown inside HandleRuns::finalizeRun\n"
258  << e.what() << "\n";
259  std::string msg(message.str());
261  }
262  catch (...) {
263  std::ostringstream message;
264  message << "------------------------------------------------------------\n"
265  << "Another exception was caught while trying to clean up runs after\n"
266  << "the primary exception. We give up trying to clean up runs at\n"
267  << "this point. This additional exception was of unknown type and\n"
268  << "thrown inside HandleRuns::finalizeRun\n";
269  std::string msg(message.str());
271  }
272  }
273  }
274 
276  Run const& HandleRuns::currentRun() const { return currentRun_; }
277  bool HandleRuns::runException() const { return runException_; }
278 
280 
281  runException_ = true;
283  runException_ = false;
284 
285  if (context<Machine>().emptyRunLumiMode() != doNotHandleEmptyRunsAndLumis) {
286  beginRun(currentRun());
287  }
288  }
289 
290  void HandleRuns::beginRun(Run const& run) {
291  beginRunCalled_ = true;
292 
293  runException_ = true;
294  ep_.beginRun(run);
295  runException_ = false;
296  }
297 
298  void HandleRuns::endRun(Run const& run) {
299  beginRunCalled_ = false;
300 
301  runException_ = true;
302  ep_.endRun(run);
303  runException_ = false;
304  }
305 
307  finalizeRun();
308  }
309 
311 
312  if (runException_) return;
313  runException_ = true;
314 
318  currentRun_ = INVALID_RUN;
319  runException_ = false;
320  }
321 
324  }
325 
326  NewRun::NewRun(my_context ctx) :
327  my_base(ctx)
328  {
329  assert(context<HandleRuns>().currentRun() == INVALID_RUN);
330  context<HandleRuns>().setupCurrentRun();
331 
332  // Here we assume that the input source or event processor
333  // will throw if we fail to get a valid run. Therefore
334  // we should not ever fail this assert.
335  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
336  }
337 
339 
341  {
342  if (run == context<HandleRuns>().currentRun()) {
343  return transit<ContinueRun1>();
344  }
345  context<HandleRuns>().finalizeRun();
346  return transit<NewRun>();
347  }
348 
350  {
351  if (!context<HandleFiles>().shouldWeCloseOutput()) {
352  return transit<HandleNewInputFile2>();
353  }
354  return forward_event();
355  }
356 
358  my_base(ctx)
359  {
360  context<HandleFiles>().goToNewInputFile();
361  checkInvariant();
362  }
363 
365  checkInvariant();
366  }
367 
369  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
370  return true;
371  }
372 
374  {
375  checkInvariant();
376 
377  if (context<HandleRuns>().currentRun() != run) {
378  return transit<NewRun, HandleRuns, Run>(&HandleRuns::finalizeRun, run);
379  }
380  else {
381  return transit<ContinueRun1>();
382  }
383  }
384 
386  {
387  checkInvariant();
388  if (!context<HandleFiles>().shouldWeCloseOutput()) {
389  return transit<HandleNewInputFile2>();
390  }
391  return forward_event();
392  }
393 
394  ContinueRun1::ContinueRun1(my_context ctx) :
395  my_base(ctx),
396  ep_(context<Machine>().ep())
397  {
399  checkInvariant();
400  }
401 
403  checkInvariant();
404  }
405 
407  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
408  return true;
409  }
410 
412  {
413  checkInvariant();
414  if (context<HandleRuns>().currentRun() != run) {
415  return transit<NewRun, HandleRuns, Run>(&HandleRuns::finalizeRun, run);
416  }
417  else {
418  return transit<ContinueRun1>();
419  }
420  }
421 
423  {
424  checkInvariant();
425  if (!context<HandleFiles>().shouldWeCloseOutput()) {
426  return transit<HandleNewInputFile2>();
427  }
428  return forward_event();
429  }
430 
432  processHistoryID_(phid),
433  run_(run),
434  lumi_(lumi) {
435  }
436 
437  HandleLumis::HandleLumis(my_context ctx) :
438  my_base(ctx),
439  ep_(context<Machine>().ep()),
442  currentLumi_(InvalidLumiID),
444  {
445  checkInvariant();
446  }
447 
449  if (ep_.alreadyHandlingException()) return;
450  exitCalled_ = true;
451  checkInvariant();
452  if (!lumiException_ && !context<HandleRuns>().runException()) {
453  finalizeLumi();
454  }
455  }
456 
458  if (!exitCalled_) {
459  try {
460  checkInvariant();
461  if (!lumiException_ && !context<HandleRuns>().runException()) {
462  finalizeLumi();
463  }
464  }
465  catch (cms::Exception& e) {
466  std::ostringstream message;
467  message << "------------------------------------------------------------\n"
468  << "Another exception was caught while trying to clean up lumis after\n"
469  << "the primary exception. We give up trying to clean up lumis at\n"
470  << "this point. The description of this additional exception follows:\n"
471  << "cms::Exception\n"
472  << e.explainSelf();
473  std::string msg(message.str());
475  }
476  catch (std::bad_alloc& e) {
477  std::ostringstream message;
478  message << "------------------------------------------------------------\n"
479  << "Another exception was caught while trying to clean up lumis\n"
480  << "after the primary exception. We give up trying to clean up lumis\n"
481  << "at this point. This additional exception was a\n"
482  << "std::bad_alloc exception thrown inside HandleLumis::finalizeLumi.\n"
483  << "The job has probably exhausted the virtual memory available\n"
484  << "to the process.\n";
485  std::string msg(message.str());
487  }
488  catch (std::exception& e) {
489  std::ostringstream message;
490  message << "------------------------------------------------------------\n"
491  << "Another exception was caught while trying to clean up lumis after\n"
492  << "the primary exception. We give up trying to clean up lumis at\n"
493  << "this point. This additional exception was a\n"
494  << "standard library exception thrown inside HandleLumis::finalizeLumi\n"
495  << e.what() << "\n";
496  std::string msg(message.str());
498  }
499  catch (...) {
500  std::ostringstream message;
501  message << "------------------------------------------------------------\n"
502  << "Another exception was caught while trying to clean up lumis after\n"
503  << "the primary exception. We give up trying to clean up lumis at\n"
504  << "this point. This additional exception was of unknown type and\n"
505  << "thrown inside HandleLumis::finalizeLumi\n";
506  std::string msg(message.str());
508  }
509  }
510  }
511 
513  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
514  return true;
515  }
516 
518 
520 
522 
523  Run const& run = context<HandleRuns>().currentRun();
524  assert (run != INVALID_RUN);
525  lumiException_ = true;
527 
528  if (context<Machine>().emptyRunLumiMode() == handleEmptyRunsAndLumis) {
529  assert(context<HandleRuns>().beginRunCalled());
530  ep_.beginLumi(currentLumi().processHistoryID(), currentLumi().run(), currentLumi().lumi());
531  }
532 
533  lumiException_ = false;
534 
535  currentLumiEmpty_ = true;
536  }
537 
539 
540  lumiException_ = true;
541 
542  if (!currentLumiEmpty_ ||
543  context<Machine>().emptyRunLumiMode() == handleEmptyRunsAndLumis) {
544  ep_.endLumi(currentLumi().processHistoryID(), currentLumi().run(), currentLumi().lumi());
545  }
546 
547  ep_.writeLumi(currentLumi().processHistoryID(), currentLumi().run(), currentLumi().lumi());
548  ep_.deleteLumiFromCache(currentLumi().processHistoryID(), currentLumi().run(), currentLumi().lumi());
549  currentLumi_ = InvalidLumiID;
550 
551  lumiException_ = false;
552  }
553 
555  if (currentLumiEmpty_) {
556 
557  if (context<Machine>().emptyRunLumiMode() != handleEmptyRunsAndLumis) {
558  lumiException_ = true;
559  ep_.beginLumi(currentLumi().processHistoryID(), currentLumi().run(), currentLumi().lumi());
560  lumiException_ = false;
561  }
562  currentLumiEmpty_ = false;
563  }
564  }
565 
566  FirstLumi::FirstLumi(my_context ctx) :
567  my_base(ctx)
568  {
569  context<HandleLumis>().setupCurrentLumi();
570  checkInvariant();
571  }
572 
574  checkInvariant();
575  }
576 
578  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
579  assert(context<HandleLumis>().currentLumi().processHistoryID() == context<HandleRuns>().currentRun().processHistoryID());
580  assert(context<HandleLumis>().currentLumi().run() == context<HandleRuns>().currentRun().runNumber());
581  assert(context<HandleLumis>().currentLumi().lumi() != INVALID_LUMI);
582  assert(context<HandleLumis>().currentLumiEmpty() == true);
583  return true;
584  }
585 
587  {
588  if (lumi.id() == context<HandleLumis>().currentLumi().lumi()) {
589  return transit<ContinueLumi>();
590  }
591  return transit<AnotherLumi>();
592  }
593 
595  {
596  checkInvariant();
597  if (!context<HandleFiles>().shouldWeCloseOutput()) {
598  return transit<HandleNewInputFile3>();
599  }
600  return forward_event();
601  }
602 
603  AnotherLumi::AnotherLumi(my_context ctx) :
604  my_base(ctx)
605  {
606  context<HandleLumis>().finalizeLumi();
607  context<HandleLumis>().setupCurrentLumi();
608  checkInvariant();
609  }
610 
612  checkInvariant();
613  }
614 
616  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
617  assert(context<HandleLumis>().currentLumi().processHistoryID() == context<HandleRuns>().currentRun().processHistoryID());
618  assert(context<HandleLumis>().currentLumi().run() == context<HandleRuns>().currentRun().runNumber());
619  assert(context<HandleLumis>().currentLumi().lumi() != INVALID_LUMI);
620  assert(context<HandleLumis>().currentLumiEmpty() == true);
621  return true;
622  }
623 
625  {
626  if (lumi.id() == context<HandleLumis>().currentLumi().lumi()) {
627  return transit<ContinueLumi>();
628  }
629  return transit<AnotherLumi>();
630  }
631 
633  {
634  checkInvariant();
635  if (!context<HandleFiles>().shouldWeCloseOutput()) {
636  return transit<HandleNewInputFile3>();
637  }
638  return forward_event();
639  }
640 
641  HandleEvent::HandleEvent(my_context ctx) :
642  my_base(ctx),
643  ep_(context<Machine>().ep())
644  {
646  checkInvariant();
647  }
648 
650  checkInvariant();
651  }
652 
654  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
655  assert(context<HandleRuns>().beginRunCalled());
656  assert(context<HandleLumis>().currentLumi().processHistoryID() == context<HandleRuns>().currentRun().processHistoryID());
657  assert(context<HandleLumis>().currentLumi().run() == context<HandleRuns>().currentRun().runNumber());
658  assert(context<HandleLumis>().currentLumi().lumi() != INVALID_LUMI);
659  assert(context<HandleLumis>().currentLumiEmpty() == false);
660  return true;
661  }
662 
664  {
665  checkInvariant();
666  if (!context<HandleFiles>().shouldWeCloseOutput()) {
667  return transit<HandleNewInputFile3>();
668  }
669  return forward_event();
670  }
671 
673  markNonEmpty();
675  if (ep_.shouldWeStop()) post_event(Stop());
676  }
677 
679  context<HandleRuns>().beginRunIfNotDoneAlready();
680  context<HandleLumis>().markLumiNonEmpty();
681  }
682 
683 
685  my_base(ctx)
686  {
687  context<HandleFiles>().goToNewInputFile();
688  checkInvariant();
689  }
690 
692  checkInvariant();
693  }
694 
696  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
697  assert(context<HandleLumis>().currentLumi().processHistoryID() == context<HandleRuns>().currentRun().processHistoryID());
698  assert(context<HandleLumis>().currentLumi().run() == context<HandleRuns>().currentRun().runNumber());
699  assert(context<HandleLumis>().currentLumi().lumi() != INVALID_LUMI);
700  return true;
701  }
702 
704  {
705  checkInvariant();
706 
707  if (context<HandleRuns>().currentRun() == run) {
708  return transit<ContinueRun2>();
709  }
710  return forward_event();
711  }
712 
714  {
715  checkInvariant();
716  if (!context<HandleFiles>().shouldWeCloseOutput()) {
717  return transit<HandleNewInputFile3>();
718  }
719  return forward_event();
720  }
721 
722  ContinueRun2::ContinueRun2(my_context ctx) :
723  my_base(ctx),
724  ep_(context<Machine>().ep())
725  {
727  checkInvariant();
728  }
729 
731  checkInvariant();
732  }
733 
735  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
736  assert(context<HandleLumis>().currentLumi().processHistoryID() == context<HandleRuns>().currentRun().processHistoryID());
737  assert(context<HandleLumis>().currentLumi().run() == context<HandleRuns>().currentRun().runNumber());
738  assert(context<HandleLumis>().currentLumi().lumi() != INVALID_LUMI);
739  return true;
740  }
741 
743  {
744  checkInvariant();
745  if (context<HandleRuns>().currentRun() != run) {
746  return forward_event();
747  }
748  else {
749  return transit<ContinueRun2>();
750  }
751  }
752 
754  {
755  checkInvariant();
756 
757  if (context<HandleLumis>().currentLumi().lumi() != lumi.id()) {
758  return transit<AnotherLumi>();
759  }
760  else {
761  return transit<ContinueLumi>();
762  }
763  }
764 
766  {
767  checkInvariant();
768  if (!context<HandleFiles>().shouldWeCloseOutput()) {
769  return transit<HandleNewInputFile3>();
770  }
771  return forward_event();
772  }
773 
774  ContinueLumi::ContinueLumi(my_context ctx) :
775  my_base(ctx),
776  ep_(context<Machine>().ep())
777  {
779  checkInvariant();
780  }
781 
783  checkInvariant();
784  }
785 
787  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
788  assert(context<HandleLumis>().currentLumi().processHistoryID() == context<HandleRuns>().currentRun().processHistoryID());
789  assert(context<HandleLumis>().currentLumi().run() == context<HandleRuns>().currentRun().runNumber());
790  assert(context<HandleLumis>().currentLumi().lumi() != INVALID_LUMI);
791  return true;
792  }
793 
795  {
796  checkInvariant();
797  if (context<HandleLumis>().currentLumi().lumi() != lumi.id()) {
798  return transit<AnotherLumi>();
799  }
800  else {
801  return transit<ContinueLumi>();
802  }
803  }
804 
806  {
807  checkInvariant();
808  if (!context<HandleFiles>().shouldWeCloseOutput()) {
809  return transit<HandleNewInputFile3>();
810  }
811  return forward_event();
812  }
813 }
static const char runNumber_[]
HandleEvent(my_context ctx)
Definition: EPStates.cc:641
sc::result react(File const &file)
Definition: EPStates.cc:140
edm::IEventProcessor & ep_
Definition: EPStates.h:342
FirstFile(my_context ctx)
Definition: EPStates.cc:131
virtual void respondToCloseOutputFiles()=0
edm::IEventProcessor * ep_
Definition: EPStates.h:108
HandleFiles(my_context ctx)
Definition: EPStates.cc:56
Starting(my_context ctx)
Definition: EPStates.cc:52
HandleLumis(my_context ctx)
Definition: EPStates.cc:437
virtual void setExceptionMessageFiles(std::string &message)=0
virtual void writeLumi(ProcessHistoryID const &phid, int run, int lumi)=0
HandleNewInputFile3(my_context ctx)
Definition: EPStates.cc:684
edm::IEventProcessor & ep_
Definition: EPStates.h:178
bool currentLumiEmpty() const
Definition: EPStates.cc:519
edm::IEventProcessor & ep_
Definition: EPStates.h:452
virtual int readAndCacheLumi()=0
virtual std::string explainSelf() const
Definition: Exception.cc:56
FileMode fileMode() const
Definition: EPStates.cc:35
tuple lumi
Definition: fjr2json.py:41
void endRun(Run const &run)
Definition: EPStates.cc:298
edm::IEventProcessor & ep_
Definition: EPStates.h:434
sc::result react(File const &file)
Definition: EPStates.cc:663
sc::result react(File const &file)
Definition: EPStates.cc:185
virtual bool shouldWeStop() const =0
sc::result react(Lumi const &lumi)
Definition: EPStates.cc:794
ContinueLumi(my_context ctx)
Definition: EPStates.cc:774
edm::IEventProcessor & ep_
Definition: EPStates.h:153
virtual void openOutputFiles()=0
virtual void readAndProcessEvent()=0
sc::result react(Run const &run)
Definition: EPStates.cc:373
virtual void setExceptionMessageLumis(std::string &message)=0
virtual void rewindInput()=0
edm::IEventProcessor & ep_
Definition: EPStates.h:308
void startingNewLoop(File const &file)
Definition: EPStates.cc:38
virtual void startingNewLoop()=0
FirstLumi(my_context ctx)
Definition: EPStates.cc:566
EmptyRunLumiMode emptyRunLumiMode_
Definition: EPStates.h:110
virtual void readFile()=0
edm::IEventProcessor & ep() const
Definition: EPStates.cc:34
bool beginRunCalled() const
Definition: EPStates.cc:275
HandleRuns(my_context ctx)
Definition: EPStates.cc:209
edm::IEventProcessor & ep_
Definition: EPStates.h:252
EndingLoop(my_context ctx)
Definition: EPStates.cc:103
virtual void deleteRunFromCache(statemachine::Run const &run)=0
ContinueRun2(my_context ctx)
Definition: EPStates.cc:722
int runNumber() const
Definition: EPStates.h:48
tuple result
Definition: query.py:137
LumiID const & currentLumi() const
Definition: EPStates.cc:517
HandleNewInputFile1(my_context ctx)
Definition: EPStates.cc:158
virtual statemachine::Run readAndCacheRun()=0
edm::IEventProcessor & ep_
Definition: EPStates.h:228
virtual bool shouldWeCloseOutput() const =0
sc::result react(Run const &run)
Definition: EPStates.cc:411
virtual void closeOutputFiles()=0
virtual void respondToOpenOutputFiles()=0
Run const & currentRun() const
Definition: EPStates.cc:276
virtual void deleteLumiFromCache(ProcessHistoryID const &phid, int run, int lumi)=0
ContinueRun1(my_context ctx)
Definition: EPStates.cc:394
edm::IEventProcessor & ep_
Definition: EPStates.h:400
edm::IEventProcessor & ep_
Definition: EPStates.h:196
AnotherLumi(my_context ctx)
Definition: EPStates.cc:603
sc::result react(Lumi const &lumi)
Definition: EPStates.cc:624
virtual void respondToOpenInputFile()=0
virtual void respondToCloseInputFile()=0
virtual void closeInputFile()=0
NewInputAndOutputFiles(my_context ctx)
Definition: EPStates.cc:176
Machine(edm::IEventProcessor *ep, FileMode fileMode, EmptyRunLumiMode emptyRunLumiMode)
Definition: EPStates.cc:26
void rewindAndPrepareForNextLoop(Restart const &restart)
Definition: EPStates.cc:47
NewRun(my_context ctx)
Definition: EPStates.cc:326
sc::result react(Run const &run)
Definition: EPStates.cc:703
sc::result react(Lumi const &lumi)
Definition: EPStates.cc:586
sc::result react(Stop const &)
Definition: EPStates.cc:113
virtual bool alreadyHandlingException() const =0
string message
Definition: argparse.py:126
virtual void endLumi(ProcessHistoryID const &phid, int run, int lumi)=0
HandleNewInputFile2(my_context ctx)
Definition: EPStates.cc:357
int id() const
Definition: EPStates.h:68
edm::IEventProcessor & ep_
Definition: EPStates.h:168
virtual void setExceptionMessageRuns(std::string &message)=0
void beginRun(Run const &run)
Definition: EPStates.cc:290
virtual bool endOfLoop()=0
edm::ProcessHistoryID const & processHistoryID() const
Definition: EPStates.h:47
Run(edm::ProcessHistoryID const &phid, int runNumber)
Definition: EPStates.cc:19
Error(my_context ctx)
Definition: EPStates.cc:118
sc::result react(Run const &run)
Definition: EPStates.cc:340
virtual void doErrorStuff()=0
virtual void beginRun(statemachine::Run const &run)=0
sc::result react(Run const &run)
Definition: EPStates.cc:742
EmptyRunLumiMode emptyRunLumiMode() const
Definition: EPStates.cc:36
LumiID(edm::ProcessHistoryID const &phid, int run, int lumi)
Definition: EPStates.cc:431
sc::result react(File const &file)
Definition: EPStates.cc:166
bool runException() const
Definition: EPStates.cc:277
virtual void writeRun(statemachine::Run const &run)=0
virtual void endRun(statemachine::Run const &run)=0
virtual void beginLumi(ProcessHistoryID const &phid, int run, int lumi)=0
virtual void prepareForNextLoop()=0