Skip to content

Commit

Permalink
Merge pull request #2736 from wmtan/FedRawDataInputSourceFix70X
Browse files Browse the repository at this point in the history
EventFilter/Utilities -- Must set process history ID in runs, lumis, and events
  • Loading branch information
nclopezo committed Mar 6, 2014
2 parents e393471 + c65ec57 commit 80b36e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions EventFilter/Utilities/plugins/FedRawDataInputSource.cc
Expand Up @@ -48,6 +48,7 @@ FedRawDataInputSource::FedRawDataInputSource(edm::ParameterSet const& pset,
daqProvenanceHelper_(edm::TypeID(typeid(FEDRawDataCollection))),
fileStream_(0),
eventID_(),
processHistoryID_(),
currentLumiSection_(0),
currentInputJson_(""),
currentInputEventCount_(0),
Expand All @@ -62,10 +63,11 @@ FedRawDataInputSource::FedRawDataInputSource(edm::ParameterSet const& pset,
<< testModeNoBuilderUnit_ << ", read-ahead chunk size: " << eventChunkSize_
<< " on host " << thishost;

daqProvenanceHelper_.daqInit(productRegistryUpdate(), processHistoryRegistryForUpdate());
processHistoryID_ = daqProvenanceHelper_.daqInit(productRegistryUpdate(), processHistoryRegistryForUpdate());
setNewRun();
setRunAuxiliary(new edm::RunAuxiliary(runNumber_, edm::Timestamp::beginOfTime(),
edm::Timestamp::invalidTimestamp()));
runAuxiliary()->setProcessHistoryID(processHistoryID_);
}

FedRawDataInputSource::~FedRawDataInputSource()
Expand Down Expand Up @@ -130,13 +132,14 @@ void FedRawDataInputSource::maybeOpenNewLumiSection(const uint32_t lumiSection)
gettimeofday(&tv, 0);
const edm::Timestamp lsopentime( (unsigned long long) tv.tv_sec * 1000000 + (unsigned long long) tv.tv_usec );

edm::LuminosityBlockAuxiliary* luminosityBlockAuxiliary =
edm::LuminosityBlockAuxiliary* lumiBlockAuxiliary =
new edm::LuminosityBlockAuxiliary(
runAuxiliary()->run(),
lumiSection, lsopentime,
edm::Timestamp::invalidTimestamp());

setLuminosityBlockAuxiliary(luminosityBlockAuxiliary);
setLuminosityBlockAuxiliary(lumiBlockAuxiliary);
luminosityBlockAuxiliary()->setProcessHistoryID(processHistoryID_);

edm::LogInfo("FedRawDataInputSource") << "New lumi section " << lumiSection << " opened";
}
Expand Down Expand Up @@ -268,6 +271,7 @@ void FedRawDataInputSource::read(edm::EventPrincipal& eventPrincipal)

edm::EventAuxiliary aux(eventID_, processGUID(), tstamp, true,
edm::EventAuxiliary::PhysicsTrigger);
aux.setProcessHistoryID(processHistoryID_);
makeEvent(eventPrincipal, aux);

edm::WrapperOwningHolder edp(new edm::Wrapper<FEDRawDataCollection>(rawData),
Expand Down
2 changes: 2 additions & 0 deletions EventFilter/Utilities/plugins/FedRawDataInputSource.h
Expand Up @@ -6,6 +6,7 @@

#include "boost/filesystem.hpp"

#include "DataFormats/Provenance/interface/ProcessHistoryID.h"
#include "DataFormats/Provenance/interface/Timestamp.h"
#include "FWCore/Sources/interface/RawInputSource.h"
#include "FWCore/Framework/interface/EventPrincipal.h"
Expand Down Expand Up @@ -68,6 +69,7 @@ class FedRawDataInputSource: public edm::RawInputSource {
boost::filesystem::path openFile_;
FILE* fileStream_;
edm::EventID eventID_;
edm::ProcessHistoryID processHistoryID_;

unsigned int currentLumiSection_;
boost::filesystem::path currentInputJson_;
Expand Down

0 comments on commit 80b36e7

Please sign in to comment.