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

Constructor & Destructor Documentation

◆ Tokens()

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

Definition at line 186 of file EgammaHLTExtraProducer.cc.

186  {
187  setToken(egCands, cc, pset, "egCands");
188  setToken(ecal, cc, pset, "ecal");
189  setToken(hcal, cc, pset, "hcal");
190  setToken(trks, cc, pset, "trks");
191  setToken(pfClusIso, cc, pset, "pfClusIso");
192 }

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

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

134  {
135  token = cc.consumes<T>(pset.getParameter<edm::InputTag>(tagname));
136  }

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

Referenced by setToken(), and Tokens().

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

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  }

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

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

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  }

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

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

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  }

References 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.

Member Data Documentation

◆ ecal

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

◆ egCands

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

◆ hcal

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

◆ pfClusIso

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

◆ trks

std::vector<std::pair<edm::EDGetTokenT<reco::TrackCollection>, std::string> > EgammaHLTExtraProducer::Tokens::trks
edm::EDGetTokenT
Definition: EDGetToken.h:33
hcal
Definition: ConfigurationDatabase.cc:13
ecal
Definition: ElectronicsMappingGPU.h:13
EgammaHLTExtraProducer::Tokens::egCands
std::vector< std::pair< EgObjTokens, std::string > > egCands
Definition: EgammaHLTExtraProducer.cc:123
EgammaHLTExtraProducer::Tokens::trks
std::vector< std::pair< edm::EDGetTokenT< reco::TrackCollection >, std::string > > trks
Definition: EgammaHLTExtraProducer.cc:127
HLTMuonOfflineAnalyzer_cfi.inputTags
inputTags
All input tags are specified in this pset for convenience.
Definition: HLTMuonOfflineAnalyzer_cfi.py:82
cc
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
createPayload.tagname
tagname
Definition: createPayload.py:183
EgammaHLTExtraProducer::Tokens::setToken
static void setToken(edm::EDGetTokenT< T > &token, edm::ConsumesCollector &cc, const edm::ParameterSet &pset, const std::string &tagname)
Definition: EgammaHLTExtraProducer.cc:131
eostools.move
def move(src, dest)
Definition: eostools.py:511
T
long double T
Definition: Basic3DVectorLD.h:48
EgammaHLTExtraProducer::Tokens::pfClusIso
std::vector< std::pair< edm::EDGetTokenT< reco::PFClusterCollection >, std::string > > pfClusIso
Definition: EgammaHLTExtraProducer.cc:128
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316