Skip to content

Commit

Permalink
temporarily revert the migration of hltFilter() to a const method
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Oct 31, 2013
1 parent eab24f3 commit 5ab8caf
Show file tree
Hide file tree
Showing 202 changed files with 1,346 additions and 1,346 deletions.
18 changes: 9 additions & 9 deletions CaloOnlineTools/EcalTools/plugins/EcalFEDErrorFilter.cc
Expand Up @@ -2,7 +2,7 @@
//
// Package: EcalFEDErrorFilter
// Class: EcalFEDErrorFilter
//
//
/**\class EcalFEDErrorFilter EcalFEDErrorFilter.cc filter/EcalFEDErrorFilter/src/EcalFEDErrorFilter.cc
Description: <one line class summary>
Expand All @@ -29,15 +29,15 @@ EcalFEDErrorFilter::EcalFEDErrorFilter(const edm::ParameterSet& iConfig) :

DataLabel_ = iConfig.getParameter<edm::InputTag>("InputLabel");
fedUnpackList_ = iConfig.getUntrackedParameter< std::vector<int> >("FEDs", std::vector<int>());
if (fedUnpackList_.empty())
if (fedUnpackList_.empty())
for (int i=FEDNumbering::MINECALFEDID; i<=FEDNumbering::MAXECALFEDID; i++)
fedUnpackList_.push_back(i);
}


EcalFEDErrorFilter::~EcalFEDErrorFilter()
{

// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)

Expand All @@ -50,38 +50,38 @@ EcalFEDErrorFilter::~EcalFEDErrorFilter()

// ------------ method called on each new Event ------------
bool
EcalFEDErrorFilter::hltFilter(edm::Event& iEvent, const edm::EventSetup& iSetup, trigger::TriggerFilterObjectWithRefs & filterproduct) const
EcalFEDErrorFilter::hltFilter(edm::Event& iEvent, const edm::EventSetup& iSetup, trigger::TriggerFilterObjectWithRefs & filterproduct)
{
using namespace edm;

edm::Handle<FEDRawDataCollection> rawdata;
edm::Handle<FEDRawDataCollection> rawdata;
iEvent.getByLabel(DataLabel_,rawdata);

// get fed raw data and SM id

// loop over FEDS
for (std::vector<int>::const_iterator i=fedUnpackList_.begin(); i!=fedUnpackList_.end(); i++)
for (std::vector<int>::const_iterator i=fedUnpackList_.begin(); i!=fedUnpackList_.end(); i++)
{

// get fed raw data and SM id
const FEDRawData & fedData = rawdata->FEDData(*i);
int length = fedData.size()/sizeof(uint64_t);

// LogDebug("EcalRawToDigi") << "raw data length: " << length ;
//if data size is not null interpret data
if ( length >= 1 )
{
uint64_t * pData = (uint64_t *)(fedData.data());
//When crc error is found return true
uint64_t * fedTrailer = pData + (length - 1);
bool crcError = (*fedTrailer >> 2 ) & 0x1;
bool crcError = (*fedTrailer >> 2 ) & 0x1;
if (crcError)
{
std::cout << "CRCERROR in FED " << *i << " trailer is " << std::setw(8) << std::hex << (*fedTrailer) << std::endl;
return true;
}
}
}

return false;
}
12 changes: 6 additions & 6 deletions CaloOnlineTools/EcalTools/plugins/EcalFEDErrorFilter.h
Expand Up @@ -2,7 +2,7 @@
//
// Package: EcalFEDErrorFilter
// Class: EcalFEDErrorFilter
//
//
/**\class EcalFEDErrorFilter EcalFEDErrorFilter.cc filter/EcalFEDErrorFilter/src/EcalFEDErrorFilter.cc
Description: <one line class summary>
Expand Down Expand Up @@ -46,13 +46,13 @@ class EcalFEDErrorFilter : public HLTFilter {
public:
explicit EcalFEDErrorFilter(const edm::ParameterSet&);
~EcalFEDErrorFilter();

private:
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) const;
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;

// ----------member data ---------------------------

edm::InputTag DataLabel_;
std::vector<int> fedUnpackList_;

};
8 changes: 4 additions & 4 deletions DPGAnalysis/Skims/interface/HLTMuonPtFilter.h
Expand Up @@ -34,12 +34,12 @@ class HLTMuonPtFilter : public HLTFilter {
/// Destructorquer
~HLTMuonPtFilter() ;

/* Operations */
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) const;
/* Operations */
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;

private:
std::string theSTAMuonLabel; // label of muons
double theMinPt; // minimum pt required
std::string theSTAMuonLabel; // label of muons
double theMinPt; // minimum pt required


};
Expand Down
10 changes: 5 additions & 5 deletions DPGAnalysis/Skims/src/HLTMuonPtFilter.cc
Expand Up @@ -32,22 +32,22 @@ HLTMuonPtFilter::HLTMuonPtFilter(const edm::ParameterSet& pset) :

theMinPt = pset.getParameter<double>("minPt"); // pt min (GeV)

LogDebug("HLTMuonPt") << " SALabel : " << theSTAMuonLabel
LogDebug("HLTMuonPt") << " SALabel : " << theSTAMuonLabel
<< " Min Pt : " << theMinPt;
}

/// Destructor
HLTMuonPtFilter::~HLTMuonPtFilter() {
}

/* Operations */
bool HLTMuonPtFilter::hltFilter(edm::Event& event, const edm::EventSetup& eventSetup, trigger::TriggerFilterObjectWithRefs & filterproduct) const {
/* Operations */
bool HLTMuonPtFilter::hltFilter(edm::Event& event, const edm::EventSetup& eventSetup, trigger::TriggerFilterObjectWithRefs & filterproduct) {
// Get the RecTrack collection from the event
Handle<reco::TrackCollection> staTracks;
event.getByLabel(theSTAMuonLabel, staTracks);

reco::TrackCollection::const_iterator staTrack;

for (staTrack = staTracks->begin(); staTrack != staTracks->end(); ++staTrack) {
if (staTrack->pt()>theMinPt)
return true;
Expand Down
4 changes: 2 additions & 2 deletions DQM/DTMonitorModule/src/DTDataErrorFilter.cc
Expand Up @@ -19,8 +19,8 @@ DTDataErrorFilter::DTDataErrorFilter(const edm::ParameterSet & config) :
DTDataErrorFilter::~DTDataErrorFilter(){}


bool DTDataErrorFilter::hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct) const {
// check the event error flag
bool DTDataErrorFilter::hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct) {
// check the event error flag
if (dataMonitor->eventHasErrors()) return true;
return false;
}
6 changes: 3 additions & 3 deletions DQM/DTMonitorModule/src/DTDataErrorFilter.h
Expand Up @@ -21,14 +21,14 @@ class DTDataErrorFilter : public HLTFilter {
virtual ~DTDataErrorFilter();

// Operations
virtual bool hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct) const;
virtual bool hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct) override;

protected:

private:
DTDataIntegrityTask * dataMonitor;


};
#endif

10 changes: 5 additions & 5 deletions DQM/DTMonitorModule/src/DTROMonitorFilter.cc
Expand Up @@ -28,7 +28,7 @@ DTROMonitorFilter::DTROMonitorFilter(const edm::ParameterSet& pset) :
DTROMonitorFilter::~DTROMonitorFilter(){}


bool DTROMonitorFilter::hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct) const {
bool DTROMonitorFilter::hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct) {

// get the raw data
edm::Handle<FEDRawDataCollection> rawdata;
Expand All @@ -44,23 +44,23 @@ bool DTROMonitorFilter::hltFilter(edm::Event& event, const edm::EventSetup& setu

for (int dduID=FEDIDmin; dduID<=FEDIDMax; ++dduID) { // loop over all feds
const FEDRawData& feddata = rawdata->FEDData(dduID);
const int datasize = feddata.size();
const int datasize = feddata.size();
if (datasize){ // check the FED payload
const unsigned int* index32 = reinterpret_cast<const unsigned int*>(feddata.data());
const int numberOf32Words = datasize/wordSize_32;

const unsigned char* index8 = reinterpret_cast<const unsigned char*>(index32);

// Check Status Words (1 x ROS)
for (int rosId = 0; rosId < 12; rosId++ ) {
int wordIndex8 = numberOf32Words*wordSize_32 - 3*wordSize_64 + rosId;
int wordIndex8 = numberOf32Words*wordSize_32 - 3*wordSize_64 + rosId;
DTDDUFirstStatusWord statusWord(index8[wordIndex8]);
// check the error bit
if(statusWord.errorFromROS() != 0) return true;
}
}
}

// check the event error flag
// check the event error flag
return false;
}
4 changes: 2 additions & 2 deletions DQM/DTMonitorModule/src/DTROMonitorFilter.h
Expand Up @@ -21,8 +21,8 @@ class DTROMonitorFilter : public HLTFilter {
virtual ~DTROMonitorFilter();

// Operations
virtual bool hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct) const;
virtual bool hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct) override;

protected:

private:
Expand Down
4 changes: 2 additions & 2 deletions EventFilter/Cosmics/src/EcalMIPRecHitFilter.cc
Expand Up @@ -58,7 +58,7 @@ class EcalMIPRecHitFilter : public HLTFilter {

private:
virtual void beginJob() override ;
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) const override;
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;
virtual void endJob() override ;

// ----------member data ---------------------------
Expand Down Expand Up @@ -103,7 +103,7 @@ EcalMIPRecHitFilter::~EcalMIPRecHitFilter()

// ------------ method called on each new Event ------------
bool
EcalMIPRecHitFilter::hltFilter(edm::Event& iEvent, const edm::EventSetup& iSetup, trigger::TriggerFilterObjectWithRefs & filterproduct) const
EcalMIPRecHitFilter::hltFilter(edm::Event& iEvent, const edm::EventSetup& iSetup, trigger::TriggerFilterObjectWithRefs & filterproduct)
{
using namespace edm;

Expand Down
4 changes: 2 additions & 2 deletions EventFilter/Cosmics/src/EcalSimpleUncalibRecHitFilter.cc
Expand Up @@ -44,7 +44,7 @@ class EcalSimpleUncalibRecHitFilter : public HLTFilter {

private:
virtual void beginJob() override ;
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) const override;
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;
virtual void endJob() override ;

// ----------member data ---------------------------
Expand Down Expand Up @@ -83,7 +83,7 @@ EcalSimpleUncalibRecHitFilter::~EcalSimpleUncalibRecHitFilter()

// ------------ method called on each new Event ------------
bool
EcalSimpleUncalibRecHitFilter::hltFilter(edm::Event& iEvent, const edm::EventSetup& iSetup, trigger::TriggerFilterObjectWithRefs & filterproduct) const
EcalSimpleUncalibRecHitFilter::hltFilter(edm::Event& iEvent, const edm::EventSetup& iSetup, trigger::TriggerFilterObjectWithRefs & filterproduct)
{
using namespace edm;

Expand Down
8 changes: 4 additions & 4 deletions HLTrigger/Egamma/interface/HLTDisplacedEgammaFilter.h
Expand Up @@ -26,21 +26,21 @@ class HLTDisplacedEgammaFilter : public HLTFilter {
explicit HLTDisplacedEgammaFilter(const edm::ParameterSet&);
~HLTDisplacedEgammaFilter();
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) const;
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;

private:
edm::InputTag inputTag_; // input tag identifying product contains egammas
edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> inputToken_;
int ncandcut_; // number of egammas required
bool relaxed_;
edm::InputTag L1IsoCollTag_;
edm::InputTag L1NonIsoCollTag_;
edm::InputTag L1IsoCollTag_;
edm::InputTag L1NonIsoCollTag_;
edm::InputTag rechitsEB ;
edm::InputTag rechitsEE ;
edm::EDGetTokenT<EcalRecHitCollection> rechitsEBToken_;
edm::EDGetTokenT<EcalRecHitCollection> rechitsEEToken_;

bool EBOnly ;
bool EBOnly ;
double sMin_min ;
double sMin_max ;
double sMaj_min ;
Expand Down
6 changes: 3 additions & 3 deletions HLTrigger/Egamma/interface/HLTEgammaAllCombMassFilter.h
Expand Up @@ -20,10 +20,10 @@ class HLTEgammaAllCombMassFilter : public HLTFilter {
public:
explicit HLTEgammaAllCombMassFilter(const edm::ParameterSet&);
~HLTEgammaAllCombMassFilter();
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) const;
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;
static void getP4OfLegCands(const edm::Event& iEvent, const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs>& filterToken, std::vector<math::XYZTLorentzVector>& p4s);
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

private:
edm::InputTag firstLegLastFilterTag_;
edm::InputTag secondLegLastFilterTag_;
Expand All @@ -32,6 +32,6 @@ class HLTEgammaAllCombMassFilter : public HLTFilter {
double minMass_;
};

#endif
#endif


2 changes: 1 addition & 1 deletion HLTrigger/Egamma/interface/HLTEgammaCaloIsolFilterPairs.h
Expand Up @@ -30,7 +30,7 @@ class HLTEgammaCaloIsolFilterPairs : public HLTFilter {
public:
explicit HLTEgammaCaloIsolFilterPairs(const edm::ParameterSet&);
~HLTEgammaCaloIsolFilterPairs();
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) const;
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

private:
Expand Down
6 changes: 3 additions & 3 deletions HLTrigger/Egamma/interface/HLTEgammaCombMassFilter.h
Expand Up @@ -21,10 +21,10 @@ class HLTEgammaCombMassFilter : public HLTFilter {
public:
explicit HLTEgammaCombMassFilter(const edm::ParameterSet&);
~HLTEgammaCombMassFilter();
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) const;
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;
static void getP4OfLegCands(const edm::Event& iEvent, const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs>& filterToken, std::vector<math::XYZTLorentzVector>& p4s);
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

private:
edm::InputTag firstLegLastFilterTag_;
edm::InputTag secondLegLastFilterTag_;
Expand All @@ -33,6 +33,6 @@ class HLTEgammaCombMassFilter : public HLTFilter {
double minMass_;
};

#endif
#endif


8 changes: 4 additions & 4 deletions HLTrigger/Egamma/interface/HLTEgammaDoubleEtDeltaPhiFilter.h
Expand Up @@ -24,17 +24,17 @@ class HLTEgammaDoubleEtDeltaPhiFilter : public HLTFilter {
public:
explicit HLTEgammaDoubleEtDeltaPhiFilter(const edm::ParameterSet&);
~HLTEgammaDoubleEtDeltaPhiFilter();
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) const;
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

private:
edm::InputTag inputTag_; // input tag identifying product contains filtered candidates
edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> inputToken_;
double etcut_; // Et threshold in GeV
double etcut_; // Et threshold in GeV
double minDeltaPhi_; // minimum deltaPhi
// int ncandcut_; // number of egammas required
// int ncandcut_; // number of egammas required
bool relaxed_;
edm::InputTag L1IsoCollTag_;
edm::InputTag L1IsoCollTag_;
edm::InputTag L1NonIsoCollTag_;
};

Expand Down
10 changes: 5 additions & 5 deletions HLTrigger/Egamma/interface/HLTEgammaDoubleEtFilter.h
Expand Up @@ -28,18 +28,18 @@ class HLTEgammaDoubleEtFilter : public HLTFilter {
public:
explicit HLTEgammaDoubleEtFilter(const edm::ParameterSet&);
~HLTEgammaDoubleEtFilter();
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) const;
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

private:
edm::InputTag candTag_; // input tag identifying product contains filtered candidates
edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> candToken_;
double etcut1_; // Et threshold in GeV
double etcut2_; // Et threshold in GeV
double etcut1_; // Et threshold in GeV
double etcut2_; // Et threshold in GeV
int npaircut_; // number of egammas required
bool relaxed_;
edm::InputTag L1IsoCollTag_;
edm::InputTag L1NonIsoCollTag_;
edm::InputTag L1IsoCollTag_;
edm::InputTag L1NonIsoCollTag_;
};

#endif //HLTEgammaDoubleEtFilter_h

0 comments on commit 5ab8caf

Please sign in to comment.