11 m_consumesCollector(std::
move(iC)),
12 m_l1tAlgBlkInputTag(pset.getParameter<edm::
InputTag>(
"l1tAlgBlkInputTag")),
13 m_l1tExtBlkInputTag(pset.getParameter<edm::
InputTag>(
"l1tExtBlkInputTag")),
14 m_findL1TAlgBlk(
false),
15 m_findL1TExtBlk(
false),
16 m_foundPreferredL1TAlgBlk(
false),
17 m_foundPreferredL1TExtBlk(
false) {
53 std::vector<edm::InputTag> preferredL1TAlgBlkInputTag = {
56 std::vector<edm::InputTag> preferredL1TExtBlkInputTag = {
62 if (m_findL1TAlgBlk && (!m_foundMultipleL1TAlgBlk)
71 if (m_foundPreferredL1TAlgBlk) {
77 if ((m_l1tAlgBlkInputTag.label() == branchDescription.
moduleLabel())
78 && ((m_l1tAlgBlkInputTag.instance()
80 || (m_l1tAlgBlkInputTag.process()
84 <<
"\nWARNING: Found multiple preferred input tags for GlobalAlgBlkBxCollection, "
85 <<
"\nwith different instaces or processes."
86 <<
"\nInput tag already found: "
87 << (m_l1tAlgBlkInputTag) <<
"\nActual tag: " << (
tag)
88 <<
"\nInput tag set to empty tag." << std::endl;
90 m_foundMultipleL1TAlgBlk =
true;
95 for (std::vector<edm::InputTag>::const_iterator itPrefTag =
96 preferredL1TAlgBlkInputTag.begin(), itPrefTagEnd =
97 preferredL1TAlgBlkInputTag.end();
98 itPrefTag != itPrefTagEnd; ++itPrefTag) {
100 if (branchDescription.
moduleLabel() == itPrefTag->label()) {
101 m_l1tAlgBlkInputTag =
tag;
103 m_foundPreferredL1TAlgBlk =
true;
107 <<
"\nWARNING: Input tag for GlobalAlgBlkBxCollection product set to preferred input tag"
108 << (
tag) << std::endl;
114 if (!m_foundPreferredL1TAlgBlk) {
119 if (m_inputTagsL1TAlgBlk.size() > 1) {
122 <<
"\nWARNING: Found multiple input tags for GlobalAlgBlkBxCollection product."
123 <<
"\nNone is in the preferred input tags - no safe choice."
124 <<
"\nInput tag already found: "
125 << (m_l1tAlgBlkInputTag) <<
"\nActual tag: " << (
tag)
126 <<
"\nInput tag set to empty tag." << std::endl;
128 m_foundMultipleL1TAlgBlk =
true;
131 if (m_l1tAlgBlkToken.isUninitialized()) {
133 m_l1tAlgBlkInputTag =
tag;
134 m_inputTagsL1TAlgBlk.push_back(
tag);
138 <<
"\nWARNING: No preferred input tag found for GlobalAlgBlkBxCollection."
139 <<
"\nInput tag set to " << (
tag) << std::endl;
147 if (m_findL1TExtBlk && (!m_foundMultipleL1TExtBlk)
156 if (m_foundPreferredL1TExtBlk) {
163 if ((m_l1tExtBlkInputTag.label()
165 && ((m_l1tExtBlkInputTag.instance()
167 || (m_l1tExtBlkInputTag.process()
171 <<
"\nWARNING: Found multiple preferred input tags for GlobalExtBlkBxCollection, "
172 <<
"\nwith different instaces or processes."
173 <<
"\nInput tag already found: "
174 << (m_l1tExtBlkInputTag) <<
"\nActual tag: "
175 << (
tag) <<
"\nInput tag set to empty tag."
178 m_foundMultipleL1TExtBlk =
true;
184 for (std::vector<edm::InputTag>::const_iterator itPrefTag =
185 preferredL1TExtBlkInputTag.begin(), itPrefTagEnd =
186 preferredL1TExtBlkInputTag.end();
187 itPrefTag != itPrefTagEnd; ++itPrefTag) {
189 if (branchDescription.
moduleLabel() == itPrefTag->label()) {
190 m_l1tExtBlkInputTag =
tag;
192 m_foundPreferredL1TExtBlk =
true;
196 <<
"\nWARNING: Input tag for GlobalExtBlkBxCollection product set to preferred input tag"
197 << (
tag) << std::endl;
203 if (!m_foundPreferredL1TExtBlk) {
208 if (m_inputTagsL1TExtBlk.size() > 1) {
211 <<
"\nWARNING: Found multiple input tags for GlobalExtBlkBxCollection."
212 <<
"\nNone is in the preferred input tags - no safe choice."
213 <<
"\nInput tag already found: "
214 << (m_l1tExtBlkInputTag) <<
"\nActual tag: "
215 << (
tag) <<
"\nInput tag set to empty tag."
218 m_foundMultipleL1TExtBlk =
true;
221 if (m_l1tExtBlkToken.isUninitialized()) {
223 m_l1tExtBlkInputTag =
tag;
224 m_inputTagsL1TExtBlk.push_back(
tag);
228 <<
"\nWARNING: No preferred input tag found for GlobalExtBlkBxCollection product."
229 <<
"\nInput tag set to " << (
tag) << std::endl;
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
BranchType const & branchType() const
std::string const & processName() const
L1TGlobalUtilHelper(edm::ParameterSet const &pset, edm::ConsumesCollector &iC)
edm::EDGetTokenT< GlobalExtBlkBxCollection > m_l1tExtBlkToken
std::string const & moduleLabel() const
std::string const & productInstanceName() const
TypeID unwrappedTypeID() const
static void fillDescription(edm::ParameterSetDescription &desc)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1tAlgBlkToken
edm::InputTag m_l1tAlgBlkInputTag
edm::InputTag m_l1tExtBlkInputTag
void operator()(edm::BranchDescription const &branchDescription)
volatile std::atomic< bool > shutdown_flag false
void push_back(int bx, T object)