Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72175
b: "refs/heads/CMSSW_7_1_X"
c: f399d7f
h: "refs/heads/CMSSW_7_1_X"
i:
  72173: 8514e5e
  72171: ca617d5
  72167: 306af32
  72159: 40b2df3
v: v3
  • Loading branch information
William Tanenbaum committed Aug 22, 2009
1 parent fd48a09 commit 865b965
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": 4cf1e716939500c0e3372b7663ad98e38f266581
"refs/heads/CMSSW_7_1_X": f399d7f23147be120efa03dc8ef2bd3ab059e796
12 changes: 11 additions & 1 deletion trunk/FWCore/Framework/interface/InputSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,16 @@ namespace edm {
/// Called by framework at end of job
void doEndJob();

/// Called by framework when events are exhausted.
/// Called by framework at beginning of lumi block
void doBeginLumi(LuminosityBlockPrincipal& lbp);

/// Called by framework at end of lumi block
void doEndLumi(LuminosityBlockPrincipal& lbp);

/// Called by framework at beginning of run
void doBeginRun(RunPrincipal& rp);

/// Called by framework at end of run
void doEndRun(RunPrincipal& rp);

/// Called by the framework before forking the process
Expand Down Expand Up @@ -284,7 +292,9 @@ namespace edm {
virtual void wakeUp_();
void preRead();
void postRead(Event& event);
virtual void beginLuminosityBlock(LuminosityBlock&);
virtual void endLuminosityBlock(LuminosityBlock&);
virtual void beginRun(Run&);
virtual void endRun(Run&);
virtual void beginJob(EventSetup const&);
virtual void endJob();
Expand Down
8 changes: 0 additions & 8 deletions trunk/FWCore/Framework/src/ConfigurableInputSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ namespace edm {
RunAuxiliary runAux(eventID_.run(), ts, Timestamp::invalidTimestamp());
boost::shared_ptr<RunPrincipal> runPrincipal(
new RunPrincipal(runAux, productRegistry(), processConfiguration()));
RunPrincipal& rp =
const_cast<RunPrincipal&>(*runPrincipal);
Run run(rp, moduleDescription());
beginRun(run);
run.commit_();
newRun_ = false;
return runPrincipal;
}
Expand All @@ -76,9 +71,6 @@ namespace edm {
boost::shared_ptr<LuminosityBlockPrincipal> lumiPrincipal(
new LuminosityBlockPrincipal(
lumiAux, productRegistry(), processConfiguration()));
LuminosityBlock lb(*lumiPrincipal, moduleDescription());
beginLuminosityBlock(lb);
lb.commit_();
newLumi_ = false;
return lumiPrincipal;
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/FWCore/Framework/src/EventProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,7 @@ namespace edm {

void EventProcessor::beginRun(int run) {
RunPrincipal& runPrincipal = principalCache_.runPrincipal(run);
input_->doBeginRun(runPrincipal);
IOVSyncValue ts(EventID(runPrincipal.run(), 0),
0,
runPrincipal.beginTime());
Expand Down Expand Up @@ -1710,6 +1711,7 @@ namespace edm {

void EventProcessor::beginLumi(int run, int lumi) {
LuminosityBlockPrincipal& lumiPrincipal = principalCache_.lumiPrincipal(run, lumi);
input_->doBeginLumi(lumiPrincipal);
// NOTE: Using 0 as the event number for the begin of a lumi block is a bad idea
// lumi blocks know their start and end times why not also start and end events?
IOVSyncValue ts(EventID(lumiPrincipal.run(), 0), lumiPrincipal.luminosityBlock(), lumiPrincipal.beginTime());
Expand Down
20 changes: 20 additions & 0 deletions trunk/FWCore/Framework/src/InputSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,13 @@ namespace edm {
}
}

void
InputSource::doBeginRun(RunPrincipal& rp) {
Run run(rp, moduleDescription());
beginRun(run);
run.commit_();
}

void
InputSource::doEndRun(RunPrincipal& rp) {
rp.setEndTime(time_);
Expand All @@ -376,6 +383,13 @@ namespace edm {
run.commit_();
}

void
InputSource::doBeginLumi(LuminosityBlockPrincipal& lbp) {
LuminosityBlock lb(lbp, moduleDescription());
beginLuminosityBlock(lb);
lb.commit_();
}

void
InputSource::doEndLumi(LuminosityBlockPrincipal& lbp) {
lbp.setEndTime(time_);
Expand Down Expand Up @@ -415,9 +429,15 @@ namespace edm {
void
InputSource::wakeUp_() {}

void
InputSource::beginLuminosityBlock(LuminosityBlock&) {}

void
InputSource::endLuminosityBlock(LuminosityBlock&) {}

void
InputSource::beginRun(Run&) {}

void
InputSource::endRun(Run&) {}

Expand Down

0 comments on commit 865b965

Please sign in to comment.