19 produces<nanoaod::FlatTable>();
25 auto npuTab = std::make_unique<nanoaod::FlatTable>(1,
"Pileup",
true);
40 for(
unsigned int ibx=0; ibx<npuProd.size(); ibx++) {
41 if(npuProd[ibx].getBunchCrossing()==0) {
43 nt = npuProd[ibx].getTrueNumInteractions();
44 npu = npuProd[ibx].getPU_NumInteractions();
47 unsigned int eoot = 0;
48 for(
unsigned int ipu=0; ipu<bx0; ipu++) {
49 eoot+=npuProd[ipu].getPU_NumInteractions();
51 unsigned int loot = 0;
52 for(
unsigned int ipu=npuProd.size()-1; ipu>bx0; ipu--) {
53 loot+=npuProd[ipu].getPU_NumInteractions();
64 descriptions.
add(
"puTable", desc);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void produce(edm::StreamID id, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
NPUTablesProducer(edm::ParameterSet const ¶ms)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void addColumnValue(const std::string &name, const C &value, const std::string &docString, ColumnType type=defaultColumnType< T >(), int mantissaBits=-1)
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > npuTag_
void fillNPUObjectTable(const std::vector< PileupSummaryInfo > &npuProd, nanoaod::FlatTable &out) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~NPUTablesProducer() override