test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RunHelper.h
Go to the documentation of this file.
1 #ifndef IOPool_Input_RunHelper_h
2 #define IOPool_Input_RunHelper_h
3 
7 
8 #include <memory>
9 #include <vector>
10 
11 namespace edm {
12  class IndexIntoFile;
14 
15  class RunHelperBase {
16  public:
17  explicit RunHelperBase() = default;
18  virtual ~RunHelperBase();
19 
21  InputSource::ItemType const& previousItemType,
22  InputSource::ItemType const& newItemType) {return newItemType;}
23  virtual RunNumber_t runNumberToUseForThisLumi() const {return 0;}
24  virtual bool fakeNewRun() const {return false;}
26  virtual void checkForNewRun(RunNumber_t run) {}
27 
28  virtual void checkRunConsistency(RunNumber_t run, RunNumber_t origninalRun) const;
30  virtual void overrideRunNumber(EventID& event, bool isRealData) {}
31  virtual void overrideRunNumber(RunID& run) {}
33 
34  static void fillDescription(ParameterSetDescription& desc);
35  };
36 
38  public:
39  explicit DefaultRunHelper() = default;
40  virtual ~DefaultRunHelper();
41  };
42 
43  class SetRunHelper : public RunHelperBase {
44  public:
45  explicit SetRunHelper(ParameterSet const& pset);
46  virtual ~SetRunHelper();
47 
48  virtual void setForcedRunOffset(RunNumber_t firstRun) override;
49 
50  virtual void checkRunConsistency(RunNumber_t run, RunNumber_t origninalRun) const override;
51  virtual void overrideRunNumber(EventID& event, bool isRealData) override;
52  virtual void overrideRunNumber(RunID& run) override;
53  virtual void overrideRunNumber(LuminosityBlockID& lumi) override;
54 
55  private:
58  bool firstTime_;
59  };
60 
62  public:
63  explicit SetRunForEachLumiHelper(ParameterSet const& pset);
64  virtual ~SetRunForEachLumiHelper();
65 
67  InputSource::ItemType const& previousItemType,
68  InputSource::ItemType const& newIemType) override;
69  virtual RunNumber_t runNumberToUseForThisLumi() const override;
70  virtual bool fakeNewRun() const override {return fakeNewRun_;}
71  virtual void checkForNewRun(RunNumber_t run) override;
72 
73  virtual void checkRunConsistency(RunNumber_t run, RunNumber_t origninalRun) const override;
74  virtual void overrideRunNumber(EventID& event, bool isRealData) override;
75  virtual void overrideRunNumber(RunID& run) override;
76  virtual void overrideRunNumber(LuminosityBlockID& lumi) override;
77 
78  private:
79  std::vector<RunNumber_t> setRunNumberForEachLumi_;
83  bool firstTime_;
84  };
85 
86  std::unique_ptr<RunHelperBase>
88 }
89 
90 #endif
virtual void checkForNewRun(RunNumber_t run) override
Definition: RunHelper.cc:140
virtual void checkRunConsistency(RunNumber_t run, RunNumber_t origninalRun) const override
Definition: RunHelper.cc:169
virtual void setForcedRunOffset(RunNumber_t firstRun) override
Definition: RunHelper.cc:53
tuple lumi
Definition: fjr2json.py:35
static void fillDescription(ParameterSetDescription &desc)
Definition: RunHelper.cc:174
virtual void overrideRunNumber(EventID &event, bool isRealData) override
Definition: RunHelper.cc:80
virtual RunNumber_t runNumberToUseForThisLumi() const
Definition: RunHelper.h:23
string firstRun
Definition: dataset.py:863
unsigned int LuminosityBlockNumber_t
RunHelperBase()=default
virtual InputSource::ItemType nextItemType(InputSource::ItemType const &previousItemType, InputSource::ItemType const &newIemType) override
Definition: RunHelper.cc:108
virtual void checkRunConsistency(RunNumber_t run, RunNumber_t origninalRun) const override
Definition: RunHelper.cc:92
SetRunHelper(ParameterSet const &pset)
Definition: RunHelper.cc:43
virtual void overrideRunNumber(LuminosityBlockID &lumi)
Definition: RunHelper.h:32
virtual void checkForNewRun(RunNumber_t run)
Definition: RunHelper.h:26
virtual ~DefaultRunHelper()
Definition: RunHelper.cc:41
virtual ~SetRunHelper()
Definition: RunHelper.cc:50
virtual bool fakeNewRun() const override
Definition: RunHelper.h:70
virtual void overrideRunNumber(RunID &run)
Definition: RunHelper.h:31
virtual bool fakeNewRun() const
Definition: RunHelper.h:24
DefaultRunHelper()=default
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual InputSource::ItemType nextItemType(InputSource::ItemType const &previousItemType, InputSource::ItemType const &newItemType)
Definition: RunHelper.h:20
std::unique_ptr< RunHelperBase > makeRunHelper(ParameterSet const &pset)
Definition: RunHelper.cc:13
SetRunForEachLumiHelper(ParameterSet const &pset)
Definition: RunHelper.cc:96
virtual void setForcedRunOffset(RunNumber_t firstRun)
Definition: RunHelper.h:25
virtual ~RunHelperBase()
Definition: RunHelper.cc:29
virtual void checkLumiConsistency(LuminosityBlockNumber_t lumi, LuminosityBlockNumber_t origninalLumi) const
Definition: RunHelper.cc:32
RunNumber_t setRun_
Definition: RunHelper.h:56
virtual RunNumber_t runNumberToUseForThisLumi() const override
Definition: RunHelper.cc:135
unsigned int RunNumber_t
std::vector< RunNumber_t > setRunNumberForEachLumi_
Definition: RunHelper.h:79
virtual void overrideRunNumber(EventID &event, bool isRealData)
Definition: RunHelper.h:30
virtual void overrideRunNumber(EventID &event, bool isRealData) override
Definition: RunHelper.cc:160
virtual void checkRunConsistency(RunNumber_t run, RunNumber_t origninalRun) const
Definition: RunHelper.cc:37