12 #include <boost/shared_ptr.hpp>
80 bxFirst_ (iConfig.getParameter<int>(
"bxFirst")),
81 bxLast_ (iConfig.getParameter<int>(
"bxLast")),
82 setBptxAND_ (iConfig.getParameter<bool>(
"setBptxAND")),
83 setBptxPlus_ (iConfig.getParameter<bool>(
"setBptxPlus")),
84 setBptxMinus_ (iConfig.getParameter<bool>(
"setBptxMinus")),
85 setBptxOR_ (iConfig.getParameter<bool>(
"setBptxOR"))
88 produces<GlobalExtBlkBxCollection>();
110 LogDebug(
"L1TExtCondProducer") <<
"L1TExtCondProducer::produce function called...\n";
116 if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
125 std::map<std::string, unsigned int> extBitMap = gtParser.
getExternalSignals(utml1GtMenu);
127 m_l1GtMenuCacheID = l1GtMenuCacheID;
128 m_extBitMap = extBitMap;
137 bool foundBptxAND = ( m_extBitMap.find(
"BPTX_plus_AND_minus.v0")!=m_extBitMap.end() );
138 bool foundBptxPlus = ( m_extBitMap.find(
"BPTX_plus.v0")!=m_extBitMap.end() );
139 bool foundBptxMinus = ( m_extBitMap.find(
"BPTX_minus.v0")!=m_extBitMap.end() );
140 bool foundBptxOR = ( m_extBitMap.find(
"BPTX_plus_OR_minus.v0")!=m_extBitMap.end() );
143 if( setBptxAND_ && foundBptxAND ) extCond_bx.
setExternalDecision(m_extBitMap[
"BPTX_plus_AND_minus.v0"],
true);
144 if( setBptxPlus_ && foundBptxPlus ) extCond_bx.
setExternalDecision(m_extBitMap[
"BPTX_plus.v0"],
true);
145 if( setBptxMinus_ && foundBptxMinus ) extCond_bx.
setExternalDecision(m_extBitMap[
"BPTX_minus.v0"],
true);
146 if( setBptxOR_ && foundBptxOR ) extCond_bx.
setExternalDecision(m_extBitMap[
"BPTX_plus_OR_minus.v0"],
true);
149 for(
int iBx=bxFirst_; iBx<=bxLast_; iBx++ ){
150 extCond->push_back(iBx, extCond_bx);
163 desc.
add<
bool>(
"setBptxMinus",
true);
164 desc.
add<
bool>(
"setBptxAND",
true);
165 desc.
add<
int>(
"bxFirst", -2);
166 desc.
add<
bool>(
"setBptxOR",
true);
167 desc.
add<
int>(
"bxLast", 2);
168 desc.
add<
bool>(
"setBptxPlus",
true);
169 descriptions.
add(
"simGtExtFakeProd", desc);
BXVector< GlobalExtBlk > GlobalExtBlkBxCollection
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
#define DEFINE_FWK_MODULE(type)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
L1TExtCondProducer(const ParameterSet &)
void setExternalDecision(unsigned int bit, bool val)
Set decision bits.
unsigned long long m_l1GtMenuCacheID
T const * product() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::map< std::string, unsigned int > m_extBitMap
virtual void produce(edm::Event &, const edm::EventSetup &) override