100 ,
_zs (iConfig.getUntrackedParameter<
bool>(
"zeroSuppressed",
true))
112 heToken_ = consumes<EventWithHistory> (historyProduct);
113 apvphaseToken_ = consumes<APVCyclePhaseCollection> (apvphasecoll);
114 digisToken_ = consumes<edm::DetSetVector<SiStripDigi> >(digicollection);
156 std::vector<int> nshotsperFed;
160 const uint16_t lNumFeds = (siStripFedIdMax-siStripFedIdMin)+1;
162 nshotsperFed.resize(lNumFeds,0);
166 const std::vector<APVShot>& shots = apvsf.
getShots();
168 for (std::vector<APVShot>::const_iterator shot=shots.begin(); shot!=shots.end(); ++shot) {
169 if ( !shot->isGenuine() )
continue;
173 uint32_t det=shot->detId();
176 int apvPair = shot->apvNumber()/2;
177 LogDebug(
"APVShotsFilter") << apvPair;
184 lChannelId = theConn.
fedCh();
185 thelFEDId = theConn.
fedId();
188 edm::LogWarning(
"APVShotsFilter") <<
"connection of det " << det <<
" APV pair " << apvPair <<
" not found";
190 LogDebug(
"APVShotsFilter") << thelFEDId <<
" " << lChannelId ;
194 if (!(conns.size()))
continue;
196 for (uint32_t ch = 0; ch<conns.size(); ch++) {
197 if(conns[ch] && conns[ch]->isConnected()) {
198 LogDebug(
"APVShotsFilter") << *(conns[ch]);
199 LogDebug(
"APVShotsFilter") <<
"Ready for FED id " << ch;
200 lFedId = conns[ch]->fedId();
201 LogDebug(
"APVShotsFilter") <<
"obtained FED id " << ch <<
" " << lFedId;
205 edm::LogWarning(
"APVShotsFilter") << lFedId <<
" for detid " << det <<
" connection " << ch;
212 edm::LogWarning(
"APVShotsFilter") << lFedId <<
"found for detid " << det;
216 if(lFedId != thelFEDId) {
217 edm::LogWarning(
"APVShotsFilter") <<
" Mismatch in FED id for det " << det <<
" APV pair " 218 << apvPair <<
" : " << lFedId <<
" vs " << thelFEDId;
224 LogDebug(
"APVShotsFilter") <<
" ready to be filled with " << thelFEDId <<
" " << lChannelId;
225 LogDebug(
"APVShotsFilter") <<
" filled with " << thelFEDId <<
" " << lChannelId;
230 bool foundAPVshots = (nshots > 0);
T getParameter(std::string const &) const
const SiStripDetCabling * _detCabling
The cabling object.
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
def setup(process, global_tag, zero_tesla=False)
edm::EDGetTokenT< APVCyclePhaseCollection > apvphaseToken_
const uint16_t & fedId() const
~APVShotsFilter() override
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
const std::vector< APVShot > & getShots() const
#define DEFINE_FWK_MODULE(type)
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...
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
uint32_t _cacheIdDet
DB cache ID used to establish if the cabling has changed during the run.
edm::EDGetTokenT< EventWithHistory > heToken_
static const uint16_t FED_ID_MAX
T const * product() const
bool filter(edm::Event &, const edm::EventSetup &) override