53 virtual void endJob()
override ;
106 int calibType = -1 ;
int numEmptyFEDs = 0 ;
107 std::vector<int> calibTypeCounter(8,0) ;
111 if ( fedData.
size() < 24 ) numEmptyFEDs++ ;
112 if ( fedData.
size() < 24 )
continue ;
114 calibTypeCounter.at(value)++ ;
119 for (
unsigned int i=0;
i<calibTypeCounter.size();
i++) {
120 if ( calibTypeCounter.at(
i) > maxCount ) {
calibType =
i ; maxCount = calibTypeCounter.at(
i) ; }
121 if ( maxCount == numberOfFEDIds ) break ;
123 if ( maxCount != (numberOfFEDIds-numEmptyFEDs) )
124 edm::LogWarning(
"HcalCalibTypeFilter") <<
"Conflicting calibration types found. Assigning type "
145 edm::LogWarning(
"HcalCalibTypeFilter") <<
"Summary of filter decisions: "
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual ~HcalCalibTypeFilter()
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< int > CalibTypes_
size_t size() const
Lenght of the data buffer in bytes.
virtual bool filter(edm::Event &, const edm::EventSetup &) override
HcalCalibTypeFilter(const edm::ParameterSet &)
virtual void endJob() override
virtual void beginJob() override
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
volatile std::atomic< bool > shutdown_flag false
edm::EDGetTokenT< FEDRawDataCollection > tok_data_
std::vector< int > eventsByType