CMS 3D CMS Logo

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 118 of file EgammaHLTExtraProducer.cc.

Constructor & Destructor Documentation

◆ Tokens()

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

Definition at line 191 of file EgammaHLTExtraProducer.cc.

References gpuPixelDoublets::cc, egCands, pfClusIso, muonDTDigis_cfi::pset, setToken(), and trks.

191  {
192  setToken(egCands, cc, pset, "egCands");
193  setToken(ecal, cc, pset, "ecal");
194  setToken(hcal, cc, pset, "hcal");
195  setToken(trks, cc, pset, "trks");
196  setToken(pfClusIso, cc, pset, "pfClusIso");
197 }
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
std::vector< std::pair< edm::EDGetTokenT< reco::PFClusterCollection >, std::string > > pfClusIso
std::vector< std::pair< edm::EDGetTokenT< reco::TrackCollection >, std::string > > trks
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

◆ setToken() [1/4]

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 133 of file EgammaHLTExtraProducer.cc.

References gpuPixelDoublets::cc, muonDTDigis_cfi::pset, createPayload::tagname, and unpackBuffers-CaloStage2::token.

Referenced by setToken(), and Tokens().

136  {
137  token = cc.consumes<T>(pset.getParameter<edm::InputTag>(tagname));
138  }
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
long double T

◆ setToken() [2/4]

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 140 of file EgammaHLTExtraProducer.cc.

References gpuPixelDoublets::cc, HLTMuonOfflineAnalyzer_cfi::inputTags, muonDTDigis_cfi::pset, and createPayload::tagname.

143  {
144  auto inputTags = pset.getParameter<std::vector<edm::InputTag>>(tagname);
145  tokens.resize(inputTags.size());
146  for (size_t tagNr = 0; tagNr < inputTags.size(); tagNr++) {
147  tokens[tagNr] = cc.consumes<T>(inputTags[tagNr]);
148  }
149  }
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
inputTags
All input tags are specified in this pset for convenience.
long double T

◆ setToken() [3/4]

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 151 of file EgammaHLTExtraProducer.cc.

References gpuPixelDoublets::cc, label, eostools::move(), muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, createPayload::tagname, and unpackBuffers-CaloStage2::token.

154  {
155  const auto& collectionPSets = pset.getParameter<std::vector<edm::ParameterSet>>(tagname);
156  for (const auto& collPSet : collectionPSets) {
157  edm::EDGetTokenT<T> token = cc.consumes<T>(collPSet.getParameter<edm::InputTag>("src"));
158  std::string label = collPSet.getParameter<std::string>("label");
159  tokens.emplace_back(token, std::move(label));
160  }
161  }
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
char const * label
long double T
def move(src, dest)
Definition: eostools.py:511

◆ setToken() [4/4]

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 163 of file EgammaHLTExtraProducer.cc.

References gpuPixelDoublets::cc, EgammaHLTExtraProducer::Tokens::EgObjTokens::ecalCands, EgammaHLTExtraProducer::Tokens::EgObjTokens::gsfTracks, label, eostools::move(), EgammaHLTExtraProducer::Tokens::EgObjTokens::pixelSeeds, muonDTDigis_cfi::pset, setToken(), AlCaHLTBitMon_QueryRunRegistry::string, and createPayload::tagname.

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

Member Data Documentation

◆ ecal

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

Definition at line 127 of file EgammaHLTExtraProducer.cc.

Referenced by EgammaHLTExtraProducer::produce().

◆ egCands

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

Definition at line 125 of file EgammaHLTExtraProducer.cc.

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

◆ hcal

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

Definition at line 128 of file EgammaHLTExtraProducer.cc.

Referenced by EgammaHLTExtraProducer::produce().

◆ pfClusIso

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

Definition at line 130 of file EgammaHLTExtraProducer.cc.

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

◆ trks

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

Definition at line 129 of file EgammaHLTExtraProducer.cc.

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