Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ExperimentType to be set in 7_3_X #6416

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CalibCalorimetry/EcalLaserSorting/interface/LmfSource.h
Expand Up @@ -33,7 +33,7 @@ class LmfSource: public edm::ProducerSourceBase{
* (lumi block, run number, event number, timestamp)
* Called by the framework before produce()
*/
virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time);
virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time, edm::EventAuxiliary::ExperimentType& eType);

bool openFile(int iFile);

Expand Down
2 changes: 1 addition & 1 deletion CalibCalorimetry/EcalLaserSorting/src/LmfSource.cc
Expand Up @@ -221,7 +221,7 @@ bool LmfSource::readEvent(bool doSkip){
return rcRead_;
}

bool LmfSource::setRunAndEventInfo(EventID& id, TimeValue_t& time){
bool LmfSource::setRunAndEventInfo(EventID& id, TimeValue_t& time, edm::EventAuxiliary::ExperimentType& eType){
//empties collection:
if(fedId_>0){
fedColl_.FEDData(fedId_).resize(0);
Expand Down
4 changes: 2 additions & 2 deletions CondCore/Utilities/plugins/EmptyIOVSource.cc
Expand Up @@ -8,7 +8,7 @@ namespace cond {
~EmptyIOVSource();
private:
virtual void produce(edm::Event & e) override;
virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time) override;
virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time, edm::EventAuxiliary::ExperimentType& eType) override;
virtual void initialize(edm::EventID& id, edm::TimeValue_t& time, edm::TimeValue_t& interval) override;
private:
TimeType m_timeType;
Expand Down Expand Up @@ -40,7 +40,7 @@ namespace cond{
}
void EmptyIOVSource::produce( edm::Event & ) {
}
bool EmptyIOVSource::setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time){
bool EmptyIOVSource::setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time, edm::EventAuxiliary::ExperimentType& eType){
if(m_current<=m_lastValid){
if( m_timeType == cond::runnumber ){
id = edm::EventID(m_current, id.luminosityBlock(), 1);
Expand Down
3 changes: 2 additions & 1 deletion EventFilter/Utilities/plugins/FRDStreamSource.cc
Expand Up @@ -26,7 +26,7 @@ FRDStreamSource::FRDStreamSource(edm::ParameterSet const& pset,
}


bool FRDStreamSource::setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& theTime)
bool FRDStreamSource::setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& theTime, edm::EventAuxiliary::ExperimentType& eType)
{
if ( fin_.peek() == EOF ) {
if ( ++itFileName_==fileNames().end() ) {
Expand Down Expand Up @@ -105,6 +105,7 @@ bool FRDStreamSource::setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& the
evf::evtn::TCDSRecord record((unsigned char *)(event + eventSize ));
id = edm::EventID(frdEventMsg->run(),record.getHeader().getData().header.lumiSection,
record.getHeader().getData().header.eventNumber);
eType = ((edm::EventAuxiliary::ExperimentType)FED_EVTY_EXTRACT(fedHeader->eventid));
//evf::evtn::evm_board_setformat(fedSize);
uint64_t gpsh = record.getBST().getBST().gpstimehigh;
uint32_t gpsl = record.getBST().getBST().gpstimelow;
Expand Down
2 changes: 1 addition & 1 deletion EventFilter/Utilities/plugins/FRDStreamSource.h
Expand Up @@ -28,7 +28,7 @@ class FRDStreamSource : public edm::ProducerSourceFromFiles {

private:
// member functions
virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& theTime);
virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& theTime, edm::EventAuxiliary::ExperimentType& eType);
virtual void produce(edm::Event& e);

void beginRun(edm::Run&) {}
Expand Down
4 changes: 2 additions & 2 deletions FWCore/Integration/test/IntSource.cc
Expand Up @@ -16,7 +16,7 @@ namespace edm {
~IntSource();
static void fillDescriptions(ConfigurationDescriptions& descriptions);
private:
virtual bool setRunAndEventInfo(EventID& id, TimeValue_t& time);
virtual bool setRunAndEventInfo(EventID& id, TimeValue_t& time, edm::EventAuxiliary::ExperimentType& eType);
virtual void produce(Event &);
};

Expand All @@ -29,7 +29,7 @@ namespace edm {
}

bool
IntSource::setRunAndEventInfo(EventID&, TimeValue_t&) {
IntSource::setRunAndEventInfo(EventID&, TimeValue_t&, edm::EventAuxiliary::ExperimentType&) {
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion FWCore/Integration/test/ThingExtSource.cc
Expand Up @@ -19,7 +19,7 @@ namespace edmtest {
ThingExtSource::~ThingExtSource() { }

// Functions that gets called by framework every event
bool ThingExtSource::setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&) {
bool ThingExtSource::setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&, edm::EventAuxiliary::ExperimentType&) {
// Fake running out of data.
if (event() > 2) return false;
return true;
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Integration/test/ThingExtSource.h
Expand Up @@ -23,7 +23,7 @@ namespace edmtest {

virtual ~ThingExtSource();

virtual bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&);
virtual bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&, edm::EventAuxiliary::ExperimentType&);

virtual void produce(edm::Event& e);

Expand Down
2 changes: 1 addition & 1 deletion FWCore/Integration/test/ThingSource.h
Expand Up @@ -23,7 +23,7 @@ namespace edmtest {

virtual ~ThingSource();

virtual bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&) {return true;}
virtual bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&, edm::EventAuxiliary::ExperimentType&) {return true;}

virtual void produce(edm::Event& e);

Expand Down
4 changes: 2 additions & 2 deletions FWCore/Integration/test/ThrowingSource.cc
Expand Up @@ -41,7 +41,7 @@ namespace edm {
kCloseFile = 13,
kDestructor = 14
};
virtual bool setRunAndEventInfo(EventID& id, TimeValue_t& time);
virtual bool setRunAndEventInfo(EventID& id, TimeValue_t& time, edm::EventAuxiliary::ExperimentType& eType);
virtual void produce(Event &);

// To test exception throws from sources
Expand All @@ -60,7 +60,7 @@ namespace edm {
}

bool
ThrowingSource::setRunAndEventInfo(EventID&, TimeValue_t&) {
ThrowingSource::setRunAndEventInfo(EventID&, TimeValue_t&, edm::EventAuxiliary::ExperimentType&) {
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions FWCore/Modules/src/EmptySource.cc
Expand Up @@ -11,7 +11,7 @@ namespace edm {
~EmptySource();
static void fillDescriptions(ConfigurationDescriptions& descriptions);
private:
virtual bool setRunAndEventInfo(EventID& id, TimeValue_t& time) override;
virtual bool setRunAndEventInfo(EventID& id, TimeValue_t& time, edm::EventAuxiliary::ExperimentType&) override;
virtual void produce(Event &) override;
};

Expand All @@ -24,7 +24,7 @@ namespace edm {
}

bool
EmptySource::setRunAndEventInfo(EventID&, TimeValue_t&) {
EmptySource::setRunAndEventInfo(EventID&, TimeValue_t&, edm::EventAuxiliary::ExperimentType&) {
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions FWCore/Sources/interface/ProducerSourceBase.h
Expand Up @@ -39,9 +39,9 @@ namespace edm {
protected:

private:
virtual ItemType getNextItemType() override;
virtual ItemType getNextItemType() override final;
virtual void initialize(EventID& id, TimeValue_t& time, TimeValue_t& interval);
virtual bool setRunAndEventInfo(EventID& id, TimeValue_t& time) = 0;
virtual bool setRunAndEventInfo(EventID& id, TimeValue_t& time, EventAuxiliary::ExperimentType& etype) = 0;
virtual void produce(Event& e) = 0;
virtual bool noFiles() const;
virtual size_t fileIndex() const;
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Sources/src/ProducerSourceBase.cc
Expand Up @@ -143,7 +143,7 @@ namespace edm {
advanceToNext(eventID_, presentTime_);
if (eventCreationDelay_ > 0) {usleep(eventCreationDelay_);}
size_t index = fileIndex();
bool another = setRunAndEventInfo(eventID_, presentTime_);
bool another = setRunAndEventInfo(eventID_, presentTime_, eType_);
if(!another) {
return IsStop;
}
Expand Down
4 changes: 2 additions & 2 deletions GeneratorInterface/AlpgenInterface/plugins/AlpgenSource.cc
Expand Up @@ -36,7 +36,7 @@ class AlpgenSource : public edm::ProducerSourceFromFiles {
virtual ~AlpgenSource();

private:
virtual bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&) override;
virtual bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&, edm::EventAuxiliary::ExperimentType&) override;
virtual void produce(edm::Event &event) override;
virtual void beginRun(edm::Run &run) override;

Expand Down Expand Up @@ -403,7 +403,7 @@ bool AlpgenSource::readAlpgenEvent(lhef::HEPEUP &hepeup)
return true;
}

bool AlpgenSource::setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&)
bool AlpgenSource::setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&, edm::EventAuxiliary::ExperimentType&)
{
// The LHE Event Record
hepeup_.reset(new lhef::HEPEUP);
Expand Down
2 changes: 1 addition & 1 deletion GeneratorInterface/LHEInterface/plugins/LHESource.cc
Expand Up @@ -161,7 +161,7 @@ void LHESource::endRun(edm::Run&)
runPrincipal_ = nullptr;
}

bool LHESource::setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&)
bool LHESource::setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&, edm::EventAuxiliary::ExperimentType&)
{
nextEvent();
if (!partonLevel) {
Expand Down
2 changes: 1 addition & 1 deletion GeneratorInterface/LHEInterface/plugins/LHESource.h
Expand Up @@ -38,7 +38,7 @@ class LHERunInfoProduct;
virtual void endJob() override;
virtual void beginRun(edm::Run &run) override;
virtual void endRun(edm::Run &run) override;
virtual bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&) override;
virtual bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&, edm::EventAuxiliary::ExperimentType&) override;
virtual void readRun_(edm::RunPrincipal& runPrincipal) override;
virtual void readLuminosityBlock_(edm::LuminosityBlockPrincipal& lumiPrincipal) override;
virtual void readEvent_(edm::EventPrincipal& eventPrincipal) override;
Expand Down
Expand Up @@ -155,7 +155,7 @@ void MCatNLOSource::beginRun(edm::Run &run)
return;
}

bool MCatNLOSource::setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&)
bool MCatNLOSource::setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&, edm::EventAuxiliary::ExperimentType&)
{
InstanceWrapper wrapper(this);

Expand Down
Expand Up @@ -50,7 +50,7 @@ class MCatNLOSource : public edm::ProducerSourceFromFiles,
private:
virtual void endJob();
virtual void beginRun(edm::Run &run);
virtual bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&);
virtual bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&, edm::EventAuxiliary::ExperimentType&);
virtual void produce(edm::Event &event);

void nextEvent();
Expand Down
2 changes: 1 addition & 1 deletion IOMC/Input/interface/MCFileSource.h
Expand Up @@ -28,7 +28,7 @@ namespace edm {
virtual ~MCFileSource();

private:
virtual bool setRunAndEventInfo(EventID&, TimeValue_t& time);
virtual bool setRunAndEventInfo(EventID&, TimeValue_t& time, EventAuxiliary::ExperimentType& eType);
virtual void produce(Event &e);
void clear();

Expand Down
2 changes: 1 addition & 1 deletion IOMC/Input/src/MCFileSource.cc
Expand Up @@ -41,7 +41,7 @@ MCFileSource::~MCFileSource(){
}

//-------------------------------------------------------------------------
bool MCFileSource::setRunAndEventInfo(EventID&, TimeValue_t&) {
bool MCFileSource::setRunAndEventInfo(EventID&, TimeValue_t&, EventAuxiliary::ExperimentType&) {
// Read one HepMC event
LogInfo("MCFileSource") << "Start Reading";
evt_ = reader_->fillCurrentEventData();
Expand Down
2 changes: 1 addition & 1 deletion IORawData/HcalTBInputService/interface/HcalTBSource.h
Expand Up @@ -29,7 +29,7 @@ class HcalTBSource : public edm::ProducerSourceFromFiles {
explicit HcalTBSource(const edm::ParameterSet & pset, edm::InputSourceDescription const& desc);
virtual ~HcalTBSource();
private:
virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time);
virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time, edm::EventAuxiliary::ExperimentType&);
virtual void produce(edm::Event & e);
void unpackSetup(const std::vector<std::string>& params);
void openFile(const std::string& filename);
Expand Down
2 changes: 1 addition & 1 deletion IORawData/HcalTBInputService/src/HcalTBSource.cc
Expand Up @@ -106,7 +106,7 @@ void HcalTBSource::openFile(const std::string& filename) {
m_i=0;
}

bool HcalTBSource::setRunAndEventInfo(EventID& id, TimeValue_t& time) {
bool HcalTBSource::setRunAndEventInfo(EventID& id, TimeValue_t& time, edm::EventAuxiliary::ExperimentType&) {
bool is_new=false;

while (m_tree==0 || m_i==m_tree->GetEntries()) {
Expand Down
Expand Up @@ -46,7 +46,7 @@ class PixelSLinkDataInputSource : public edm::ProducerSourceFromFiles {

private:

virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time);
virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time, edm::EventAuxiliary::ExperimentType&);
virtual void produce(edm::Event& event);
uint32_t synchronizeEvents();

Expand Down
Expand Up @@ -172,7 +172,7 @@ PixelSLinkDataInputSource::~PixelSLinkDataInputSource() {

}

bool PixelSLinkDataInputSource::setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time) {
bool PixelSLinkDataInputSource::setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time, edm::EventAuxiliary::ExperimentType&) {
Storage & m_file = *storage;

// create product (raw data)
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/GlobalMuonTrigger/src/L1MuGMTHWFileReader.cc
Expand Up @@ -67,7 +67,7 @@ L1MuGMTHWFileReader::~L1MuGMTHWFileReader() {
//--------------
// Operations --
//--------------
bool L1MuGMTHWFileReader::setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time) {
bool L1MuGMTHWFileReader::setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time, edm::EventAuxiliary::ExperimentType& eType) {
readNextEvent();
if(!m_evt.getRunNumber() && !m_evt.getEventNumber()) return false;
id = edm::EventID(m_evt.getRunNumber(), id.luminosityBlock(), m_evt.getEventNumber());
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/GlobalMuonTrigger/src/L1MuGMTHWFileReader.h
Expand Up @@ -50,7 +50,7 @@ class L1MuGMTHWFileReader : public edm::ProducerSourceFromFiles {


private:
virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time);
virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time, edm::EventAuxiliary::ExperimentType& eType);
virtual void produce(edm::Event&);

std::ifstream m_in;
Expand Down