105 : _selectAPVshots (iConfig.getUntrackedParameter<bool>(
"selectAPVshots",
true))
106 , _zs (iConfig.getUntrackedParameter<bool>(
"zeroSuppressed",
true))
108 , _useCabling (iConfig.getUntrackedParameter<bool>(
"useCabling",
true))
118 heToken_ = consumes<EventWithHistory> (historyProduct);
119 apvphaseToken_ = consumes<APVCyclePhaseCollection> (apvphasecoll);
120 digisToken_ = consumes<edm::DetSetVector<SiStripDigi> >(digicollection);
162 std::vector<int> nshotsperFed;
166 const uint16_t lNumFeds = (siStripFedIdMax-siStripFedIdMin)+1;
168 nshotsperFed.resize(lNumFeds,0);
172 const std::vector<APVShot>& shots = apvsf.
getShots();
174 for (std::vector<APVShot>::const_iterator shot=shots.begin(); shot!=shots.end(); ++shot) {
175 if ( !shot->isGenuine() )
continue;
179 uint32_t det=shot->detId();
182 int apvPair = shot->apvNumber()/2;
183 LogDebug(
"APVShotsFilter") << apvPair;
190 lChannelId = theConn.
fedCh();
191 thelFEDId = theConn.
fedId();
194 edm::LogWarning(
"APVShotsFilter") <<
"connection of det " << det <<
" APV pair " << apvPair <<
" not found";
196 LogDebug(
"APVShotsFilter") << thelFEDId <<
" " << lChannelId ;
200 if (!(conns.size()))
continue;
202 for (uint32_t ch = 0; ch<conns.size(); ch++) {
203 if(conns[ch] && conns[ch]->isConnected()) {
204 LogDebug(
"APVShotsFilter") << *(conns[ch]);
205 LogDebug(
"APVShotsFilter") <<
"Ready for FED id " << ch;
206 lFedId = conns[ch]->fedId();
207 LogDebug(
"APVShotsFilter") <<
"obtained FED id " << ch <<
" " << lFedId;
211 edm::LogWarning(
"APVShotsFilter") << lFedId <<
" for detid " << det <<
" connection " << ch;
218 edm::LogWarning(
"APVShotsFilter") << lFedId <<
"found for detid " << det;
222 if(lFedId != thelFEDId) {
223 edm::LogWarning(
"APVShotsFilter") <<
" Mismatch in FED id for det " << det <<
" APV pair "
224 << apvPair <<
" : " << lFedId <<
" vs " << thelFEDId;
230 LogDebug(
"APVShotsFilter") <<
" ready to be filled with " << thelFEDId <<
" " << lChannelId;
231 LogDebug(
"APVShotsFilter") <<
" filled with " << thelFEDId <<
" " << lChannelId;
236 bool foundAPVshots = (nshots > 0);
T getParameter(std::string const &) const
const SiStripDetCabling * _detCabling
The cabling object.
virtual bool filter(edm::Event &, const edm::EventSetup &)
const FedChannelConnection & getConnection(uint32_t det_id, unsigned short apv_pair) const
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digisToken_
const uint16_t & fedCh() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< APVCyclePhaseCollection > apvphaseToken_
const uint16_t & fedId() const
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
virtual bool endRun(edm::Run &, edm::EventSetup const &)
const std::vector< APVShot > & getShots() const
void addDefault(ParameterSetDescription const &psetDescription)
APVShotsFilter(const edm::ParameterSet &)
void updateDetCabling(const edm::EventSetup &setup)
Class containning control, module, detector and connection information, at the level of a FED channel...
virtual bool endLuminosityBlock(edm::LuminosityBlock &, edm::EventSetup const &)
virtual bool beginLuminosityBlock(edm::LuminosityBlock &, edm::EventSetup const &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
uint32_t _cacheIdDet
DB cache ID used to establish if the cabling has changed during the run.
virtual bool beginRun(edm::Run &, edm::EventSetup const &)
T const * product() const
edm::EDGetTokenT< EventWithHistory > heToken_
static const uint16_t FED_ID_MAX
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")