CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GlobalExtBlkPacker.cc
Go to the documentation of this file.
2 
4 
5 #include "GTTokens.h"
6 
7 namespace l1t {
8  namespace stage2 {
9  class GlobalExtBlkPacker : public Packer {
10  public:
11  virtual Blocks pack(const edm::Event&, const PackerTokens*) override;
12  };
13  }
14 }
15 
16 // Implementation
17 
18 namespace l1t {
19 namespace stage2 {
20  Blocks
22  {
24  event.getByToken(static_cast<const GTTokens*>(toks)->getExtToken(), exts);
25 
26  unsigned int wdPerBX = 6; //should this be configured someplace else?
27 
28  Blocks res;
29 
30  for(int blk=0; blk<4; blk++) {
31 
32  unsigned int blkID = blk*2+24;
33 
34  unsigned int extOffset = blk*64;
35 
36  //vector of words
37  std::vector<uint32_t> load;
38 
39  for (int i = exts->getFirstBX(); i <= exts->getLastBX(); ++i) {
40 
41  for (auto j = exts->begin(i); j != exts->end(i); ++j) {
42 
43  for(unsigned int wd=0; wd<wdPerBX; wd++) {
44 
45  uint32_t word = 0;
46 
47  if( wd<2 ) {
48 
49  unsigned int startExt = wd*32+extOffset;
50  for(unsigned bt=0; bt<32; bt++) {
51 
52  if(j->getExternalDecision(bt+startExt)) word |= (0x1 << bt);
53 
54  } //end loop over bits
55  } //endif wrd < 2
56 
57  load.push_back(word);
58  } //loop over words
59 
60  } //end loop over alg objects.(trivial one per BX)
61 
62  } //end loop over bx
63 
64  res.push_back(Block(blkID, load));
65 
66  } //loop over blks
67 
68  return res;
69  }
70 }
71 }
72 
int i
Definition: DBlmapReader.cc:9
virtual Blocks pack(const edm::Event &, const PackerTokens *) override
std::vector< Block > Blocks
Definition: Block.h:68
int j
Definition: DBlmapReader.cc:9
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void load(int perCUT=90)
Definition: getMaxPt.h:59
#define DEFINE_L1T_PACKER(type)
Definition: Packer.h:36