test
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::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TGlobalProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 
 ~L1TGlobalProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- 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::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

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_egInputTag
 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::InputTag m_jetInputTag
 
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
 
unsigned long long m_l1GtParCacheID
 
const L1GtPrescaleFactorsm_l1GtPfAlgo
 prescale factors More...
 
unsigned long long m_l1GtPfAlgoCacheID
 
const L1TGlobalParametersm_l1GtStablePar
 cached stuff More...
 
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_nrL1Mu
 
int m_nrL1Tau
 
unsigned int m_numberDaqPartitions
 
unsigned int m_numberPhysTriggers
 
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::InputTag m_sumInputTag
 
edm::EDGetTokenT< BXVector
< l1t::EtSum > > 
m_sumInputToken
 
edm::InputTag m_tauInputTag
 
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::GlobalBoardm_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::stream::EDProducer<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase 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 34 of file L1TGlobalProducer.h.

Constructor & Destructor Documentation

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

Definition at line 72 of file L1TGlobalProducer.cc.

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

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

References m_uGtBrd.

394 {
395 
396  delete m_uGtBrd;
397 
398 }
l1t::GlobalBoard * m_uGtBrd

Member Function Documentation

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

Definition at line 42 of file L1TGlobalProducer.cc.

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

42  {
44  // These parameters are part of the L1T/HLT interface, avoid changing if possible::
45  desc.add<edm::InputTag> ("MuonInputTag", edm::InputTag(""))->setComment("InputTag for Global Muon Trigger (required parameter: default value is invalid)");
46  desc.add<edm::InputTag> ("EGammaInputTag", edm::InputTag(""))->setComment("InputTag for Calo Trigger EGamma (required parameter: default value is invalid)");
47  desc.add<edm::InputTag> ("TauInputTag", edm::InputTag(""))->setComment("InputTag for Calo Trigger Tau (required parameter: default value is invalid)");
48  desc.add<edm::InputTag> ("JetInputTag", edm::InputTag(""))->setComment("InputTag for Calo Trigger Jet (required parameter: default value is invalid)");
49  desc.add<edm::InputTag> ("EtSumInputTag", edm::InputTag(""))->setComment("InputTag for Calo Trigger EtSum (required parameter: default value is invalid)");
50  desc.add<edm::InputTag> ("ExtInputTag", edm::InputTag(""))->setComment("InputTag for external conditions (not required, but recommend to specify explicitly in config)");
51  desc.add<bool> ("AlgorithmTriggersUnprescaled", false)->setComment("not required, but recommend to specify explicitly in config");
52  desc.add<bool> ("AlgorithmTriggersUnmasked", false)->setComment("not required, but recommend to specify explicitly in config");
53  // These parameters have well defined default values and are not currently
54  // part of the L1T/HLT interface. They can be cleaned up or updated at will:
55  desc.add<bool> ("ProduceL1GtDaqRecord",true);
56  desc.add<bool> ("ProduceL1GtObjectMapRecord",true);
57  desc.add<int> ("EmulateBxInEvent",1);
58  desc.add<int> ("L1DataBxInEvent",5);
59  desc.add<unsigned int> ("AlternativeNrBxBoardDaq",0);
60  desc.add<int> ("BstLengthBytes",-1);
61  desc.add<unsigned int> ("PrescaleSet",1);
62  desc.addUntracked<int>("Verbosity",0);
63  desc.add<std::string>("TriggerMenuLuminosity","startup");
64  desc.add<std::string>("PrescaleCSVFile","prescale_L1TGlobal.csv");
65  descriptions.add("L1TGlobalProducer", desc);
66 }
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 
)
overridevirtual

Needs error checking that something exists at this bx.

Implements edm::stream::EDProducerBase.

Definition at line 403 of file L1TGlobalProducer.cc.

References edm::EventBase::bunchCrossing(), l1t::TriggerMenuParser::corCaloTemplate(), l1t::TriggerMenuParser::corEnergySumTemplate(), l1t::TriggerMenuParser::corMuonTemplate(), AlCaHLTBitMon_QueryRunRegistry::data, TauDecayModes::dec, l1t::GlobalBoard::fillAlgRecord(), edm::EventSetup::get(), l1t::TriggerMenuParser::gtAlgorithmAliasMap(), l1t::TriggerMenuParser::gtAlgorithmMap(), l1t::TriggerMenuParser::gtScaleDbKey(), l1t::TriggerMenuParser::gtScales(), TriggerMenu::gtTriggerMenuImplementation(), l1t::TriggerMenuParser::gtTriggerMenuImplementation(), l1t::TriggerMenuParser::gtTriggerMenuInterface(), l1t::TriggerMenuParser::gtTriggerMenuName(), TriggerMenu::gtTriggerMenuUUID(), l1t::TriggerMenuParser::gtTriggerMenuUUID(), l1t::GlobalBoard::init(), LogDebug, LogTrace, m_algorithmTriggersUnmasked, m_algorithmTriggersUnprescaled, m_egInputToken, m_emulateBxInEvent, m_extInputToken, m_initialPrescaleFactorsAlgoTrig, m_initialTriggerMaskAlgoTrig, m_initialTriggerMaskVetoAlgoTrig, m_isDebugEnabled, m_jetInputToken, m_L1DataBxInEvent, m_l1GtMenu, m_l1GtMenuCacheID, m_l1GtParCacheID, m_l1GtStablePar, m_muInputToken, m_nrL1EG, m_nrL1Jet, m_nrL1Mu, m_nrL1Tau, m_numberPhysTriggers, m_prescaleFactorsAlgoTrig, m_prescaleSet, m_produceL1GtDaqRecord, m_produceL1GtObjectMapRecord, m_sumInputToken, m_tauInputToken, m_totalBxInEvent, m_triggerMaskAlgoTrig, m_triggerMaskVetoAlgoTrig, m_uGtBrd, m_verbosity, l1t::GlobalParamsHelper::numberChips(), l1t::GlobalParamsHelper::numberL1EG(), l1t::GlobalParamsHelper::numberL1Jet(), l1t::GlobalParamsHelper::numberL1Mu(), l1t::GlobalParamsHelper::numberL1Tau(), l1t::GlobalParamsHelper::numberPhysTriggers(), l1t::GlobalParamsHelper::orderOfChip(), l1t::TriggerMenuParser::parseCondFormats(), l1t::GlobalParamsHelper::pinsOnChip(), reco::print(), edm::ESHandle< class >::product(), edm::Event::put(), l1t::GlobalBoard::receiveCaloObjectData(), l1t::GlobalBoard::receiveExternalData(), l1t::GlobalBoard::receiveMuonObjectData(), l1t::GlobalBoard::reset(), l1t::GlobalBoard::runFDL(), l1t::GlobalBoard::runGTL(), l1t::TriggerMenuParser::setGtNumberConditionChips(), l1t::TriggerMenuParser::setGtNumberPhysTriggers(), l1t::TriggerMenuParser::setGtOrderConditionChip(), l1t::TriggerMenuParser::setGtPinsOnConditionChip(), l1t::GlobalParamsHelper::totalBxInEvent(), TriggerMenu_cff::TriggerMenu, l1t::TriggerMenuParser::vecCaloTemplate(), l1t::TriggerMenuParser::vecCorrelationTemplate(), l1t::TriggerMenuParser::vecEnergySumTemplate(), l1t::TriggerMenuParser::vecExternalTemplate(), and l1t::TriggerMenuParser::vecMuonTemplate().

404 {
405 
406 
407 
408 
409 
410  // process event iEvent
411  // get / update the stable parameters from the EventSetup
412  // local cache & check on cacheIdentifier
413 
414  unsigned long long l1GtParCacheID =
415  evSetup.get<L1TGlobalParametersRcd>().cacheIdentifier();
416 
417  if (m_l1GtParCacheID != l1GtParCacheID) {
418 
420  evSetup.get< L1TGlobalParametersRcd >().get( l1GtStablePar );
421  m_l1GtStablePar = l1GtStablePar.product();
422  const GlobalParamsHelper * data = GlobalParamsHelper::readFromEventSetup(m_l1GtStablePar);
423 
424  // number of bx
426 
427  // number of physics triggers
429 
430  // number of objects of each type
431  m_nrL1Mu = data->numberL1Mu();
432 
433  // EG
434  m_nrL1EG = data->numberL1EG();
435 
436  // jets
437  m_nrL1Jet = data->numberL1Jet();
438 
439  // taus
440  m_nrL1Tau= data->numberL1Tau();
441 
443  int minL1DataBxInEvent = (m_L1DataBxInEvent + 1)/2 - m_L1DataBxInEvent;
444  int maxL1DataBxInEvent = (m_L1DataBxInEvent + 1)/2 - 1;
445 
446  // Initialize Board
447  m_uGtBrd->init(m_numberPhysTriggers, m_nrL1Mu, m_nrL1EG, m_nrL1Tau, m_nrL1Jet, minL1DataBxInEvent, maxL1DataBxInEvent );
448 
449  //
450  m_l1GtParCacheID = l1GtParCacheID;
451 
452  }
453 
454  if (m_emulateBxInEvent < 0) {
456  }
457 
459  int minEmulBxInEvent = (m_emulateBxInEvent + 1)/2 - m_emulateBxInEvent;
460  int maxEmulBxInEvent = (m_emulateBxInEvent + 1)/2 - 1;
461 
462  // get / update the trigger menu from the EventSetup
463  // local cache & check on cacheIdentifier
464  unsigned long long l1GtMenuCacheID = evSetup.get<L1TUtmTriggerMenuRcd>().cacheIdentifier();
465 
466  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
467  const GlobalParamsHelper * data = GlobalParamsHelper::readFromEventSetup(m_l1GtStablePar);
468 
470  evSetup.get< L1TUtmTriggerMenuRcd>().get(l1GtMenu) ;
471  const L1TUtmTriggerMenu* utml1GtMenu = l1GtMenu.product();
472 
473  // Instantiate Parser
474  TriggerMenuParser gtParser = TriggerMenuParser();
475 
476  gtParser.setGtNumberConditionChips(data->numberChips());
477  gtParser.setGtPinsOnConditionChip(data->pinsOnChip());
478  gtParser.setGtOrderConditionChip(data->orderOfChip());
480 
481  //Parse menu into emulator classes
482  gtParser.parseCondFormats(utml1GtMenu);
483 
484  // transfer the condition map and algorithm map from parser to L1uGtTriggerMenu
485  m_l1GtMenu = new TriggerMenu(gtParser.gtTriggerMenuName(), data->numberChips(),
486  gtParser.vecMuonTemplate(),
487  gtParser.vecCaloTemplate(),
488  gtParser.vecEnergySumTemplate(),
489  gtParser.vecExternalTemplate(),
490  gtParser.vecCorrelationTemplate(),
491  gtParser.corMuonTemplate(),
492  gtParser.corCaloTemplate(),
493  gtParser.corEnergySumTemplate()) ;
494 
495 
496  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtTriggerMenuInterface(gtParser.gtTriggerMenuInterface());
497  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtTriggerMenuImplementation(gtParser.gtTriggerMenuImplementation());
498  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtScaleDbKey(gtParser.gtScaleDbKey());
499  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtScales(gtParser.gtScales());
500  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtTriggerMenuUUID(gtParser.gtTriggerMenuUUID());
501 
502  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtAlgorithmMap(gtParser.gtAlgorithmMap());
503  (const_cast<TriggerMenu*>(m_l1GtMenu))->setGtAlgorithmAliasMap(gtParser.gtAlgorithmAliasMap());
504 
505  (const_cast<TriggerMenu*>(m_l1GtMenu))->buildGtConditionMap();
506 
507  //int printV = 2;
508  //m_l1GtMenu->print(std::cout, printV);
509 
510  m_l1GtMenuCacheID = l1GtMenuCacheID;
511  }
512 
513 
514 
515 
516 
517  // get / update the board maps from the EventSetup
518  // local cache & check on cacheIdentifier
519 
520 /* *** Drop L1GtBoard Maps for now
521  typedef std::vector<L1GtBoard>::const_iterator CItBoardMaps;
522 
523  unsigned long long l1GtBMCacheID = evSetup.get<L1GtBoardMapsRcd>().cacheIdentifier();
524 */
525 
526 /* ** Drop board mapping for now
527  if (m_l1GtBMCacheID != l1GtBMCacheID) {
528 
529  edm::ESHandle< L1GtBoardMaps > l1GtBM;
530  evSetup.get< L1GtBoardMapsRcd >().get( l1GtBM );
531  m_l1GtBM = l1GtBM.product();
532 
533  m_l1GtBMCacheID = l1GtBMCacheID;
534 
535  }
536 
537 
538  // TODO need changes in CondFormats to cache the maps
539  const std::vector<L1GtBoard>& boardMaps = m_l1GtBM->gtBoardMaps();
540 */
541  // get / update the prescale factors from the EventSetup
542  // local cache & check on cacheIdentifier
543 
544 
545 /* **** For Now Leave out Prescale Factors ****
546  unsigned long long l1GtPfAlgoCacheID =
547  evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().cacheIdentifier();
548 
549  if (m_l1GtPfAlgoCacheID != l1GtPfAlgoCacheID) {
550 
551  edm::ESHandle< L1GtPrescaleFactors > l1GtPfAlgo;
552  evSetup.get< L1GtPrescaleFactorsAlgoTrigRcd >().get( l1GtPfAlgo );
553  m_l1GtPfAlgo = l1GtPfAlgo.product();
554 
555  m_prescaleFactorsAlgoTrig = &(m_l1GtPfAlgo->gtPrescaleFactors());
556 
557  m_l1GtPfAlgoCacheID = l1GtPfAlgoCacheID;
558 
559  }
560 */
561 
562 
563  // Set Prescale factors to initial
567 
568 
569  // get / update the trigger mask from the EventSetup
570  // local cache & check on cacheIdentifier
571 
572 
573 /* **** For now Leave out Masks *****
574  unsigned long long l1GtTmAlgoCacheID =
575  evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().cacheIdentifier();
576 
577  if (m_l1GtTmAlgoCacheID != l1GtTmAlgoCacheID) {
578 
579  edm::ESHandle< L1GtTriggerMask > l1GtTmAlgo;
580  evSetup.get< L1GtTriggerMaskAlgoTrigRcd >().get( l1GtTmAlgo );
581  m_l1GtTmAlgo = l1GtTmAlgo.product();
582 
583  m_triggerMaskAlgoTrig = m_l1GtTmAlgo->gtTriggerMask();
584 
585  m_l1GtTmAlgoCacheID = l1GtTmAlgoCacheID;
586 
587  }
588 */
589 
590 
591 
592 /* **** For now Leave out Veto Masks *****
593  unsigned long long l1GtTmVetoAlgoCacheID =
594  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().cacheIdentifier();
595 
596  if (m_l1GtTmVetoAlgoCacheID != l1GtTmVetoAlgoCacheID) {
597 
598  edm::ESHandle< L1GtTriggerMask > l1GtTmVetoAlgo;
599  evSetup.get< L1GtTriggerMaskVetoAlgoTrigRcd >().get( l1GtTmVetoAlgo );
600  m_l1GtTmVetoAlgo = l1GtTmVetoAlgo.product();
601 
602  m_triggerMaskVetoAlgoTrig = m_l1GtTmVetoAlgo->gtTriggerMask();
603 
604  m_l1GtTmVetoAlgoCacheID = l1GtTmVetoAlgoCacheID;
605 
606  }
607 */
608 
609 
610 
611 // ****** Board Maps Need to be redone....hard code for now ******
612  // loop over blocks in the GT DAQ record receiving data, count them if they are active
613  // all board type are defined in CondFormats/L1TObjects/L1GtFwd
614  // &
615  // set the active flag for each object type received from GMT and GCT
616  // all objects in the GT system
617 
618  //
619  bool receiveMu = true;
620  bool receiveEG = true;
621  bool receiveTau = true;
622  bool receiveJet = true;
623  bool receiveEtSums = true;
624  bool receiveExt = true;
625 
626 /* *** Boards need redefining *****
627  for (CItBoardMaps
628  itBoard = boardMaps.begin();
629  itBoard != boardMaps.end(); ++itBoard) {
630 
631  int iPosition = itBoard->gtPositionDaqRecord();
632  if (iPosition > 0) {
633 
634  int iActiveBit = itBoard->gtBitDaqActiveBoards();
635  bool activeBoard = false;
636 
637  if (iActiveBit >= 0) {
638  activeBoard = m_activeBoardsGtDaq & (1 << iActiveBit);
639  }
640 
641  // use board if: in the record, but not in ActiveBoardsMap (iActiveBit < 0)
642  // in the record and ActiveBoardsMap, and active
643  if ((iActiveBit < 0) || activeBoard) {
644 
645 // ****** Decide what board manipulation (if any we want here)
646 
647  }
648  }
649 
650  }
651 */
652 
653 
654 
655  // Produce the Output Records for the GT
656  std::auto_ptr<GlobalAlgBlkBxCollection> uGtAlgRecord( new GlobalAlgBlkBxCollection(0,minEmulBxInEvent,maxEmulBxInEvent));
657 
658  // * produce the GlobalObjectMapRecord
659  std::auto_ptr<GlobalObjectMapRecord> gtObjectMapRecord(
660  new GlobalObjectMapRecord() );
661 
662 
663  // fill the boards not depending on the BxInEvent in the L1 GT DAQ record
664  // GMT, PSB and FDL depend on BxInEvent
665 
666  // fill in emulator the same bunch crossing (12 bits - hardwired number of bits...)
667  // and the same local bunch crossing for all boards
668  int bxCross = iEvent.bunchCrossing();
669  boost::uint16_t bxCrossHw = 0;
670  if ((bxCross & 0xFFF) == bxCross) {
671  bxCrossHw = static_cast<boost::uint16_t> (bxCross);
672  }
673  else {
674  bxCrossHw = 0; // Bx number too large, set to 0!
675  if (m_verbosity) {
676 
677  LogDebug("L1TGlobalProducer")
678  << "\nBunch cross number [hex] = " << std::hex << bxCross
679  << "\n larger than 12 bits. Set to 0! \n" << std::dec
680  << std::endl;
681  }
682  }
683  LogDebug("L1TGlobalProducer") << "HW BxCross " << bxCrossHw << std::endl;
684 
685 
686  // get the prescale factor from the configuration for now
687  // Prescale set indexed by zero internally, but externally indexed by 1
688  unsigned int pfAlgoSetIndex = m_prescaleSet-1;
689 
690  // Require that prescale set be positive
691  if( m_prescaleSet<=0 ) pfAlgoSetIndex = 0;
692 
693  if( pfAlgoSetIndex > (*m_prescaleFactorsAlgoTrig).size()-1 ){
694  LogTrace("L1TGlobalProducer")
695  << "\nAttempting to access prescale algo set: " << m_prescaleSet
696  << "\nNumber of prescale algo sets available: " << (*m_prescaleFactorsAlgoTrig).size()
697  << "Setting former to latter."
698  << std::endl;
699 
700  pfAlgoSetIndex = (*m_prescaleFactorsAlgoTrig).size()-1;
701  }
702 
703  const std::vector<int>& prescaleFactorsAlgoTrig = (*m_prescaleFactorsAlgoTrig).at(pfAlgoSetIndex);
704 
705  const std::vector<unsigned int>& triggerMaskAlgoTrig = *m_triggerMaskAlgoTrig;
706  const std::vector<unsigned int>& triggerMaskVetoAlgoTrig = *m_triggerMaskVetoAlgoTrig;
707 
708  LogDebug("L1TGlobalProducer") << "Size of prescale vector" << prescaleFactorsAlgoTrig.size() << std::endl;
709 
710 
711 // Load the calorimeter input onto the uGt Board
717  receiveEG, m_nrL1EG,
718  receiveTau, m_nrL1Tau,
719  receiveJet, m_nrL1Jet,
720  receiveEtSums );
721 
723  receiveMu, m_nrL1Mu );
724 
726  receiveExt );
727 
728 
729  // loop over BxInEvent
730  for (int iBxInEvent = minEmulBxInEvent; iBxInEvent <= maxEmulBxInEvent;
731  ++iBxInEvent) {
732 
733  // run GTL
734  LogDebug("L1TGlobalProducer")
735  << "\nL1TGlobalProducer : running GTL for bx = " << iBxInEvent << "\n"
736  << std::endl;
737 
738 
739 // Run the GTL for this BX
740  m_uGtBrd->runGTL(iEvent, evSetup, m_l1GtMenu,
741  m_produceL1GtObjectMapRecord, iBxInEvent, gtObjectMapRecord,
743  m_nrL1Mu,
744  m_nrL1EG,
745  m_nrL1Tau,
746  m_nrL1Jet
747  );
748 
749 
750  // run FDL
751  LogDebug("L1TGlobalProducer")
752  << "\nL1TGlobalProducer : running FDL for bx = " << iBxInEvent << "\n"
753  << std::endl;
754 
755 
756 // Run the Final Decision Logic for this BX
757  m_uGtBrd->runFDL(iEvent,
758  iBxInEvent,
761  prescaleFactorsAlgoTrig,
762  triggerMaskAlgoTrig,
763  triggerMaskVetoAlgoTrig,
766  );
767 
768 
769 
770 // Fill in the DAQ Records
773  }
774 
775 
776 
777  } //End Loop over Bx
778 
779 
780  // Add explicit reset of Board
781  m_uGtBrd->reset();
782 
783 
784 
785  if ( m_verbosity && m_isDebugEnabled ) {
786 
787  std::ostringstream myCoutStream;
788 
789  for(int bx=minEmulBxInEvent; bx<maxEmulBxInEvent; bx++) {
790 
792  (uGtAlgRecord->at(bx,0)).print(myCoutStream);
793 
794  }
795 
796  LogTrace("L1TGlobalProducer")
797  << "\n The following L1 GT DAQ readout record was produced:\n"
798  << myCoutStream.str() << "\n"
799  << std::endl;
800 
801  myCoutStream.str("");
802  myCoutStream.clear();
803 
804  const std::vector<GlobalObjectMap> objMapVec =
805  gtObjectMapRecord->gtObjectMap();
806 
807  for (std::vector<GlobalObjectMap>::const_iterator
808  it = objMapVec.begin(); it != objMapVec.end(); ++it) {
809 
810  (*it).print(myCoutStream);
811 
812  }
813 
814 
815  LogDebug("L1TGlobalProducer")
816  << "Test gtObjectMapRecord in L1TGlobalProducer \n\n" << myCoutStream.str() << "\n\n"
817  << std::endl;
818 
819  myCoutStream.str("");
820  myCoutStream.clear();
821  }
822 
823 
824 
825 
826  // register products
828  iEvent.put( uGtAlgRecord );
829  }
830 
831 
833  iEvent.put( gtObjectMapRecord );
834  }
835 
836 
837 }
#define LogDebug(id)
void receiveMuonObjectData(edm::Event &, const edm::EDGetTokenT< BXVector< l1t::Muon > > &, const bool receiveMu, const int nrL1Mu)
Definition: GlobalBoard.cc:315
unsigned long long m_l1GtParCacheID
unsigned int numberL1Jet() const
get / set the number of L1 jets 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: GlobalBoard.cc:118
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 unsigned long gtTriggerMenuUUID() const
Definition: TriggerMenu.h:98
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
unsigned int numberL1EG() const
get / set the number of L1 e/gamma objects received by GT
edm::EDGetTokenT< BXVector< l1t::Tau > > m_tauInputToken
void fillAlgRecord(int iBxInEvent, std::auto_ptr< GlobalAlgBlkBxCollection > &uGtAlgRecord, int prescaleSet, int menuUUID, int firmwareUUID)
Fill the Daq Records.
Definition: GlobalBoard.cc:928
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 numberPhysTriggers() const
get / set the number of physics trigger algorithms
int bunchCrossing() const
Definition: EventBase.h:65
const std::vector< std::vector< ExternalTemplate > > & vecExternalTemplate() const
unsigned int m_numberPhysTriggers
const L1TGlobalParameters * m_l1GtStablePar
cached stuff
edm::EDGetTokenT< BXVector< GlobalExtBlk > > m_extInputToken
BXVector< GlobalAlgBlk > GlobalAlgBlkBxCollection
Definition: GlobalAlgBlk.h:31
const TriggerMenu * m_l1GtMenu
std::vector< unsigned int > m_initialTriggerMaskAlgoTrig
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: GlobalBoard.cc:141
void setGtPinsOnConditionChip(const unsigned int &)
unsigned long long m_l1GtMenuCacheID
const std::vector< int > & orderOfChip() const
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
const std::string & gtTriggerMenuName() const
const std::vector< std::vector< CaloTemplate > > & corCaloTemplate() const
void reset()
clear uGT
Definition: GlobalBoard.cc:960
void receiveExternalData(edm::Event &, const edm::EDGetTokenT< BXVector< GlobalExtBlk > > &, const bool receiveExt)
Definition: GlobalBoard.cc:364
bool m_produceL1GtDaqRecord
logical flag to produce the L1 GT DAQ readout record
edm::EDGetTokenT< BXVector< l1t::Muon > > m_muInputToken
const std::vector< std::vector< MuonTemplate > > & corMuonTemplate() const
unsigned int numberL1Tau() const
get / set the number of L1 tau received by GT
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)
unsigned int m_prescaleSet
prescale set used
const unsigned long gtTriggerMenuImplementation() const
Definition: TriggerMenu.h:106
const std::vector< std::vector< CorrelationTemplate > > & vecCorrelationTemplate() const
edm::EDGetTokenT< BXVector< l1t::EtSum > > m_sumInputToken
int m_L1DataBxInEvent
Bx expected in Data coming to GT.
l1t::GlobalBoard * m_uGtBrd
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: GlobalBoard.cc:784
const GlobalScales & gtScales() const
menu associated scales
const int gtTriggerMenuUUID() const
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
std::vector< unsigned int > m_initialTriggerMaskVetoAlgoTrig
int totalBxInEvent() const
get / set the number of bx in hardware
const std::vector< std::vector< CaloTemplate > > & vecCaloTemplate() const
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
const std::string & gtTriggerMenuInterface() const
get / set the trigger menu names
unsigned int numberL1Mu() const
get / set the number of L1 muons received by GT
const std::string & gtScaleDbKey() const
menu associated scale key
unsigned int pinsOnChip() const
get / set the number of pins on the GTL condition chips
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
const unsigned long gtTriggerMenuImplementation() const
void runGTL(edm::Event &iEvent, const edm::EventSetup &evSetup, const TriggerMenu *m_l1GtMenu, const bool produceL1GtObjectMapRecord, const int iBxInEvent, std::auto_ptr< GlobalObjectMapRecord > &gtObjectMapRecord, const unsigned int numberPhysTriggers, const int nrL1Mu, const int nrL1EG, const int nrL1Tau, const int nrL1Jet)
run the uGT GTL (Conditions and Algorithms)
Definition: GlobalBoard.cc:412
edm::EDGetTokenT< BXVector< l1t::Jet > > m_jetInputToken
unsigned int numberChips() const
get / set the number of condition chips in GTL
edm::EDGetTokenT< BXVector< l1t::EGamma > > m_egInputToken
void setGtNumberPhysTriggers(const unsigned int &)

Member Data Documentation

uint16_t L1TGlobalProducer::m_activeBoardsGtDaq
private

active boards in L1 GT DAQ record

Definition at line 79 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

bool L1TGlobalProducer::m_algorithmTriggersUnmasked
private

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

Definition at line 166 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 162 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 151 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 82 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

edm::InputTag L1TGlobalProducer::m_egInputTag
private

input tag for calorimeter collections from GCT

Definition at line 118 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

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

Definition at line 122 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 144 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

edm::InputTag L1TGlobalProducer::m_extInputTag
private

input tag for external conditions

Definition at line 128 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

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

Definition at line 129 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_ifCaloEtaNumberBits
private

Definition at line 73 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

int L1TGlobalProducer::m_ifMuEtaNumberBits
private

Definition at line 72 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

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

Definition at line 93 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

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

Definition at line 106 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

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

Definition at line 109 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

bool L1TGlobalProducer::m_isDebugEnabled
private

Definition at line 170 of file L1TGlobalProducer.h.

Referenced by produce().

edm::InputTag L1TGlobalProducer::m_jetInputTag
private

Definition at line 120 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

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

Definition at line 124 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_L1DataBxInEvent
private

Bx expected in Data coming to GT.

Definition at line 147 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

const L1GtBoardMaps* L1TGlobalProducer::m_l1GtBM
private

board maps - cache only the record

Definition at line 85 of file L1TGlobalProducer.h.

unsigned long long L1TGlobalProducer::m_l1GtBMCacheID
private

Definition at line 86 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

const TriggerMenu* L1TGlobalProducer::m_l1GtMenu
private

Definition at line 55 of file L1TGlobalProducer.h.

Referenced by produce().

unsigned long long L1TGlobalProducer::m_l1GtMenuCacheID
private

Definition at line 56 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

unsigned long long L1TGlobalProducer::m_l1GtParCacheID
private

Definition at line 52 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

const L1GtPrescaleFactors* L1TGlobalProducer::m_l1GtPfAlgo
private

prescale factors

Definition at line 89 of file L1TGlobalProducer.h.

unsigned long long L1TGlobalProducer::m_l1GtPfAlgoCacheID
private

Definition at line 90 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

const L1TGlobalParameters* L1TGlobalProducer::m_l1GtStablePar
private

cached stuff

stable parameters

Definition at line 51 of file L1TGlobalProducer.h.

Referenced by produce().

const L1GtTriggerMask* L1TGlobalProducer::m_l1GtTmAlgo
private

trigger masks & veto masks

Definition at line 99 of file L1TGlobalProducer.h.

unsigned long long L1TGlobalProducer::m_l1GtTmAlgoCacheID
private

Definition at line 100 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

const L1GtTriggerMask* L1TGlobalProducer::m_l1GtTmVetoAlgo
private

Definition at line 102 of file L1TGlobalProducer.h.

unsigned long long L1TGlobalProducer::m_l1GtTmVetoAlgoCacheID
private

Definition at line 103 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

edm::InputTag L1TGlobalProducer::m_muInputTag
private

input tag for muon collection from GMT

Definition at line 114 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

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

Definition at line 115 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_nrL1EG
private

Definition at line 66 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_nrL1Jet
private

Definition at line 69 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_nrL1Mu
private

Definition at line 65 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

int L1TGlobalProducer::m_nrL1Tau
private

Definition at line 67 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

unsigned int L1TGlobalProducer::m_numberDaqPartitions
private

Definition at line 62 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

unsigned int L1TGlobalProducer::m_numberPhysTriggers
private

Definition at line 59 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

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

Definition at line 92 of file L1TGlobalProducer.h.

Referenced by produce().

unsigned int L1TGlobalProducer::m_prescaleSet
private

prescale set used

Definition at line 157 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

std::string L1TGlobalProducer::m_prescalesFile
private

CSV file for prescales.

Definition at line 96 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 132 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 135 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 154 of file L1TGlobalProducer.h.

edm::InputTag L1TGlobalProducer::m_sumInputTag
private

Definition at line 121 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

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

Definition at line 125 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

edm::InputTag L1TGlobalProducer::m_tauInputTag
private

Definition at line 119 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer().

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

Definition at line 123 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 76 of file L1TGlobalProducer.h.

Referenced by L1TGlobalProducer(), and produce().

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

Definition at line 105 of file L1TGlobalProducer.h.

Referenced by produce().

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

Definition at line 108 of file L1TGlobalProducer.h.

Referenced by produce().

l1t::GlobalBoard* L1TGlobalProducer::m_uGtBrd
private

Definition at line 111 of file L1TGlobalProducer.h.

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

int L1TGlobalProducer::m_verbosity
private

verbosity level

Definition at line 169 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 138 of file L1TGlobalProducer.h.