87 :
fOutPath_(iConfig.getUntrackedParameter<
std::
string>(
"OutputFilePath",
"shotChannels.dat")),
90 zs_(iConfig.getUntrackedParameter<
bool>(
"ZeroSuppressed",
true))
123 const std::vector<APVShot>& shots = apvsf.
getShots();
129 unsigned int lShots = 0;
135 for (
unsigned int iCh = 0;
141 uint32_t lDetId = lConnection.
detId();
144 for(std::vector<APVShot>::const_iterator shot=shots.begin();shot!=shots.end();++shot) {
146 if (shot->detId() == lDetId &&
147 static_cast<short>(shot->apvNumber()/2.) == lAPVPair)
149 if(shot->isGenuine()) {
151 fOut_ <<
fedId <<
" " << iCh <<
" " << shot->detId() <<
" " << shot->apvNumber() << std::endl;
154 if (shot->apvNumber()%2==1)
break;
160 if (lShots > 0)
fOut_ <<
"### " << iEvent.
id().
event() <<
" " << lShots << std::endl;
171 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_
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
uint16_t apvPairNumber() const
SiStripShotFilter(const edm::ParameterSet &)
void updateCabling(const edm::EventSetup &eventSetup)
const std::vector< APVShot > & getShots() const
#define DEFINE_FWK_MODULE(type)
bool filter(edm::Event &, const edm::EventSetup &) override
const uint32_t & detId() const
Class containning control, module, detector and connection information, at the level of a FED channel...
edm::InputTag digicollection_
~SiStripShotFilter() override
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
static const uint16_t FEDCH_PER_FED
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
T const * product() const