10 : m_l1GtRecordInputTag(
pset.getParameter<
edm::
InputTag>(
"l1GtRecordInputTag")),
11 m_l1GtReadoutRecordInputTag(
pset.getParameter<
edm::
InputTag>(
"l1GtReadoutRecordInputTag")),
12 m_l1GtTriggerMenuLiteInputTag(
pset.getParameter<
edm::
InputTag>(
"l1GtTriggerMenuLiteInputTag")) {
27 template <
typename C,
typename T>
29 C const& iPreferredTags,
33 const char* iTypeForErrorMessage) {
34 if (ioTag.
label().empty()) {
38 ioToken = iCollector.
consumes(ioTag);
40 <<
"Input tag found for " << iTypeForErrorMessage <<
" product.\n Input tag set to " << (ioTag) <<
"\n Tag is" 41 << ((iPreferredTags.end() !=
std::find(iPreferredTags.begin(), iPreferredTags.end(), ioTag.
label())) ?
"" 43 <<
" found in preferred tags list " << std::endl;
46 bool alreadyFoundPreferred =
47 iPreferredTags.end() !=
std::find(iPreferredTags.begin(), iPreferredTags.end(), ioTag.
label());
48 if (alreadyFoundPreferred) {
49 if (
std::find(iPreferredTags.begin(), iPreferredTags.end(), iDesc.
moduleLabel()) != iPreferredTags.end()) {
50 edm::LogError(
"L1GtUtils") <<
"Found multiple preferred input tags for " << iTypeForErrorMessage
52 <<
"\nwith different instaces or processes." 53 <<
"\nTag already found: " << (ioTag) <<
"\nOther tag: " 56 <<
"\nToken set to invalid." << std::endl;
64 if (itFound != iPreferredTags.end()) {
69 ioToken = iCollector.
consumes(ioTag);
70 edm::LogWarning(
"L1GtUtils") <<
"Found preferred tag " << (ioTag) <<
"\n after having set unpreferred tag (" 71 << oldTag <<
") for " << iTypeForErrorMessage
72 <<
".\n Please change configuration to explicitly use the tag given above.\n " 73 "This will avoid unnecessary prefetching of data not used.";
76 edm::LogWarning(
"L1GtUtils") <<
"Found multiple input tags for " << iTypeForErrorMessage <<
" product." 77 <<
"\nNone is in the preferred input tags - no safe choice." 78 <<
"\nTag already found: " << (ioTag) <<
"\nOther tag: " 81 <<
"\nToken set to invalid." << std::endl;
91 bool findReadoutRecord,
93 if (branchDescription.
dropped()) {
120 std::vector<edm::InputTag> preferredL1GtReadoutRecordInputTag = {
edm::InputTag(
"gtDigis"),
123 std::vector<edm::InputTag> preferredL1GtTriggerMenuLiteInputTag = {
edm::InputTag(
"gtDigis"),
130 setConsumesAndCheckAmbiguities(branchDescription,
131 preferredL1GtRecordInputTag,
135 "L1GlobalTriggerRecord");
142 setConsumesAndCheckAmbiguities(branchDescription,
143 preferredL1GtReadoutRecordInputTag,
147 "L1GlobalTriggerReadoutRecord");
154 setConsumesAndCheckAmbiguities(branchDescription,
155 preferredL1GtTriggerMenuLiteInputTag,
159 "L1GtTriggerMenuLite");
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::InputTag m_l1GtReadoutRecordInputTag
BranchType const & branchType() const
TypeID unwrappedTypeID() const
std::string const & processName() const
edm::EDGetTokenT< L1GtTriggerMenuLite > m_l1GtTriggerMenuLiteToken
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
edm::InputTag m_l1GtTriggerMenuLiteInputTag
edm::InputTag m_l1GtRecordInputTag
std::string const & productInstanceName() const
static void fillDescription(edm::ParameterSetDescription &desc)
edm::EDGetTokenT< L1GlobalTriggerRecord > m_l1GtRecordToken
void checkToUpdateTags(edm::BranchDescription const &branchDescription, edm::ConsumesCollector, bool findRecord, bool findReadoutRecord, bool findMenuLite)
static const bool useL1GtTriggerMenuLite(true)
Log< level::Warning, false > LogWarning
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtReadoutRecordToken
std::string const & moduleLabel() const
L1GtUtilsHelper(edm::ParameterSet const &pset, edm::ConsumesCollector &iC, bool useL1GtTriggerMenuLite)