86 : fOutPath_(iConfig.getUntrackedParameter<std::string>(
"OutputFilePath",
"shotChannels.dat")),
88 digicollection_(iConfig.getParameter<edm::InputTag>(
"DigiCollection")),
89 zs_(iConfig.getUntrackedParameter<bool>(
"ZeroSuppressed",
true))
120 const std::vector<APVShot>& shots = apvsf.
getShots();
126 unsigned int lShots = 0;
132 for (
unsigned int iCh = 0;
138 uint32_t lDetId = lConnection.
detId();
141 for(std::vector<APVShot>::const_iterator shot=shots.begin();shot!=shots.end();++shot) {
143 if (shot->detId() == lDetId &&
144 static_cast<short>(shot->apvNumber()/2.) == lAPVPair)
146 if(shot->isGenuine()) {
148 fOut_ << fedId <<
" " << iCh <<
" " << shot->detId() <<
" " << shot->apvNumber() << std::endl;
151 if (shot->apvNumber()%2==1)
break;
157 if (lShots > 0)
fOut_ <<
"### " << iEvent.
id().
event() <<
" " << lShots << std::endl;
168 if (!
fOut_)
std::cout <<
" WARNING ! Cannot open file " <<
fOutPath_ <<
" for writting. List of shot channels will not be saved." << std::endl;
EventNumber_t event() const
const SiStripFedCabling * cabling_
#define DEFINE_FWK_MODULE(type)
uint16_t apvPairNumber() const
const FedChannelConnection & connection(uint16_t fed_id, uint16_t fed_ch) const
SiStripShotFilter(const edm::ParameterSet &)
virtual bool filter(edm::Event &, const edm::EventSetup &)
void updateCabling(const edm::EventSetup &eventSetup)
const std::vector< APVShot > & getShots() const
const uint32_t & detId() const
Class containning control, module, detector and connection information, at the level of a FED channel...
edm::InputTag digicollection_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T const * product() const
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
static const uint16_t FEDCH_PER_FED