CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Public Attributes
EgammaHLTExtraProducer::Tokens Struct Reference

Classes

struct  EgObjTokens
 

Public Member Functions

 Tokens (const edm::ParameterSet &pset, edm::ConsumesCollector &&cc)
 

Static Public Member Functions

template<typename T >
static void setToken (edm::EDGetTokenT< T > &token, edm::ConsumesCollector &cc, const edm::ParameterSet &pset, const std::string &tagname)
 
template<typename T >
static void setToken (std::vector< edm::EDGetTokenT< T >> &tokens, edm::ConsumesCollector &cc, const edm::ParameterSet &pset, const std::string &tagname)
 
template<typename T >
static void setToken (std::vector< std::pair< edm::EDGetTokenT< T >, std::string >> &tokens, edm::ConsumesCollector &cc, const edm::ParameterSet &pset, const std::string &tagname)
 
static void setToken (std::vector< std::pair< EgObjTokens, std::string >> &tokens, edm::ConsumesCollector &cc, const edm::ParameterSet &pset, const std::string &tagname)
 

Public Attributes

std::vector< std::pair
< edm::EDGetTokenT
< EcalRecHitCollection >
, std::string > > 
ecal
 
std::vector< std::pair
< EgObjTokens, std::string > > 
egCands
 
std::vector< std::pair
< edm::EDGetTokenT
< HBHERecHitCollection >
, std::string > > 
hcal
 
std::vector< std::pair
< edm::EDGetTokenT
< reco::PFClusterCollection >
, std::string > > 
pfClusIso
 
std::vector< std::pair
< edm::EDGetTokenT
< reco::TrackCollection >
, std::string > > 
trks
 

Detailed Description

Definition at line 116 of file EgammaHLTExtraProducer.cc.

Constructor & Destructor Documentation

EgammaHLTExtraProducer::Tokens::Tokens ( const edm::ParameterSet pset,
edm::ConsumesCollector &&  cc 
)

Definition at line 188 of file EgammaHLTExtraProducer.cc.

References ecal, egCands, hcal, pfClusIso, setToken(), and trks.

188  {
189  setToken(egCands, cc, pset, "egCands");
190  setToken(ecal, cc, pset, "ecal");
191  setToken(hcal, cc, pset, "hcal");
192  setToken(trks, cc, pset, "trks");
193  setToken(pfClusIso, cc, pset, "pfClusIso");
194 }
std::vector< std::pair< edm::EDGetTokenT< reco::PFClusterCollection >, std::string > > pfClusIso
std::vector< std::pair< edm::EDGetTokenT< reco::TrackCollection >, std::string > > trks
std::vector< std::pair< edm::EDGetTokenT< HBHERecHitCollection >, std::string > > hcal
std::vector< std::pair< edm::EDGetTokenT< EcalRecHitCollection >, std::string > > ecal
static void setToken(edm::EDGetTokenT< T > &token, edm::ConsumesCollector &cc, const edm::ParameterSet &pset, const std::string &tagname)
std::vector< std::pair< EgObjTokens, std::string > > egCands

Member Function Documentation

template<typename T >
static void EgammaHLTExtraProducer::Tokens::setToken ( edm::EDGetTokenT< T > &  token,
edm::ConsumesCollector cc,
const edm::ParameterSet pset,
const std::string &  tagname 
)
inlinestatic

Definition at line 131 of file EgammaHLTExtraProducer.cc.

References edm::ConsumesCollector::consumes(), edm::ParameterSet::getParameter(), and createPayload::tagname.

Referenced by setToken(), and Tokens().

134  {
135  token = cc.consumes<T>(pset.getParameter<edm::InputTag>(tagname));
136  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
long double T
template<typename T >
static void EgammaHLTExtraProducer::Tokens::setToken ( std::vector< edm::EDGetTokenT< T >> &  tokens,
edm::ConsumesCollector cc,
const edm::ParameterSet pset,
const std::string &  tagname 
)
inlinestatic

Definition at line 138 of file EgammaHLTExtraProducer.cc.

References edm::ConsumesCollector::consumes(), edm::ParameterSet::getParameter(), and createPayload::tagname.

141  {
142  auto inputTags = pset.getParameter<std::vector<edm::InputTag>>(tagname);
143  tokens.resize(inputTags.size());
144  for (size_t tagNr = 0; tagNr < inputTags.size(); tagNr++) {
145  tokens[tagNr] = cc.consumes<T>(inputTags[tagNr]);
146  }
147  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
long double T
template<typename T >
static void EgammaHLTExtraProducer::Tokens::setToken ( std::vector< std::pair< edm::EDGetTokenT< T >, std::string >> &  tokens,
edm::ConsumesCollector cc,
const edm::ParameterSet pset,
const std::string &  tagname 
)
inlinestatic

Definition at line 149 of file EgammaHLTExtraProducer.cc.

References edm::ConsumesCollector::consumes(), edm::ParameterSet::getParameter(), label, eostools::move(), AlCaHLTBitMon_QueryRunRegistry::string, createPayload::tagname, and unpackBuffers-CaloStage2::token.

152  {
153  const auto& collectionPSets = pset.getParameter<std::vector<edm::ParameterSet>>(tagname);
154  for (const auto& collPSet : collectionPSets) {
155  edm::EDGetTokenT<T> token = cc.consumes<T>(collPSet.getParameter<edm::InputTag>("src"));
156  std::string label = collPSet.getParameter<std::string>("label");
157  tokens.emplace_back(token, std::move(label));
158  }
159  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
char const * label
def move
Definition: eostools.py:511
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
long double T
static void EgammaHLTExtraProducer::Tokens::setToken ( std::vector< std::pair< EgObjTokens, std::string >> &  tokens,
edm::ConsumesCollector cc,
const edm::ParameterSet pset,
const std::string &  tagname 
)
inlinestatic

Definition at line 161 of file EgammaHLTExtraProducer.cc.

References EgammaHLTExtraProducer::Tokens::EgObjTokens::ecalCands, edm::ParameterSet::getParameter(), EgammaHLTExtraProducer::Tokens::EgObjTokens::gsfTracks, label, eostools::move(), EgammaHLTExtraProducer::Tokens::EgObjTokens::pixelSeeds, setToken(), AlCaHLTBitMon_QueryRunRegistry::string, and createPayload::tagname.

164  {
165  const auto& collectionPSets = pset.getParameter<std::vector<edm::ParameterSet>>(tagname);
166  for (const auto& collPSet : collectionPSets) {
167  EgObjTokens objTokens;
168  setToken(objTokens.ecalCands, cc, collPSet, "ecalCands");
169  setToken(objTokens.gsfTracks, cc, collPSet, "gsfTracks");
170  setToken(objTokens.pixelSeeds, cc, collPSet, "pixelSeeds");
171  std::string label = collPSet.getParameter<std::string>("label");
172  tokens.emplace_back(objTokens, std::move(label));
173  }
174  }
char const * label
def move
Definition: eostools.py:511
static void setToken(edm::EDGetTokenT< T > &token, edm::ConsumesCollector &cc, const edm::ParameterSet &pset, const std::string &tagname)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

Member Data Documentation

std::vector<std::pair<edm::EDGetTokenT<EcalRecHitCollection>, std::string> > EgammaHLTExtraProducer::Tokens::ecal

Definition at line 125 of file EgammaHLTExtraProducer.cc.

Referenced by EgammaHLTExtraProducer::produce(), and Tokens().

std::vector<std::pair<EgObjTokens, std::string> > EgammaHLTExtraProducer::Tokens::egCands

Definition at line 123 of file EgammaHLTExtraProducer.cc.

Referenced by EgammaHLTExtraProducer::produce(), and Tokens().

std::vector<std::pair<edm::EDGetTokenT<HBHERecHitCollection>, std::string> > EgammaHLTExtraProducer::Tokens::hcal

Definition at line 126 of file EgammaHLTExtraProducer.cc.

Referenced by EgammaHLTExtraProducer::produce(), and Tokens().

std::vector<std::pair<edm::EDGetTokenT<reco::PFClusterCollection>, std::string> > EgammaHLTExtraProducer::Tokens::pfClusIso

Definition at line 128 of file EgammaHLTExtraProducer.cc.

Referenced by EgammaHLTExtraProducer::produce(), and Tokens().

std::vector<std::pair<edm::EDGetTokenT<reco::TrackCollection>, std::string> > EgammaHLTExtraProducer::Tokens::trks

Definition at line 127 of file EgammaHLTExtraProducer.cc.

Referenced by EgammaHLTExtraProducer::produce(), and Tokens().