Skip to content

Commit

Permalink
Storing edmNew::DetSetVector<TotemT2Digi> instead of edm::DetSetVecto…
Browse files Browse the repository at this point in the history
…r<TotemT2Digi>
  • Loading branch information
forthommel committed Aug 22, 2022
1 parent 3e0646d commit 7918dab
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 23 deletions.
8 changes: 4 additions & 4 deletions DataFormats/TotemReco/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<class name="TotemT2Digi" ClassVersion="3">
<version ClassVersion="3" checksum="4024006040"/>
</class>
<class name="edm::DetSet<TotemT2Digi>"/>
<class name="edm::DetSetVector<TotemT2Digi>"/>
<class name="edm::Wrapper<edm::DetSetVector<TotemT2Digi> >"/>
<class name="edmNew::DetSet<TotemT2Digi>"/>
<class name="edmNew::DetSetVector<TotemT2Digi>"/>
<class name="edm::Wrapper<edmNew::DetSetVector<TotemT2Digi> >"/>
<class name="std::vector<TotemT2Digi>"/>
<class name="std::vector<edm::DetSet<TotemT2Digi> >"/>
<class name="std::vector<edmNew::DetSet<TotemT2Digi> >"/>
<class name="TotemT2RecHit" ClassVersion="3">
<version ClassVersion="3" checksum="969691996"/>
</class>
Expand Down
3 changes: 2 additions & 1 deletion EventFilter/CTPPSRawToDigi/interface/RawToDigiConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/Common/interface/DetSetVector.h"
#include "DataFormats/Common/interface/DetSetVectorNew.h"

#include "EventFilter/CTPPSRawToDigi/interface/VFATFrameCollection.h"

Expand Down Expand Up @@ -55,7 +56,7 @@ class RawToDigiConverter {
void run(const VFATFrameCollection &coll,
const TotemDAQMapping &mapping,
const TotemAnalysisMask &mask,
edm::DetSetVector<TotemT2Digi> &digi,
edmNew::DetSetVector<TotemT2Digi> &digi,
edm::DetSetVector<TotemVFATStatus> &status);

/// Print error summaries.
Expand Down
6 changes: 2 additions & 4 deletions EventFilter/CTPPSRawToDigi/plugins/TotemVFATRawToDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
#include "DataFormats/FEDRawData/interface/FEDNumbering.h"

#include "DataFormats/Common/interface/DetSetVector.h"

#include "DataFormats/CTPPSDigi/interface/TotemRPDigi.h"
#include "DataFormats/CTPPSDigi/interface/TotemVFATStatus.h"
#include "DataFormats/CTPPSDigi/interface/TotemFEDInfo.h"
Expand Down Expand Up @@ -104,7 +102,7 @@ TotemVFATRawToDigi::TotemVFATRawToDigi(const edm::ParameterSet &conf)
produces<DetSetVector<TotemTimingDigi>>(subSystemName);

else if (subSystem == ssTotemT2)
produces<DetSetVector<TotemT2Digi>>(subSystemName);
produces<edmNew::DetSetVector<TotemT2Digi>>(subSystemName);

// set default IDs
if (fedIds.empty()) {
Expand Down Expand Up @@ -153,7 +151,7 @@ void TotemVFATRawToDigi::produce(edm::Event &event, const edm::EventSetup &es) {
run<DetSetVector<TotemTimingDigi>>(event, es);

else if (subSystem == ssTotemT2)
run<DetSetVector<TotemT2Digi>>(event, es);
run<edmNew::DetSetVector<TotemT2Digi>>(event, es);
}

template <typename DigiType>
Expand Down
14 changes: 7 additions & 7 deletions EventFilter/CTPPSRawToDigi/src/RawToDigiConverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ void RawToDigiConverter::run(const VFATFrameCollection &coll,
void RawToDigiConverter::run(const VFATFrameCollection &coll,
const TotemDAQMapping &mapping,
const TotemAnalysisMask &mask,
edm::DetSetVector<TotemT2Digi> &digi,
edmNew::DetSetVector<TotemT2Digi> &digi,
edm::DetSetVector<TotemVFATStatus> &status) {
// structure merging vfat frame data with the mapping
map<TotemFramePosition, Record> records;
Expand All @@ -402,12 +402,12 @@ void RawToDigiConverter::run(const VFATFrameCollection &coll,
record.status.setEC(record.frame->getEC() & 0xFF);

// create the digi
DetSet<TotemT2Digi> &digiDetSet = digi.find_or_insert(detId);
digiDetSet.emplace_back(totem::nt2::vfat::geoId(*record.frame),
totem::nt2::vfat::channelId(*record.frame),
totem::nt2::vfat::channelMarker(*record.frame),
totem::nt2::vfat::leadingEdgeTime(*record.frame),
totem::nt2::vfat::trailingEdgeTime(*record.frame));
edmNew::DetSetVector<TotemT2Digi>::FastFiller(digi, detId)
.emplace_back(totem::nt2::vfat::geoId(*record.frame),
totem::nt2::vfat::channelId(*record.frame),
totem::nt2::vfat::channelMarker(*record.frame),
totem::nt2::vfat::leadingEdgeTime(*record.frame),
totem::nt2::vfat::trailingEdgeTime(*record.frame));
}

// save status
Expand Down
5 changes: 2 additions & 3 deletions RecoPPS/Local/interface/TotemT2RecHitProducerAlgorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@

#include "RecoPPS/Local/interface/TimingRecHitProducerAlgorithm.h"

#include "DataFormats/Common/interface/DetSetVector.h"
#include "DataFormats/Common/interface/DetSetVectorNew.h"
#include "DataFormats/TotemReco/interface/TotemT2Digi.h"
#include "DataFormats/TotemReco/interface/TotemT2RecHit.h"

#include "Geometry/ForwardGeometry/interface/TotemGeometry.h"

class TotemT2RecHitProducerAlgorithm : public TimingRecHitProducerAlgorithm<TotemGeometry,
edm::DetSetVector<TotemT2Digi>,
edmNew::DetSetVector<TotemT2Digi>,
edmNew::DetSetVector<TotemT2RecHit> > {
public:
using TimingRecHitProducerAlgorithm::TimingRecHitProducerAlgorithm;
void build(const TotemGeometry&,
const edm::DetSetVector<TotemT2Digi>&,
const edmNew::DetSetVector<TotemT2Digi>&,
edmNew::DetSetVector<TotemT2RecHit>&) override;
};

Expand Down
5 changes: 2 additions & 3 deletions RecoPPS/Local/plugins/TotemT2RecHitProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/StreamID.h"

#include "DataFormats/Common/interface/DetSetVector.h"
#include "DataFormats/Common/interface/DetSet.h"
#include "DataFormats/Common/interface/DetSetVectorNew.h"

Expand All @@ -42,7 +41,7 @@ class TotemT2RecHitProducer : public edm::stream::EDProducer<> {
private:
void produce(edm::Event&, const edm::EventSetup&) override;

edm::EDGetTokenT<edm::DetSetVector<TotemT2Digi> > digiToken_;
edm::EDGetTokenT<edmNew::DetSetVector<TotemT2Digi> > digiToken_;
edm::ESGetToken<PPSTimingCalibration, PPSTimingCalibrationRcd> timingCalibrationToken_;
edm::ESGetToken<PPSTimingCalibrationLUT, PPSTimingCalibrationLUTRcd> timingCalibrationLUTToken_;
edm::ESGetToken<TotemGeometry, TotemGeometryRcd> geometryToken_;
Expand All @@ -54,7 +53,7 @@ class TotemT2RecHitProducer : public edm::stream::EDProducer<> {
};

TotemT2RecHitProducer::TotemT2RecHitProducer(const edm::ParameterSet& iConfig)
: digiToken_(consumes<edm::DetSetVector<TotemT2Digi> >(iConfig.getParameter<edm::InputTag>("digiTag"))),
: digiToken_(consumes<edmNew::DetSetVector<TotemT2Digi> >(iConfig.getParameter<edm::InputTag>("digiTag"))),
geometryToken_(esConsumes<TotemGeometry, TotemGeometryRcd>()),
applyCalib_(iConfig.getParameter<bool>("applyCalibration")),
algo_(iConfig) {
Expand Down
2 changes: 1 addition & 1 deletion RecoPPS/Local/src/TotemT2RecHitProducerAlgorithm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "DataFormats/CTPPSDetId/interface/TotemT2DetId.h"

void TotemT2RecHitProducerAlgorithm::build(const TotemGeometry& geom,
const edm::DetSetVector<TotemT2Digi>& input,
const edmNew::DetSetVector<TotemT2Digi>& input,
edmNew::DetSetVector<TotemT2RecHit>& output) {
for (const auto& vec : input) {
const TotemT2DetId detid(vec.detId());
Expand Down

0 comments on commit 7918dab

Please sign in to comment.