CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
L1TGlobalProducer Class Reference

#include <L1TGlobalProducer.h>

Inheritance diagram for L1TGlobalProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TGlobalProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~L1TGlobalProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

boost::uint16_t m_activeBoardsGtDaq
 active boards in L1 GT DAQ record More...
 
bool m_algorithmTriggersUnmasked
 
bool m_algorithmTriggersUnprescaled
 
unsigned int m_alternativeNrBxBoardDaq
 
unsigned int m_bstLengthBytes
 length of BST record (in bytes) from event setup More...
 
edm::InputTag m_caloInputTag
 input tag for calorimeter collections from GCT More...
 
edm::EDGetTokenT< BXVector
< l1t::EGamma > > 
m_egInputToken
 
int m_emulateBxInEvent
 
edm::InputTag m_extInputTag
 input tag for external conditions More...
 
edm::EDGetTokenT< BXVector
< GlobalExtBlk > > 
m_extInputToken
 
int m_ifCaloEtaNumberBits
 
int m_ifMuEtaNumberBits
 
std::vector< std::vector< int > > m_initialPrescaleFactorsAlgoTrig
 
std::vector< unsigned int > m_initialTriggerMaskAlgoTrig
 
std::vector< unsigned int > m_initialTriggerMaskVetoAlgoTrig
 
bool m_isDebugEnabled
 
edm::EDGetTokenT< BXVector
< l1t::Jet > > 
m_jetInputToken
 
int m_L1DataBxInEvent
 Bx expected in Data coming to GT. More...
 
const L1GtBoardMapsm_l1GtBM
 board maps - cache only the record More...
 
unsigned long long m_l1GtBMCacheID
 
const TriggerMenum_l1GtMenu
 
unsigned long long m_l1GtMenuCacheID
 
const L1GtParametersm_l1GtPar
 parameters More...
 
unsigned long long m_l1GtParCacheID
 
const L1GtPrescaleFactorsm_l1GtPfAlgo
 prescale factors More...
 
unsigned long long m_l1GtPfAlgoCacheID
 
const GlobalStableParametersm_l1GtStablePar
 cached stuff More...
 
unsigned long long m_l1GtStableParCacheID
 
const L1GtTriggerMaskm_l1GtTmAlgo
 trigger masks & veto masks More...
 
unsigned long long m_l1GtTmAlgoCacheID
 
const L1GtTriggerMaskm_l1GtTmVetoAlgo
 
unsigned long long m_l1GtTmVetoAlgoCacheID
 
edm::InputTag m_muInputTag
 input tag for muon collection from GMT More...
 
edm::EDGetTokenT< BXVector
< l1t::Muon > > 
m_muInputToken
 
int m_nrL1EG
 
int m_nrL1Jet
 
int m_nrL1JetCounts
 
int m_nrL1Mu
 
int m_nrL1Tau
 
unsigned int m_numberDaqPartitions
 number of DAQ partitions More...
 
unsigned int m_numberPhysTriggers
 number of physics triggers More...
 
const std::vector< std::vector
< int > > * 
m_prescaleFactorsAlgoTrig
 
unsigned int m_prescaleSet
 prescale set used More...
 
std::string m_prescalesFile
 CSV file for prescales. More...
 
bool m_produceL1GtDaqRecord
 logical flag to produce the L1 GT DAQ readout record More...
 
bool m_produceL1GtObjectMapRecord
 logical flag to produce the L1 GT object map record More...
 
int m_psBstLengthBytes
 length of BST record (in bytes) from parameter set More...
 
edm::EDGetTokenT< BXVector
< l1t::EtSum > > 
m_sumInputToken
 
edm::EDGetTokenT< BXVector
< l1t::Tau > > 
m_tauInputToken
 
int m_totalBxInEvent
 total number of Bx's in the event coming from EventSetup More...
 
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
 
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
 
l1t::GtBoardm_uGtBrd
 
int m_verbosity
 verbosity level More...
 
bool m_writePsbL1GtDaqRecord
 logical flag to write the PSB content in the L1 GT DAQ record More...
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 41 of file L1TGlobalProducer.h.

Constructor & Destructor Documentation

L1TGlobalProducer::L1TGlobalProducer ( const edm::ParameterSet parSet)
explicit

Definition at line 69 of file L1TGlobalProducer.cc.

References cuy::col, validate-o2o-wbm::f1, plotBeamSpotDB::first, edm::ParameterSet::getParameter(), geometryCSVtoXML::line, LogDebug, LogTrace, m_activeBoardsGtDaq, m_algorithmTriggersUnmasked, m_algorithmTriggersUnprescaled, m_alternativeNrBxBoardDaq, m_bstLengthBytes, m_caloInputTag, m_egInputToken, m_emulateBxInEvent, m_extInputTag, m_extInputToken, m_ifCaloEtaNumberBits, m_ifMuEtaNumberBits, m_initialPrescaleFactorsAlgoTrig, m_initialTriggerMaskAlgoTrig, m_initialTriggerMaskVetoAlgoTrig, m_jetInputToken, m_L1DataBxInEvent, m_l1GtBMCacheID, m_l1GtMenuCacheID, m_l1GtParCacheID, m_l1GtPfAlgoCacheID, m_l1GtStableParCacheID, m_l1GtTmAlgoCacheID, m_l1GtTmVetoAlgoCacheID, m_muInputTag, m_muInputToken, m_nrL1EG, m_nrL1Jet, m_nrL1JetCounts, m_nrL1Mu, m_nrL1Tau, m_numberDaqPartitions, m_numberPhysTriggers, m_prescaleSet, m_prescalesFile, m_produceL1GtDaqRecord, m_produceL1GtObjectMapRecord, m_psBstLengthBytes, m_sumInputToken, m_tauInputToken, m_totalBxInEvent, m_uGtBrd, m_verbosity, m_writePsbL1GtDaqRecord, cmsHarvester::sep, l1t::GtBoard::setVerbosity(), findQualityFiles::size, split, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

69  :
70  m_muInputTag(parSet.getParameter<edm::InputTag> ("GmtInputTag")),
71  m_caloInputTag(parSet.getParameter<edm::InputTag> ("CaloInputTag")),
72  m_extInputTag(parSet.getParameter<edm::InputTag> ("ExtInputTag")),
73  m_produceL1GtDaqRecord(parSet.getParameter<bool> ("ProduceL1GtDaqRecord")),
74  m_produceL1GtObjectMapRecord(parSet.getParameter<bool> ("ProduceL1GtObjectMapRecord")),
75  m_emulateBxInEvent(parSet.getParameter<int> ("EmulateBxInEvent")),
76  m_L1DataBxInEvent(parSet.getParameter<int> ("L1DataBxInEvent")),
77  m_alternativeNrBxBoardDaq(parSet.getParameter<unsigned int> ("AlternativeNrBxBoardDaq")),
78  m_psBstLengthBytes(parSet.getParameter<int> ("BstLengthBytes")),
79  m_prescaleSet(parSet.getParameter<unsigned int> ("PrescaleSet")),
80  m_algorithmTriggersUnprescaled(parSet.getParameter<bool> ("AlgorithmTriggersUnprescaled")),
81  m_algorithmTriggersUnmasked(parSet.getParameter<bool> ("AlgorithmTriggersUnmasked")),
82  m_verbosity(parSet.getUntrackedParameter<int>("Verbosity")),
84 {
85 
86 
87  m_egInputToken = consumes <BXVector<EGamma> > (m_caloInputTag);
88  m_tauInputToken = consumes <BXVector<Tau> > (m_caloInputTag);
89  m_jetInputToken = consumes <BXVector<Jet> > (m_caloInputTag);
90  m_sumInputToken = consumes <BXVector<EtSum> > (m_caloInputTag);
91 
92  m_muInputToken = consumes <BXVector<Muon> > (m_muInputTag);
93 
94  m_extInputToken = consumes <BXVector<GlobalExtBlk> > (m_extInputTag);
95 
96  if (m_verbosity) {
97 
98  LogDebug("l1t|Global") << std::endl;
99 
100  LogTrace("l1t|Global")
101  << "\nInput tag for muon collection from GMT: " << m_muInputTag
102  << "\nInput tag for calorimeter collections from GCT: " << m_caloInputTag
103  << "\nInput tag for external conditions : " << m_extInputTag
104  << std::endl;
105 
106 
107  LogTrace("l1t|Global")
108  << "\nProduce the L1 GT DAQ readout record: " << m_produceL1GtDaqRecord
109  << "\nProduce the L1 GT Object Map record: " << m_produceL1GtObjectMapRecord
110  << " \n"
111  << "\nWrite Psb content to L1 GT DAQ Record: " << m_writePsbL1GtDaqRecord
112  << " \n"
113  << "\nNumber of BxInEvent to be emulated: " << m_emulateBxInEvent
114  << " \n"
115  << "\nAlternative for number of BX in GT DAQ record: 0x" << std::hex
117  << " \n"
118  << "\nLength of BST message [bytes]: " << m_psBstLengthBytes
119  << "\n"
120  << "\nRun algorithm triggers unprescaled: " << m_algorithmTriggersUnprescaled
121  << "\nRun algorithm triggers unmasked (all enabled): " << m_algorithmTriggersUnmasked
122  << "\n"
123  << std::endl;
124  }
125 
126 
127  if ( ( m_emulateBxInEvent > 0 ) && ( ( m_emulateBxInEvent % 2 ) == 0 )) {
129 
130  if (m_verbosity) {
131  edm::LogWarning("L1TGlobalProducer")
132  << "\nWARNING: Number of bunch crossing to be emulated rounded to: "
133  << m_emulateBxInEvent << "\n The number must be an odd number!\n"
134  << std::endl;
135  }
136  }
137 
138 
139  if ( ( m_L1DataBxInEvent > 0 ) && ( ( m_L1DataBxInEvent % 2 ) == 0 )) {
141 
142  if (m_verbosity) {
143  edm::LogWarning("L1TGlobalProducer")
144  << "\nWARNING: Number of bunch crossing for incoming L1 Data rounded to: "
145  << m_L1DataBxInEvent << "\n The number must be an odd number!\n"
146  << std::endl;
147  }
148  } else if( m_L1DataBxInEvent<0) {
149  m_L1DataBxInEvent = 1;
150 
151  if (m_verbosity) {
152  edm::LogWarning("L1TGlobalProducer")
153  << "\nWARNING: Number of bunch crossing for incoming L1 Data was changed to: "
154  << m_L1DataBxInEvent << "\n The number must be an odd positive number!\n"
155  << std::endl;
156  }
157  }
158 
159 
160 
161 
162  // register products
164  produces<GlobalAlgBlkBxCollection>();
165  produces<GlobalExtBlkBxCollection>();
166  }
167 
168 
170  produces<L1GlobalTriggerObjectMapRecord>();
171  }
172 
173 
174  // create new uGt Board
175  m_uGtBrd = new GtBoard();
177 
178  // initialize cached IDs
179 
180  //
181  m_l1GtStableParCacheID = 0ULL;
182  m_l1GtMenuCacheID = 0ULL;
183 
186 
187  m_nrL1Mu = 0;
188  m_nrL1EG = 0;
189  m_nrL1Tau = 0;
190 
191  m_nrL1Jet = 0;
192 
193 
194  m_nrL1JetCounts = 0;
195 
198 
199  //
200  m_l1GtParCacheID = 0ULL;
201 
202  m_totalBxInEvent = 0;
203 
205  m_bstLengthBytes = 0;
206 
207  //
208  m_l1GtBMCacheID = 0ULL;
209 
210  //
211  m_l1GtPfAlgoCacheID = 0ULL;
212 
213  m_l1GtTmAlgoCacheID = 0ULL;
214 
216 
217 
218  // directory in /data/Luminosity for the trigger menu
219  std::string menuDir = parSet.getParameter<std::string>("TriggerMenuLuminosity");
220  //std::string menuDir = "startup";
221 
222  // prescale CSV file file
223  std::string prescaleFileName = parSet.getParameter<std::string>("PrescaleCSVFile");
224 
225  // def.xml file
226  //std::string prescaleFileName = "prescale_L1TGlobal.csv";
227 
228  edm::FileInPath f1("L1Trigger/L1TGlobal/data/Luminosity/" +
229  menuDir + "/" + prescaleFileName);
230 
231  m_prescalesFile = f1.fullPath();
232 
233  unsigned int temp_numberPhysTriggers = 512;
234 
235  // Get prescale factors from CSV file for now
236  std::ifstream inputPrescaleFile;
237  inputPrescaleFile.open(m_prescalesFile);
238 
239  std::vector<std::vector<int> > vec;
240  std::vector<std::vector<int> > prescale_vec;
241 
242  std::vector<unsigned int> temp_triggerMask;
243  std::vector<unsigned int> temp_triggerVetoMask;
244 
245  if( inputPrescaleFile ){
246  std::string prefix1("#");
247  std::string prefix2("-1");
248 
249  std::string line;
250 
251  bool first = true;
252 
253  while( getline(inputPrescaleFile,line) ){
254 
255  if( !line.compare(0, prefix1.size(), prefix1) ) continue;
256  //if( !line.compare(0, prefix2.size(), prefix2) ) continue;
257 
258  istringstream split(line);
259  int value;
260  int col = 0;
261  char sep;
262 
263  while( split >> value ){
264  if( first ){
265  // Each new value read on line 1 should create a new inner vector
266  vec.push_back(std::vector<int>());
267  }
268 
269  vec[col].push_back(value);
270  ++col;
271 
272  // read past the separator
273  split>>sep;
274  }
275 
276  // Finished reading line 1 and creating as many inner
277  // vectors as required
278  first = false;
279  }
280 
281 
282  int NumPrescaleSets = 0;
283 
284  int maskColumn = -1;
285  int maskVetoColumn = -1;
286  for( int iCol=0; iCol<int(vec.size()); iCol++ ){
287  if( vec[iCol].size() > 0 ){
288  int firstRow = vec[iCol][0];
289 
290  if( firstRow > 0 ) NumPrescaleSets++;
291  else if( firstRow==-2 ) maskColumn = iCol;
292  else if( firstRow==-3 ) maskVetoColumn = iCol;
293  }
294  }
295 
296  // Fill default values for mask and veto mask
297  for( unsigned int iBit = 0; iBit < temp_numberPhysTriggers; ++iBit ){
298  unsigned int inputDefaultMask = 1;
299  unsigned int inputDefaultVetoMask = 0;
300  temp_triggerMask.push_back(inputDefaultMask);
301  temp_triggerVetoMask.push_back(inputDefaultVetoMask);
302  }
303 
304  // Fill non-trivial mask and veto mask
305  if( maskColumn>=0 || maskVetoColumn>=0 ){
306  for( int iBit=1; iBit<int(vec[0].size()); iBit++ ){
307  unsigned int algoBit = vec[0][iBit];
308  // algoBit must be less than the number of triggers
309  if( algoBit < temp_numberPhysTriggers ){
310  if( maskColumn>=0 ){
311  unsigned int triggerMask = vec[maskColumn][iBit];
312  temp_triggerMask[algoBit] = triggerMask;
313  }
314  if( maskVetoColumn>=0 ){
315  unsigned int triggerVetoMask = vec[maskVetoColumn][iBit];
316  temp_triggerVetoMask[algoBit] = triggerVetoMask;
317  }
318  }
319  }
320  }
321 
322 
323  if( NumPrescaleSets > 0 ){
324  // Fill default prescale set
325  for( int iSet=0; iSet<NumPrescaleSets; iSet++ ){
326  prescale_vec.push_back(std::vector<int>());
327  for( unsigned int iBit = 0; iBit < temp_numberPhysTriggers; ++iBit ){
328  int inputDefaultPrescale = 1;
329  prescale_vec[iSet].push_back(inputDefaultPrescale);
330  }
331  }
332 
333  // Fill non-trivial prescale set
334  for( int iBit=1; iBit<int(vec[0].size()); iBit++ ){
335  unsigned int algoBit = vec[0][iBit];
336  // algoBit must be less than the number of triggers
337  if( algoBit < temp_numberPhysTriggers ){
338  for( int iSet=0; iSet<int(vec.size()); iSet++ ){
339  int useSet = -1;
340  if( vec[iSet].size() > 0 ){
341  useSet = vec[iSet][0];
342  }
343  useSet -= 1;
344 
345  if( useSet<0 ) continue;
346 
347  int prescale = vec[iSet][iBit];
348  prescale_vec[useSet][algoBit] = prescale;
349  }
350  }
351  else{
352  LogTrace("l1t|Global")
353  << "\nPrescale file has algo bit: " << algoBit
354  << "\nThis is larger than the number of triggers: " << m_numberPhysTriggers
355  << "\nSomething is wrong. Ignoring."
356  << std::endl;
357  }
358  }
359  }
360 
361  }
362  else {
363  LogTrace("l1t|Global")
364  << "\nCould not find file: " << m_prescalesFile
365  << "\nFilling the prescale vectors with prescale 1"
366  << "\nSetting prescale set to 1"
367  << std::endl;
368 
369  m_prescaleSet = 1;
370 
371  for( int col=0; col < 1; col++ ){
372  prescale_vec.push_back(std::vector<int>());
373  for( unsigned int iBit = 0; iBit < temp_numberPhysTriggers; ++iBit ){
374  int inputDefaultPrescale = 1;
375  prescale_vec[col].push_back(inputDefaultPrescale);
376  }
377  }
378  }
379 
380  inputPrescaleFile.close();
381 
382  m_initialPrescaleFactorsAlgoTrig = prescale_vec;
383 
384  m_initialTriggerMaskAlgoTrig = temp_triggerMask;
385  m_initialTriggerMaskVetoAlgoTrig = temp_triggerVetoMask;
386 
387 }
#define LogDebug(id)
T getParameter(std::string const &) const
bool isDebugEnabled()
T getUntrackedParameter(std::string const &, T const &) const
unsigned int m_numberDaqPartitions
number of DAQ partitions
unsigned long long m_l1GtParCacheID
void setVerbosity(const int verbosity)
Definition: GtBoard.h:217
unsigned long long m_l1GtTmVetoAlgoCacheID
int m_verbosity
verbosity level
std::string m_prescalesFile
CSV file for prescales.
edm::EDGetTokenT< BXVector< l1t::Tau > > m_tauInputToken
int m_psBstLengthBytes
length of BST record (in bytes) from parameter set
bool m_produceL1GtObjectMapRecord
logical flag to produce the L1 GT object map record
int m_totalBxInEvent
total number of Bx&#39;s in the event coming from EventSetup
unsigned int m_numberPhysTriggers
number of physics triggers
edm::EDGetTokenT< BXVector< GlobalExtBlk > > m_extInputToken
unsigned long long m_l1GtTmAlgoCacheID
std::vector< unsigned int > m_initialTriggerMaskAlgoTrig
unsigned int m_alternativeNrBxBoardDaq
edm::InputTag m_muInputTag
input tag for muon collection from GMT
edm::InputTag m_extInputTag
input tag for external conditions
unsigned long long m_l1GtMenuCacheID
bool m_writePsbL1GtDaqRecord
logical flag to write the PSB content in the L1 GT DAQ record
std::vector< std::vector< int > > m_initialPrescaleFactorsAlgoTrig
boost::uint16_t m_activeBoardsGtDaq
active boards in L1 GT DAQ record
bool m_produceL1GtDaqRecord
logical flag to produce the L1 GT DAQ readout record
unsigned long long m_l1GtStableParCacheID
edm::EDGetTokenT< BXVector< l1t::Muon > > m_muInputToken
#define LogTrace(id)
l1t::GtBoard * m_uGtBrd
unsigned int m_prescaleSet
prescale set used
edm::InputTag m_caloInputTag
input tag for calorimeter collections from GCT
edm::EDGetTokenT< BXVector< l1t::EtSum > > m_sumInputToken
int m_L1DataBxInEvent
Bx expected in Data coming to GT.
unsigned long long m_l1GtBMCacheID
std::vector< unsigned int > m_initialTriggerMaskVetoAlgoTrig
unsigned int m_bstLengthBytes
length of BST record (in bytes) from event setup
unsigned long long m_l1GtPfAlgoCacheID
int col
Definition: cuy.py:1008
double split
Definition: MVATrainer.cc:139
tuple size
Write out results.
edm::EDGetTokenT< BXVector< l1t::Jet > > m_jetInputToken
edm::EDGetTokenT< BXVector< l1t::EGamma > > m_egInputToken
L1TGlobalProducer::~L1TGlobalProducer ( )

Definition at line 390 of file L1TGlobalProducer.cc.

References m_uGtBrd.

391 {
392 
393  delete m_uGtBrd;
394 
395 }
l1t::GtBoard * m_uGtBrd

Member Function Documentation

void L1TGlobalProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 46 of file L1TGlobalProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

46  {
48  // These parameters are part of the L1T/HLT interface, avoid changing if possible::
49  desc.add<edm::InputTag> ("GmtInputTag", edm::InputTag(""))->setComment("InputTag for Global Muon Trigger (required parameter: default value is invalid)");
50  desc.add<edm::InputTag> ("CaloInputTag", edm::InputTag(""))->setComment("InputTag for Calo Trigger (required parameter: default value is invalid)");
51  desc.add<edm::InputTag> ("ExtInputTag", edm::InputTag(""))->setComment("InputTag for external conditions (not required, but recommend to specify explicitly in config)");
52  desc.add<bool>("AlgorithmTriggersUnprescaled", false)->setComment("not required, but recommend to specify explicitly in config");
53  desc.add<bool>("AlgorithmTriggersUnmasked", false)->setComment("not required, but recommend to specify explicitly in config");
54  // These parameters have well defined default values and are not currently
55  // part of the L1T/HLT interface. They can be cleaned up or updated at will:
56  desc.add<bool> ("ProduceL1GtDaqRecord",true);
57  desc.add<bool> ("ProduceL1GtObjectMapRecord",true);
58  desc.add<int> ("EmulateBxInEvent",1);
59  desc.add<int> ("L1DataBxInEvent",5);
60  desc.add<unsigned int> ("AlternativeNrBxBoardDaq",0);
61  desc.add<int> ("BstLengthBytes",-1);
62  desc.add<unsigned int> ("PrescaleSet",1);
63  desc.addUntracked<int>("Verbosity",0);
64  desc.add<std::string>("TriggerMenuLuminosity","startup");
65  desc.add<std::string>("PrescaleCSVFile","prescale_L1TGlobal.csv");
66  descriptions.add("L1TGlobalProducer", desc);
67 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void L1TGlobalProducer::produce ( edm::Event iEvent,
const edm::EventSetup evSetup 
)
virtual

length of BST message (in bytes) for L1 GT EVM record

Needs error checking that something exists at this bx.

Implements edm::EDProducer.

Definition at line 400 of file L1TGlobalProducer.cc.

References edm::EventBase::bunchCrossing(), l1t::TriggerMenuParser::corCaloTemplate(), l1t::TriggerMenuParser::corEnergySumTemplate(), l1t::TriggerMenuParser::corMuonTemplate(), TauDecayModes::dec, l1t::GtBoard::fillAlgRecord(), l1t::GtBoard::fillExtRecord(), edm::EventSetup::get(), l1t::TriggerMenuParser::gtAlgorithmAliasMap(), l1t::TriggerMenuParser::gtAlgorithmMap(), L1GtParameters::gtBstLengthBytes(), L1GtParameters::gtDaqActiveBoards(), GlobalStableParameters::gtIfCaloEtaNumberBits(), GlobalStableParameters::gtIfMuEtaNumberBits(), GlobalStableParameters::gtNumberConditionChips(), GlobalStableParameters::gtNumberL1CenJet(), GlobalStableParameters::gtNumberL1JetCounts(), GlobalStableParameters::gtNumberL1Mu(), GlobalStableParameters::gtNumberL1NoIsoEG(), GlobalStableParameters::gtNumberL1TauJet(), GlobalStableParameters::gtNumberPhysTriggers(), GlobalStableParameters::gtOrderConditionChip(), GlobalStableParameters::gtPinsOnConditionChip(), l1t::TriggerMenuParser::gtScaleDbKey(), l1t::TriggerMenuParser::gtScales(), L1GtParameters::gtTotalBxInEvent(), l1t::TriggerMenuParser::gtTriggerMenuImplementation(), l1t::TriggerMenuParser::gtTriggerMenuInterface(), l1t::TriggerMenuParser::gtTriggerMenuName(), l1t::GtBoard::init(), LogDebug, LogTrace, m_activeBoardsGtDaq, m_algorithmTriggersUnmasked, m_algorithmTriggersUnprescaled, m_bstLengthBytes, m_egInputToken, m_emulateBxInEvent, m_extInputToken, m_ifCaloEtaNumberBits, m_ifMuEtaNumberBits, m_initialPrescaleFactorsAlgoTrig, m_initialTriggerMaskAlgoTrig, m_initialTriggerMaskVetoAlgoTrig, m_isDebugEnabled, m_jetInputToken, m_L1DataBxInEvent, m_l1GtMenu, m_l1GtMenuCacheID, m_l1GtPar, m_l1GtParCacheID, m_l1GtStablePar, m_l1GtStableParCacheID, m_muInputToken, m_nrL1EG, m_nrL1Jet, m_nrL1JetCounts, m_nrL1Mu, m_nrL1Tau, m_numberDaqPartitions, m_numberPhysTriggers, m_prescaleFactorsAlgoTrig, m_prescaleSet, m_produceL1GtDaqRecord, m_produceL1GtObjectMapRecord, m_sumInputToken, m_tauInputToken, m_totalBxInEvent, m_triggerMaskAlgoTrig, m_triggerMaskVetoAlgoTrig, m_uGtBrd, m_verbosity, edm::EventBase::orbitNumber(), l1t::TriggerMenuParser::parseCondFormats(), reco::print(), edm::ESHandle< class >::product(), edm::Event::put(), l1t::GtBoard::receiveCaloObjectData(), l1t::GtBoard::receiveExternalData(), l1t::GtBoard::receiveMuonObjectData(), l1t::GtBoard::reset(), l1t::GtBoard::runFDL(), l1t::GtBoard::runGTL(), l1t::TriggerMenuParser::setGtNumberConditionChips(), l1t::TriggerMenuParser::setGtNumberPhysTriggers(), l1t::TriggerMenuParser::setGtOrderConditionChip(), l1t::TriggerMenuParser::setGtPinsOnConditionChip(), TriggerMenu_cff::TriggerMenu, l1t::TriggerMenuParser::vecCaloTemplate(), l1t::TriggerMenuParser::vecCorrelationTemplate(), l1t::TriggerMenuParser::vecEnergySumTemplate(), l1t::TriggerMenuParser::vecExternalTemplate(), and l1t::TriggerMenuParser::vecMuonTemplate().

401 {
402 
403  // get / update the parameters from the EventSetup
404  // local cache & check on cacheIdentifier
405 
406  unsigned long long l1GtParCacheID = evSetup.get<L1GtParametersRcd>().cacheIdentifier();
407 
408  if (m_l1GtParCacheID != l1GtParCacheID) {
409 
411  evSetup.get< L1GtParametersRcd >().get( l1GtPar );
412  m_l1GtPar = l1GtPar.product();
413 
414  // total number of Bx's in the event coming from EventSetup
416 
417  // active boards in L1 GT DAQ record and in L1 GT EVM record
419 
422 
423 
424  m_l1GtParCacheID = l1GtParCacheID;
425 
426  }
427 
428  // negative value: emulate TotalBxInEvent as given in EventSetup
429  if (m_emulateBxInEvent < 0) {
431  }
432 
433  int minEmulBxInEvent = (m_emulateBxInEvent + 1)/2 - m_emulateBxInEvent;
434  int maxEmulBxInEvent = (m_emulateBxInEvent + 1)/2 - 1;
435 
436  int minL1DataBxInEvent = (m_L1DataBxInEvent + 1)/2 - m_L1DataBxInEvent;
437  int maxL1DataBxInEvent = (m_L1DataBxInEvent + 1)/2 - 1;
438 
439  // process event iEvent
440  // get / update the stable parameters from the EventSetup
441  // local cache & check on cacheIdentifier
442 
443  unsigned long long l1GtStableParCacheID =
444  evSetup.get<L1TGlobalStableParametersRcd>().cacheIdentifier();
445 
446  if (m_l1GtStableParCacheID != l1GtStableParCacheID) {
447 
449  evSetup.get< L1TGlobalStableParametersRcd >().get( l1GtStablePar );
450  m_l1GtStablePar = l1GtStablePar.product();
451 
452  // number of physics triggers
454 
455  // number of DAQ partitions
456  m_numberDaqPartitions = 8; // FIXME add it to stable parameters
457 
458  // number of objects of each type
459  m_nrL1Mu = static_cast<int> (m_l1GtStablePar->gtNumberL1Mu());
460  //m_nrL1Mu = static_cast<int> (8);
461 
462 // ***** Doe we need to change the StablePar class for generic. EG
463  m_nrL1EG = static_cast<int> (m_l1GtStablePar->gtNumberL1NoIsoEG());
464  m_nrL1Tau= static_cast<int> (m_l1GtStablePar->gtNumberL1TauJet());
465 
466 
467 // ********* Do we need to change the StablePar class for generic jet?
468  m_nrL1Jet = static_cast<int> (m_l1GtStablePar->gtNumberL1CenJet());
469 
470  m_nrL1JetCounts = static_cast<int> (m_l1GtStablePar->gtNumberL1JetCounts());
471 
472  // ... the rest of the objects are global
473 
476 
477 
478  // Initialize Board
479  m_uGtBrd->init(m_numberPhysTriggers, m_nrL1Mu, m_nrL1EG, m_nrL1Tau, m_nrL1Jet, minL1DataBxInEvent, maxL1DataBxInEvent );
480 
481  //
482  m_l1GtStableParCacheID = l1GtStableParCacheID;
483 
484  }
485 
486 
487  // get / update the trigger menu from the EventSetup
488  // local cache & check on cacheIdentifier
489  unsigned long long l1GtMenuCacheID = evSetup.get<L1TUtmTriggerMenuRcd>().cacheIdentifier();
490 
491  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
492 
494  evSetup.get< L1TUtmTriggerMenuRcd>().get(l1GtMenu) ;
495  const L1TUtmTriggerMenu* utml1GtMenu = l1GtMenu.product();
496 
497  // Instantiate Parser
498  TriggerMenuParser gtParser = TriggerMenuParser();
499 
500 
505 
506  //Parse menu into emulator classes
507  gtParser.parseCondFormats(utml1GtMenu);
508 
509  // transfer the condition map and algorithm map from parser to L1uGtTriggerMenu
511  gtParser.vecMuonTemplate(),
512  gtParser.vecCaloTemplate(),
513  gtParser.vecEnergySumTemplate(),
514  gtParser.vecExternalTemplate(),
515  gtParser.vecCorrelationTemplate(),
516  gtParser.corMuonTemplate(),
517  gtParser.corCaloTemplate(),
518  gtParser.corEnergySumTemplate()) ;
519 
520 
521  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtTriggerMenuInterface(gtParser.gtTriggerMenuInterface());
522  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtTriggerMenuImplementation(gtParser.gtTriggerMenuImplementation());
523  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtScaleDbKey(gtParser.gtScaleDbKey());
524  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtScales(gtParser.gtScales());
525 
526  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtAlgorithmMap(gtParser.gtAlgorithmMap());
527  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtAlgorithmAliasMap(gtParser.gtAlgorithmAliasMap());
528 
529  (const_cast<TriggerMenu*>(m_l1GtMenu))->buildGtConditionMap();
530 
531  m_l1GtMenuCacheID = l1GtMenuCacheID;
532  }
533 
534 
535 
536 
537 
538  // get / update the board maps from the EventSetup
539  // local cache & check on cacheIdentifier
540 
541 /* *** Drop L1GtBoard Maps for now
542  typedef std::vector<L1GtBoard>::const_iterator CItBoardMaps;
543 
544  unsigned long long l1GtBMCacheID = evSetup.get<L1GtBoardMapsRcd>().cacheIdentifier();
545 */
546 
547 /* ** Drop board mapping for now
548  if (m_l1GtBMCacheID != l1GtBMCacheID) {
549 
550  edm::ESHandle< L1GtBoardMaps > l1GtBM;
551  evSetup.get< L1GtBoardMapsRcd >().get( l1GtBM );
552  m_l1GtBM = l1GtBM.product();
553 
554  m_l1GtBMCacheID = l1GtBMCacheID;
555 
556  }
557 
558 
559  // TODO need changes in CondFormats to cache the maps
560  const std::vector<L1GtBoard>& boardMaps = m_l1GtBM->gtBoardMaps();
561 */
562  // get / update the prescale factors from the EventSetup
563  // local cache & check on cacheIdentifier
564 
565 
566 /* **** For Now Leave out Prescale Factors ****
567  unsigned long long l1GtPfAlgoCacheID =
568  evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().cacheIdentifier();
569 
570  if (m_l1GtPfAlgoCacheID != l1GtPfAlgoCacheID) {
571 
572  edm::ESHandle< L1GtPrescaleFactors > l1GtPfAlgo;
573  evSetup.get< L1GtPrescaleFactorsAlgoTrigRcd >().get( l1GtPfAlgo );
574  m_l1GtPfAlgo = l1GtPfAlgo.product();
575 
576  m_prescaleFactorsAlgoTrig = &(m_l1GtPfAlgo->gtPrescaleFactors());
577 
578  m_l1GtPfAlgoCacheID = l1GtPfAlgoCacheID;
579 
580  }
581 */
582 
583 
584  // Set Prescale factors to initial
588 
589 
590  // // Used for testing
591  // for( int iL1Set=0; iL1Set<int(m_prescaleFactorsAlgoTrig->size()); iL1Set++ ){
592  // if( m_prescaleFactorsAlgoTrig->size()>0 ){
593  // const std::vector<int>& testPrescaleSet = (*m_prescaleFactorsAlgoTrig).at(iL1Set);
594 
595  // printf(" iL1Set=%4d", iL1Set);
596  // for( int iPrescale=0; iPrescale<int(testPrescaleSet.size()); iPrescale++ ){
597  // printf(", %2d", testPrescaleSet[iPrescale]);
598  // }
599  // printf("\n");
600  // }
601  // }
602 
603 
604  // get / update the trigger mask from the EventSetup
605  // local cache & check on cacheIdentifier
606 
607 
608 /* **** For now Leave out Masks *****
609  unsigned long long l1GtTmAlgoCacheID =
610  evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().cacheIdentifier();
611 
612  if (m_l1GtTmAlgoCacheID != l1GtTmAlgoCacheID) {
613 
614  edm::ESHandle< L1GtTriggerMask > l1GtTmAlgo;
615  evSetup.get< L1GtTriggerMaskAlgoTrigRcd >().get( l1GtTmAlgo );
616  m_l1GtTmAlgo = l1GtTmAlgo.product();
617 
618  m_triggerMaskAlgoTrig = m_l1GtTmAlgo->gtTriggerMask();
619 
620  m_l1GtTmAlgoCacheID = l1GtTmAlgoCacheID;
621 
622  }
623 */
624 
625 
626 
627 /* **** For now Leave out Veto Masks *****
628  unsigned long long l1GtTmVetoAlgoCacheID =
629  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().cacheIdentifier();
630 
631  if (m_l1GtTmVetoAlgoCacheID != l1GtTmVetoAlgoCacheID) {
632 
633  edm::ESHandle< L1GtTriggerMask > l1GtTmVetoAlgo;
634  evSetup.get< L1GtTriggerMaskVetoAlgoTrigRcd >().get( l1GtTmVetoAlgo );
635  m_l1GtTmVetoAlgo = l1GtTmVetoAlgo.product();
636 
637  m_triggerMaskVetoAlgoTrig = m_l1GtTmVetoAlgo->gtTriggerMask();
638 
639  m_l1GtTmVetoAlgoCacheID = l1GtTmVetoAlgoCacheID;
640 
641  }
642 */
643 
644 
645 
646 // ****** Board Maps Need to be redone....hard code for now ******
647  // loop over blocks in the GT DAQ record receiving data, count them if they are active
648  // all board type are defined in CondFormats/L1TObjects/L1GtFwd
649  // enum L1GtBoardType { GTFE, FDL, PSB, GMT, TCS, TIM };
650  // &
651  // set the active flag for each object type received from GMT and GCT
652  // all objects in the GT system are defined in enum L1GtObject from
653  // DataFormats/L1Trigger/GtProducerReadoutSetupFwd
654 
655  //
656  bool receiveMu = true;
657  bool receiveEG = true;
658  bool receiveTau = true;
659  bool receiveJet = true;
660  bool receiveEtSums = true;
661  bool receiveExt = true;
662 
663 /* *** Boards need redefining *****
664  for (CItBoardMaps
665  itBoard = boardMaps.begin();
666  itBoard != boardMaps.end(); ++itBoard) {
667 
668  int iPosition = itBoard->gtPositionDaqRecord();
669  if (iPosition > 0) {
670 
671  int iActiveBit = itBoard->gtBitDaqActiveBoards();
672  bool activeBoard = false;
673 
674  if (iActiveBit >= 0) {
675  activeBoard = m_activeBoardsGtDaq & (1 << iActiveBit);
676  }
677 
678  // use board if: in the record, but not in ActiveBoardsMap (iActiveBit < 0)
679  // in the record and ActiveBoardsMap, and active
680  if ((iActiveBit < 0) || activeBoard) {
681 
682 // ****** Decide what board manipulation (if any we want here)
683 
684  }
685  }
686 
687  }
688 */
689 
690 
691 
692 /* *** No Output Record for Now
693  // produce the GtProducerReadoutRecord now, after we found how many
694  // BxInEvent the record has and how many boards are active
695  std::auto_ptr<GtProducerReadoutRecord> gtDaqReadoutRecord(
696  new GtProducerReadoutRecord(
697  m_emulateBxInEvent, daqNrFdlBoards, daqNrPsbBoards) );
698 
699 */
700 
701  // Produce the Output Records for the GT
702  std::auto_ptr<GlobalAlgBlkBxCollection> uGtAlgRecord( new GlobalAlgBlkBxCollection(0,minEmulBxInEvent,maxEmulBxInEvent));
703  std::auto_ptr<GlobalExtBlkBxCollection> uGtExtRecord( new GlobalExtBlkBxCollection(0,minEmulBxInEvent,maxEmulBxInEvent));
704 
705  // * produce the L1GlobalTriggerObjectMapRecord
706  std::auto_ptr<L1GlobalTriggerObjectMapRecord> gtObjectMapRecord(
708 
709 
710  // fill the boards not depending on the BxInEvent in the L1 GT DAQ record
711  // GMT, PSB and FDL depend on BxInEvent
712 
713  // fill in emulator the same bunch crossing (12 bits - hardwired number of bits...)
714  // and the same local bunch crossing for all boards
715  int bxCross = iEvent.bunchCrossing();
716  boost::uint16_t bxCrossHw = 0;
717  if ((bxCross & 0xFFF) == bxCross) {
718  bxCrossHw = static_cast<boost::uint16_t> (bxCross);
719  }
720  else {
721  bxCrossHw = 0; // Bx number too large, set to 0!
722  if (m_verbosity) {
723 
724  LogDebug("l1t|Global")
725  << "\nBunch cross number [hex] = " << std::hex << bxCross
726  << "\n larger than 12 bits. Set to 0! \n" << std::dec
727  << std::endl;
728  }
729  }
730  LogDebug("l1t|Global") << "HW BxCross " << bxCrossHw << std::endl;
731 
732 /* ** No Record for Now
733  if (m_produceL1GtDaqRecord) {
734 
735  for (CItBoardMaps
736  itBoard = boardMaps.begin();
737  itBoard != boardMaps.end(); ++itBoard) {
738 
739  int iPosition = itBoard->gtPositionDaqRecord();
740  if (iPosition > 0) {
741 
742  int iActiveBit = itBoard->gtBitDaqActiveBoards();
743  bool activeBoard = false;
744 
745  if (iActiveBit >= 0) {
746  activeBoard = m_activeBoardsGtDaq & (1 << iActiveBit);
747  }
748 
749  // use board if: in the record, but not in ActiveBoardsMap (iActiveBit < 0)
750  // in the record and ActiveBoardsMap, and active
751  if ((iActiveBit < 0) || activeBoard) {
752 
753  switch (itBoard->gtBoardType()) {
754 
755  case GTFE: {
756  L1GtfeWord gtfeWordValue;
757 
758  gtfeWordValue.setBoardId( itBoard->gtBoardId() );
759 
760  // cast int to boost::uint16_t
761  // there are normally 3 or 5 BxInEvent
762  gtfeWordValue.setRecordLength(
763  static_cast<boost::uint16_t>(recordLength0));
764 
765  gtfeWordValue.setRecordLength1(
766  static_cast<boost::uint16_t>(recordLength1));
767 
768  // bunch crossing
769  gtfeWordValue.setBxNr(bxCrossHw);
770 
771  // set the list of active boards
772  gtfeWordValue.setActiveBoards(m_activeBoardsGtDaq);
773 
774  // set alternative for number of BX per board
775  gtfeWordValue.setAltNrBxBoard(
776  static_cast<boost::uint16_t> (m_alternativeNrBxBoardDaq));
777 
778  // set the TOTAL_TRIGNR as read from iEvent
779  // TODO check again - PTC stuff
780 
781  gtfeWordValue.setTotalTriggerNr(
782  static_cast<boost::uint32_t>(iEvent.id().event()));
783 
784  // ** fill L1GtfeWord in GT DAQ record
785 
786  gtDaqReadoutRecord->setGtfeWord(gtfeWordValue);
787  }
788 
789  break;
790  case TCS: {
791  // nothing
792  }
793 
794  break;
795  case TIM: {
796  // nothing
797  }
798 
799  break;
800  default: {
801  // do nothing, all blocks are given in GtBoardType enum
802  }
803 
804  break;
805  }
806  }
807  }
808 
809  }
810 
811  }
812 */
813 
814 
815  // get the prescale factor from the configuration for now
816  // Prescale set indexed by zero internally, but externally indexed by 1
817  unsigned int pfAlgoSetIndex = m_prescaleSet-1;
818 
819  // Require that prescale set be positive
820  if( m_prescaleSet<=0 ) pfAlgoSetIndex = 0;
821 
822  if( pfAlgoSetIndex > (*m_prescaleFactorsAlgoTrig).size()-1 ){
823  LogTrace("l1t|Global")
824  << "\nAttempting to access prescale algo set: " << m_prescaleSet
825  << "\nNumber of prescale algo sets available: " << (*m_prescaleFactorsAlgoTrig).size()
826  << "Setting former to latter."
827  << std::endl;
828 
829  pfAlgoSetIndex = (*m_prescaleFactorsAlgoTrig).size()-1;
830  }
831 
832  const std::vector<int>& prescaleFactorsAlgoTrig = (*m_prescaleFactorsAlgoTrig).at(pfAlgoSetIndex);
833 
834  const std::vector<unsigned int>& triggerMaskAlgoTrig = *m_triggerMaskAlgoTrig;
835  const std::vector<unsigned int>& triggerMaskVetoAlgoTrig = *m_triggerMaskVetoAlgoTrig;
836 
837  LogDebug("l1t|Global") << "Size of prescale vector" << prescaleFactorsAlgoTrig.size() << std::endl;
838 
839 
840 // Load the calorimeter input onto the uGt Board
846  receiveEG, m_nrL1EG,
847  receiveTau, m_nrL1Tau,
848  receiveJet, m_nrL1Jet,
849  receiveEtSums );
850 
852  receiveMu, m_nrL1Mu );
853 
855  receiveExt );
856 
857 
858  // loop over BxInEvent
859  for (int iBxInEvent = minEmulBxInEvent; iBxInEvent <= maxEmulBxInEvent;
860  ++iBxInEvent) {
861 
862  // run GTL
863  LogDebug("l1t|Global")
864  << "\nGtProducer : running GTL for bx = " << iBxInEvent << "\n"
865  << std::endl;
866 
867 
868 // Run the GTL for this BX
869  m_uGtBrd->runGTL(iEvent, evSetup, m_l1GtMenu,
870  m_produceL1GtObjectMapRecord, iBxInEvent, gtObjectMapRecord,
872  m_nrL1Mu,
873  m_nrL1EG,
874  m_nrL1Tau,
875  m_nrL1Jet,
876  m_nrL1JetCounts );
877 
878 
879  // run FDL
880  LogDebug("l1t|Global")
881  << "\nGtProducer : running FDL for bx = " << iBxInEvent << "\n"
882  << std::endl;
883 
884 
885 // Run the Final Decision Logic for this BX
886  m_uGtBrd->runFDL(iEvent,
887  iBxInEvent,
890  prescaleFactorsAlgoTrig,
891  triggerMaskAlgoTrig,
892  triggerMaskVetoAlgoTrig,
895  );
896 
897 
898 
899 // Fill in the DAQ Records
901 
902  // These need to be defined elsewhere
903  cms_uint64_t orbNr = iEvent.orbitNumber();
904  int abBx = iEvent.bunchCrossing();
905  m_uGtBrd->fillAlgRecord(iBxInEvent, uGtAlgRecord, orbNr, abBx);
906  m_uGtBrd->fillExtRecord(iBxInEvent, uGtExtRecord, orbNr, abBx);
907  }
908 
909 
910 
911  } //End Loop over Bx
912 
913 
914  // Add explicit reset of Board
915  m_uGtBrd->reset();
916 
917 
918 
919  if ( m_verbosity && m_isDebugEnabled ) {
920 
921  std::ostringstream myCoutStream;
922 
923  for(int bx=minEmulBxInEvent; bx<maxEmulBxInEvent; bx++) {
924 
926  (uGtAlgRecord->at(bx,0)).print(myCoutStream);
927  (uGtExtRecord->at(bx,0)).print(myCoutStream);
928 
929  }
930 
931  LogTrace("l1t|Global")
932  << "\n The following L1 GT DAQ readout record was produced:\n"
933  << myCoutStream.str() << "\n"
934  << std::endl;
935 
936  myCoutStream.str("");
937  myCoutStream.clear();
938 /*
939  const std::vector<L1GlobalTriggerObjectMap> objMapVec =
940  gtObjectMapRecord->gtObjectMap();
941 
942  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator
943  it = objMapVec.begin(); it != objMapVec.end(); ++it) {
944 
945  (*it).print(myCoutStream);
946 
947  }
948 
949 
950  LogDebug("l1t|Global")
951  << "Test gtObjectMapRecord in L1TGlobalProducer \n\n" << myCoutStream.str() << "\n\n"
952  << std::endl;
953 
954  myCoutStream.str("");
955  myCoutStream.clear();
956 */
957  }
958 
959 
960 
961 
962  // register products
964  iEvent.put( uGtAlgRecord );
965  iEvent.put( uGtExtRecord );
966  }
967 
968 
970  iEvent.put( gtObjectMapRecord );
971  }
972 
973 
974 }
#define LogDebug(id)
BXVector< GlobalExtBlk > GlobalExtBlkBxCollection
Definition: GlobalExtBlk.h:30
unsigned int gtPinsOnConditionChip() const
get / set the number of pins on the GTL condition chips
unsigned int m_numberDaqPartitions
number of DAQ partitions
unsigned long long m_l1GtParCacheID
unsigned int gtIfCaloEtaNumberBits() const
get / set the number of bits for eta of calorimeter objects
const std::vector< std::vector< EnergySumTemplate > > & vecEnergySumTemplate() const
void setGtOrderConditionChip(const std::vector< int > &)
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
int m_verbosity
verbosity level
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
unsigned int gtNumberL1NoIsoEG() const
get / set the number of L1 e/gamma objects received by GT
const boost::uint16_t gtDaqActiveBoards() const
get / set the active boards for L1 GT DAQ record
const GlobalStableParameters * m_l1GtStablePar
cached stuff
const int gtTotalBxInEvent() const
get / set the total Bx&#39;s in the event
edm::EDGetTokenT< BXVector< l1t::Tau > > m_tauInputToken
void receiveExternalData(edm::Event &, const edm::EDGetTokenT< BXVector< GlobalExtBlk > > &, const bool receiveExt)
Definition: GtBoard.cc:394
bool m_produceL1GtObjectMapRecord
logical flag to produce the L1 GT object map record
int m_totalBxInEvent
total number of Bx&#39;s in the event coming from EventSetup
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Definition: print.cc:10
unsigned int gtNumberL1Mu() const
get / set the number of L1 muons received by GT
const unsigned int gtBstLengthBytes() const
get / set length of BST message (in bytes) for L1 GT EVM record
int bunchCrossing() const
Definition: EventBase.h:65
const std::vector< std::vector< ExternalTemplate > > & vecExternalTemplate() const
unsigned int m_numberPhysTriggers
number of physics triggers
edm::EDGetTokenT< BXVector< GlobalExtBlk > > m_extInputToken
BXVector< GlobalAlgBlk > GlobalAlgBlkBxCollection
Definition: GlobalAlgBlk.h:31
const TriggerMenu * m_l1GtMenu
std::vector< unsigned int > m_initialTriggerMaskAlgoTrig
const L1TGlobalScales & gtScales() const
menu associated scales
unsigned int gtNumberL1CenJet() const
get / set the number of L1 central jets received by GT
const std::string & gtTriggerMenuImplementation() const
void setGtPinsOnConditionChip(const unsigned int &)
unsigned long long m_l1GtMenuCacheID
void parseCondFormats(const L1TUtmTriggerMenu *utmMenu)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
std::vector< std::vector< int > > m_initialPrescaleFactorsAlgoTrig
void receiveCaloObjectData(edm::Event &, const edm::EDGetTokenT< BXVector< l1t::EGamma >> &, const edm::EDGetTokenT< BXVector< l1t::Tau >> &, const edm::EDGetTokenT< BXVector< l1t::Jet >> &, const edm::EDGetTokenT< BXVector< l1t::EtSum >> &, const bool receiveEG, const int nrL1EG, const bool receiveTau, const int nrL1Tau, const bool receiveJet, const int nrL1Jet, const bool receiveEtSums)
receive data from Global Muon Trigger
Definition: GtBoard.cc:167
const std::string & gtTriggerMenuName() const
unsigned int gtNumberL1TauJet() const
get / set the number of L1 tau jets received by GT
boost::uint16_t m_activeBoardsGtDaq
active boards in L1 GT DAQ record
const std::vector< std::vector< CaloTemplate > > & corCaloTemplate() const
bool m_produceL1GtDaqRecord
logical flag to produce the L1 GT DAQ readout record
unsigned int gtIfMuEtaNumberBits() const
get / set the number of bits for eta of muon objects
unsigned long long m_l1GtStableParCacheID
edm::EDGetTokenT< BXVector< l1t::Muon > > m_muInputToken
int orbitNumber() const
Definition: EventBase.h:66
const std::vector< std::vector< MuonTemplate > > & corMuonTemplate() const
const std::vector< std::vector< MuonTemplate > > & vecMuonTemplate() const
get / set the vectors containing the conditions
const std::vector< std::vector< EnergySumTemplate > > & corEnergySumTemplate() const
#define LogTrace(id)
l1t::GtBoard * m_uGtBrd
unsigned int gtNumberPhysTriggers() const
get / set the number of physics trigger algorithms
unsigned int m_prescaleSet
prescale set used
const std::vector< std::vector< CorrelationTemplate > > & vecCorrelationTemplate() const
void reset()
clear uGT
Definition: GtBoard.cc:1082
void receiveMuonObjectData(edm::Event &, const edm::EDGetTokenT< BXVector< l1t::Muon > > &, const bool receiveMu, const int nrL1Mu)
Definition: GtBoard.cc:341
edm::EDGetTokenT< BXVector< l1t::EtSum > > m_sumInputToken
int m_L1DataBxInEvent
Bx expected in Data coming to GT.
unsigned int gtNumberConditionChips() const
hardware stuff
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
void setGtNumberConditionChips(const unsigned int &)
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
unsigned int gtNumberL1JetCounts() const
get / set the number of L1 jet counts received by GT
void init(const int numberPhysTriggers, const int nrL1Mu, const int nrL1EG, const int nrL1Tau, const int nrL1Jet, int bxFirst, int bxLast)
initialize the class (mainly reserve)
Definition: GtBoard.cc:133
std::vector< unsigned int > m_initialTriggerMaskVetoAlgoTrig
void runFDL(edm::Event &iEvent, const int iBxInEvent, const int totalBxInEvent, const unsigned int numberPhysTriggers, const std::vector< int > &prescaleFactorsAlgoTrig, const std::vector< unsigned int > &triggerMaskAlgoTrig, const std::vector< unsigned int > &triggerMaskVetoAlgoTrig, const bool algorithmTriggersUnprescaled, const bool algorithmTriggersUnmasked)
run the uGT FDL (Apply Prescales and Veto)
Definition: GtBoard.cc:896
unsigned int m_bstLengthBytes
length of BST record (in bytes) from event setup
void fillExtRecord(int iBxInEvent, std::auto_ptr< GlobalExtBlkBxCollection > &uGtExtRecord, cms_uint64_t orbNr, int bxNr)
Definition: GtBoard.cc:1060
const L1GtParameters * m_l1GtPar
parameters
const std::vector< int > & gtOrderConditionChip() const
const std::vector< std::vector< CaloTemplate > > & vecCaloTemplate() const
void fillAlgRecord(int iBxInEvent, std::auto_ptr< GlobalAlgBlkBxCollection > &uGtAlgRecord, cms_uint64_t orbNr, int bxNr)
Fill the Daq Records.
Definition: GtBoard.cc:1030
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
const std::string & gtTriggerMenuInterface() const
get / set the trigger menu names
unsigned long long cms_uint64_t
Definition: typedefs.h:17
void runGTL(edm::Event &iEvent, const edm::EventSetup &evSetup, const TriggerMenu *m_l1GtMenu, const bool produceL1GtObjectMapRecord, const int iBxInEvent, std::auto_ptr< L1GlobalTriggerObjectMapRecord > &gtObjectMapRecord, const unsigned int numberPhysTriggers, const int nrL1Mu, const int nrL1EG, const int nrL1Tau, const int nrL1Jet, const int nrL1JetCounts)
run the uGT GTL (Conditions and Algorithms)
Definition: GtBoard.cc:442
const std::string & gtScaleDbKey() const
menu associated scale key
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
edm::EDGetTokenT< BXVector< l1t::Jet > > m_jetInputToken
edm::EDGetTokenT< BXVector< l1t::EGamma > > m_egInputToken
void setGtNumberPhysTriggers(const unsigned int &)

Member Data Documentation

boost::uint16_t L1TGlobalProducer::m_activeBoardsGtDaq
private

active boards in L1 GT DAQ record

Definition at line 100 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

bool L1TGlobalProducer::m_algorithmTriggersUnmasked
private

if true, unmasked - all enabled (all trigger masks set to 0) will overwrite the event setup

Definition at line 197 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

bool L1TGlobalProducer::m_algorithmTriggersUnprescaled
private

run algorithm triggers if true, unprescaled (all prescale factors 1) will overwrite the event setup

Definition at line 193 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

unsigned int L1TGlobalProducer::m_alternativeNrBxBoardDaq
private

alternative for number of BX per active board in GT DAQ record: 0 or 1 the position is identical with the active board bit

Definition at line 181 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

unsigned int L1TGlobalProducer::m_bstLengthBytes
private

length of BST record (in bytes) from event setup

Definition at line 103 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

edm::InputTag L1TGlobalProducer::m_caloInputTag
private

input tag for calorimeter collections from GCT

Definition at line 151 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

edm::EDGetTokenT<BXVector<l1t::EGamma> > L1TGlobalProducer::m_egInputToken
private

Definition at line 152 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_emulateBxInEvent
private

number of "bunch crossing in the event" (BxInEvent) to be emulated symmetric around L1Accept (BxInEvent = 0): 1 (BxInEvent = 0); 3 (F 0 1) (standard record); 5 (E F 0 1 2) (debug record) even numbers (except 0) "rounded" to the nearest lower odd number

Definition at line 174 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

edm::InputTag L1TGlobalProducer::m_extInputTag
private

input tag for external conditions

Definition at line 158 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

edm::EDGetTokenT<BXVector<GlobalExtBlk> > L1TGlobalProducer::m_extInputToken
private

Definition at line 159 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_ifCaloEtaNumberBits
private

Definition at line 89 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_ifMuEtaNumberBits
private

Definition at line 88 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

std::vector<std::vector<int> > L1TGlobalProducer::m_initialPrescaleFactorsAlgoTrig
private

Definition at line 117 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

std::vector<unsigned int> L1TGlobalProducer::m_initialTriggerMaskAlgoTrig
private

Definition at line 132 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

std::vector<unsigned int> L1TGlobalProducer::m_initialTriggerMaskVetoAlgoTrig
private

Definition at line 135 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

bool L1TGlobalProducer::m_isDebugEnabled
private

Definition at line 204 of file L1TGlobalProducer.h.

Referenced by produce().

edm::EDGetTokenT<BXVector<l1t::Jet> > L1TGlobalProducer::m_jetInputToken
private

Definition at line 154 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_L1DataBxInEvent
private

Bx expected in Data coming to GT.

Definition at line 177 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

const L1GtBoardMaps* L1TGlobalProducer::m_l1GtBM
private

board maps - cache only the record

Definition at line 106 of file L1TGlobalProducer.h.

unsigned long long L1TGlobalProducer::m_l1GtBMCacheID
private

Definition at line 107 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

const TriggerMenu* L1TGlobalProducer::m_l1GtMenu
private

Definition at line 66 of file L1TGlobalProducer.h.

Referenced by produce().

unsigned long long L1TGlobalProducer::m_l1GtMenuCacheID
private

Definition at line 67 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

const L1GtParameters* L1TGlobalProducer::m_l1GtPar
private

parameters

Definition at line 93 of file L1TGlobalProducer.h.

Referenced by produce().

unsigned long long L1TGlobalProducer::m_l1GtParCacheID
private

Definition at line 94 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

const L1GtPrescaleFactors* L1TGlobalProducer::m_l1GtPfAlgo
private

prescale factors

Definition at line 111 of file L1TGlobalProducer.h.

unsigned long long L1TGlobalProducer::m_l1GtPfAlgoCacheID
private

Definition at line 112 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

const GlobalStableParameters* L1TGlobalProducer::m_l1GtStablePar
private

cached stuff

stable parameters

Definition at line 62 of file L1TGlobalProducer.h.

Referenced by produce().

unsigned long long L1TGlobalProducer::m_l1GtStableParCacheID
private

Definition at line 63 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

const L1GtTriggerMask* L1TGlobalProducer::m_l1GtTmAlgo
private

trigger masks & veto masks

Definition at line 124 of file L1TGlobalProducer.h.

unsigned long long L1TGlobalProducer::m_l1GtTmAlgoCacheID
private

Definition at line 125 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

const L1GtTriggerMask* L1TGlobalProducer::m_l1GtTmVetoAlgo
private

Definition at line 127 of file L1TGlobalProducer.h.

unsigned long long L1TGlobalProducer::m_l1GtTmVetoAlgoCacheID
private

Definition at line 128 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

edm::InputTag L1TGlobalProducer::m_muInputTag
private

input tag for muon collection from GMT

Definition at line 147 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

edm::EDGetTokenT<BXVector<l1t::Muon> > L1TGlobalProducer::m_muInputToken
private

Definition at line 148 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_nrL1EG
private

Definition at line 78 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_nrL1Jet
private

Definition at line 81 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_nrL1JetCounts
private

Definition at line 84 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_nrL1Mu
private

number of objects of each type { Mu, NoIsoEG, IsoEG, Jet, Tau, ETM, ETT, HTT, JetCounts };

Definition at line 77 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_nrL1Tau
private

Definition at line 79 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

unsigned int L1TGlobalProducer::m_numberDaqPartitions
private

number of DAQ partitions

Definition at line 73 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

unsigned int L1TGlobalProducer::m_numberPhysTriggers
private

number of physics triggers

Definition at line 70 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

const std::vector<std::vector<int> >* L1TGlobalProducer::m_prescaleFactorsAlgoTrig
private

Definition at line 116 of file L1TGlobalProducer.h.

Referenced by produce().

unsigned int L1TGlobalProducer::m_prescaleSet
private

prescale set used

Definition at line 188 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

std::string L1TGlobalProducer::m_prescalesFile
private

CSV file for prescales.

Definition at line 120 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

bool L1TGlobalProducer::m_produceL1GtDaqRecord
private

logical flag to produce the L1 GT DAQ readout record

Definition at line 162 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

bool L1TGlobalProducer::m_produceL1GtObjectMapRecord
private

logical flag to produce the L1 GT object map record

Definition at line 165 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_psBstLengthBytes
private

length of BST record (in bytes) from parameter set

Definition at line 184 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

edm::EDGetTokenT<BXVector<l1t::EtSum> > L1TGlobalProducer::m_sumInputToken
private

Definition at line 155 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

edm::EDGetTokenT<BXVector<l1t::Tau> > L1TGlobalProducer::m_tauInputToken
private

Definition at line 153 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_totalBxInEvent
private

total number of Bx's in the event coming from EventSetup

Definition at line 97 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

const std::vector<unsigned int>* L1TGlobalProducer::m_triggerMaskAlgoTrig
private

Definition at line 131 of file L1TGlobalProducer.h.

Referenced by produce().

const std::vector<unsigned int>* L1TGlobalProducer::m_triggerMaskVetoAlgoTrig
private

Definition at line 134 of file L1TGlobalProducer.h.

Referenced by produce().

l1t::GtBoard* L1TGlobalProducer::m_uGtBrd
private

Definition at line 144 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), produce(), and ~L1TGlobalProducer().

int L1TGlobalProducer::m_verbosity
private

verbosity level

Definition at line 203 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

bool L1TGlobalProducer::m_writePsbL1GtDaqRecord
private

logical flag to write the PSB content in the L1 GT DAQ record

Definition at line 168 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().