CMS 3D CMS Logo

CSCTFPacker.cc
Go to the documentation of this file.
3 
4 #include <strings.h>
5 #include <cerrno>
6 #include <iostream>
7 #include <cstdio>
8 
21 
22 
23 CSCTFPacker::CSCTFPacker(const edm::ParameterSet &conf):edm::one::EDProducer<>(){
24  // "Readout" configuration
25  zeroSuppression = conf.getParameter<bool>("zeroSuppression");
26  nTBINs = conf.getParameter<int> ("nTBINs");
27  activeSectors = conf.getParameter<int> ("activeSectors");
28 
29  // Configuration that controls CMSSW specific stuff
30  putBufferToEvent = conf.getParameter<bool>("putBufferToEvent");
31  std::string outputFile = conf.getParameter<std::string>("outputFile");
32  lctProducer = conf.getParameter<edm::InputTag>("lctProducer");
33  mbProducer = conf.getParameter<edm::InputTag>("mbProducer");
34  trackProducer = conf.getParameter<edm::InputTag>("trackProducer");
35 
36  // Swap: if(swapME1strips && me1b && !zplus) strip = 65 - strip; // 1-64 -> 64-1 :
37  swapME1strips = conf.getParameter<bool>("swapME1strips");
38 
39  file = nullptr;
40  if( outputFile.length() && (file = fopen(outputFile.c_str(),"wt"))==nullptr )
41  throw cms::Exception("OutputFile ")<<"CSCTFPacker: cannot open output file (errno="<<errno<<"). Try outputFile=\"\"";
42 
43  // BX window bounds in CMSSW:
44  m_minBX = conf.getParameter<int>("MinBX"); //3
45  m_maxBX = conf.getParameter<int>("MaxBX"); //9
46 
47  // Finds central LCT BX
48  // assumes window is odd number of bins
49  central_lct_bx = (m_maxBX + m_minBX)/2;
50  // Find central SP BX
51  // assumes window is odd number of bins
52  central_sp_bx = int(nTBINs/2);
53 
54  produces<FEDRawDataCollection>("CSCTFRawData");
55 
56  CSCTC_Tok = consumes<CSCTriggerContainer<csctf::TrackStub> >( edm::InputTag(mbProducer.label(),mbProducer.instance()) );
57  CSCCDC_Tok = consumes<CSCCorrelatedLCTDigiCollection>( edm::InputTag(lctProducer.label(),lctProducer.instance()) );
58  L1CSCTr_Tok = consumes<L1CSCTrackCollection>( edm::InputTag(trackProducer.label(),trackProducer.instance()) );
59 
60 
61 }
62 
64  if( file ) fclose(file);
65 }
66 
69  e.getByToken(CSCCDC_Tok ,corrlcts);
70 
71  CSCSP_MEblock meDataRecord[12][7][5][9][2]; // LCT in sector X, tbin Y, station Z, csc W, and lct I
72  bzero(&meDataRecord,sizeof(meDataRecord));
73  CSCSPRecord meDataHeader[12][7]; // Data Block Header for sector X and tbin Y
74  bzero(&meDataHeader,sizeof(meDataHeader));
75 
76  for(CSCCorrelatedLCTDigiCollection::DigiRangeIterator csc=corrlcts.product()->begin(); csc!=corrlcts.product()->end(); csc++){
77  CSCCorrelatedLCTDigiCollection::Range range1 = corrlcts.product()->get((*csc).first);
78  int lctId=0;
79  for(CSCCorrelatedLCTDigiCollection::const_iterator lct=range1.first; lct!=range1.second; lct++,lctId++){
80  int station = (*csc).first.station()-1;
81  int cscId = (*csc).first.triggerCscId()-1;
82  int sector = (*csc).first.triggerSector()-1 + ( (*csc).first.endcap()==1 ? 0 : 6 );
83  int subSector = CSCTriggerNumbering::triggerSubSectorFromLabels((*csc).first);
84  int tbin = lct->getBX() - (central_lct_bx-central_sp_bx); // Shift back to hardware BX window definition
85  if( tbin>6 || tbin<0 ){
86  edm::LogError("CSCTFPacker|produce")<<" LCT's BX="<<tbin<<" is out of 0-6 window";
87  continue;
88  }
89  int fpga = ( subSector ? subSector-1 : station+1 );
91 
92  // If Det Id is within range
93  if( sector<0 || sector>11 || station<0 || station>3 || cscId<0 || cscId>8 || lctId<0 || lctId>1){
94  edm::LogInfo("CSCTFPacker: CSC digi are out of range: ")<<"sector="<<sector<<", station="<<station<<", cscId="<<cscId<<", lctId="<<lctId;
95  continue;
96  }
97 
98  meDataRecord[sector][tbin][fpga][cscId][lctId].clct_pattern_number = lct->getPattern();
99  meDataRecord[sector][tbin][fpga][cscId][lctId].quality_ = lct->getQuality();
100  meDataRecord[sector][tbin][fpga][cscId][lctId].wire_group_id = lct->getKeyWG();
101 
102  meDataRecord[sector][tbin][fpga][cscId][lctId].clct_pattern_id = (swapME1strips && cscId<3 && station==0 && (*csc).first.endcap()==2 && lct->getStrip()<65 ? 65 - lct->getStrip() : lct->getStrip() );
103  meDataRecord[sector][tbin][fpga][cscId][lctId].csc_id = (*csc).first.triggerCscId();
104  meDataRecord[sector][tbin][fpga][cscId][lctId].left_right = lct->getBend();
105  meDataRecord[sector][tbin][fpga][cscId][lctId].bx0_ = 0; //?;
106  meDataRecord[sector][tbin][fpga][cscId][lctId].bc0_ = 0; //?;
107 
108  meDataRecord[sector][tbin][fpga][cscId][lctId].me_bxn = 0; //?
109  meDataRecord[sector][tbin][fpga][cscId][lctId].receiver_status_er1 = 0; // dummy
110  meDataRecord[sector][tbin][fpga][cscId][lctId].receiver_status_dv1 = 0; // dummy
111  meDataRecord[sector][tbin][fpga][cscId][lctId].aligment_fifo_full = 0; // dummy
112 
113  meDataRecord[sector][tbin][fpga][cscId][lctId].link_id = lct->getMPCLink();
114  meDataRecord[sector][tbin][fpga][cscId][lctId].mpc_id = 0; // Join with above?
115  meDataRecord[sector][tbin][fpga][cscId][lctId].err_prop_cnt = 0; // dummy
116  meDataRecord[sector][tbin][fpga][cscId][lctId].receiver_status_er2 = 0; // dummy
117  meDataRecord[sector][tbin][fpga][cscId][lctId].receiver_status_dv2 = 0; // dummy
118  meDataRecord[sector][tbin][fpga][cscId][lctId].aligment_fifo_empty = 0; // dummy
119 
120  if( lct->isValid() ){
121  switch( (meDataHeader[sector][tbin].vp_bits>>(fpga*3)) & 0x7 ){
122  case 0x0: meDataHeader[sector][tbin].vp_bits |= (0x1 << (fpga*3)); break;
123  case 0x1: meDataHeader[sector][tbin].vp_bits |= (0x3 << (fpga*3)); break;
124  case 0x3: meDataHeader[sector][tbin].vp_bits |= (0x7 << (fpga*3)); break;
125  default :
126  edm::LogInfo("CSCTFPacker: more than 3 LCTs from a single MPC in one BX!!!");
127  continue;
128  break;
129  }
130  meDataRecord[sector][tbin][fpga][cscId][lctId].valid_pattern = 1; // for later use
131  }
132  meDataHeader[sector][tbin].vq_a = 0; // no digi yet?
133  meDataHeader[sector][tbin].vq_b = 0; // no digi yet?
134  meDataHeader[sector][tbin].se_bits = 0; // dummy
135  meDataHeader[sector][tbin].sm_bits = 0; // dummy
136  meDataHeader[sector][tbin].af_bits = 0; // dummy
137  meDataHeader[sector][tbin].bx_bits = 0;//(lct->getBX()&??<< (fpga*3));
138 
139  meDataHeader[sector][tbin].spare_1 = 0; // for later use
140  }
141  }
142 
143  CSCSP_MBblock mbDataRecord[12][2][7]; // LCT in sector X, subsector Z, tbin Y
144  bzero(&mbDataRecord,sizeof(mbDataRecord));
146  if( mbProducer.label() != "null" ){
147  e.getByToken(CSCTC_Tok ,barrelStubs);
148  if( barrelStubs.isValid() ){
149  std::vector<csctf::TrackStub> stubs = barrelStubs.product()->get();
150  for(std::vector<csctf::TrackStub>::const_iterator dt=stubs.begin(); dt!=stubs.end(); dt++){
151  int sector = dt->sector()-1 + ( dt->endcap()==1 ? 0 : 6 );
152  int subSector = dt->subsector()-1;
153  int tbin = dt->getBX() - (central_lct_bx-central_sp_bx); // Shift back to hardware BX window definition
154  if( tbin<0 || tbin>6 || sector<0 || sector>11 || subSector<0 || subSector>11 ){
155  edm::LogInfo("CSCTFPacker: CSC DT digi are out of range: ")<<" sector="<<sector<<" subSector="<<subSector<<" tbin="<<tbin;
156  continue;
157  }
158  mbDataRecord[sector][subSector][tbin].quality_ = dt->getQuality();
159  mbDataRecord[sector][subSector][tbin].phi_bend_ = dt->getBend();
160  mbDataRecord[sector][subSector][tbin].flag_ = dt->getStrip();
161  mbDataRecord[sector][subSector][tbin].cal_ = dt->getKeyWG();
162  mbDataRecord[sector][subSector][tbin].phi_ = dt->phiPacked();
163  mbDataRecord[sector][subSector][tbin].bxn1_ =(dt->getBX0()>>1)&0x1;
164  mbDataRecord[sector][subSector][tbin].bxn0_ = dt->getBX0()&0x1;
165  mbDataRecord[sector][subSector][tbin].bc0_ = dt->getPattern();
166  mbDataRecord[sector][subSector][tbin].mb_bxn_ = dt->getCSCID();
167  switch(subSector){
168  case 0: meDataHeader[sector][tbin].vq_a = 1; break;
169  case 1: meDataHeader[sector][tbin].vq_b = 1; break;
170  default: edm::LogInfo("CSCTFPacker: subSector=")<<subSector; break;
171  }
172  mbDataRecord[sector][subSector][tbin].id_ = dt->getMPCLink(); // for later use
173  }
174  }
175  }
176 
177  CSCSP_SPblock spDataRecord[12][7][3]; // Up to 3 tracks in sector X and tbin Y
178  bzero(&spDataRecord,sizeof(spDataRecord));
179  int nTrk[12][7];
180  bzero(&nTrk,sizeof(nTrk));
181 
183  if( trackProducer.label() != "null" ){
184  e.getByToken(L1CSCTr_Tok ,tracks);
185 
186  for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk!=tracks->end(); trk++){
187  int sector = 6*(trk->first.endcap()-1)+trk->first.sector()-1;
188  int tbin = trk->first.BX() + central_sp_bx; // Shift back to hardware BX window definition
189 //std::cout<<"Track["<<nTrk[sector][tbin]<<"] sector: "<<sector<<" tbin: "<<tbin<<std::endl;
190  if( tbin>6 || tbin<0 ){
191  edm::LogError("CSCTFPacker|analyze")<<" Track's BX="<<tbin<<" is out of 0-6 window";
192  continue;
193  }
194  if( sector<0 || sector>11 ){
195  edm::LogError("CSCTFPacker|analyze")<<" Track's sector="<<sector<<" is out of range";
196  continue;
197  }
198  spDataRecord[sector][tbin][nTrk[sector][tbin]].phi_ = trk->first.localPhi();
199  spDataRecord[sector][tbin][nTrk[sector][tbin]].sign_ =(trk->first.ptLUTAddress()>>20)&0x1;
200  spDataRecord[sector][tbin][nTrk[sector][tbin]].front_rear = trk->first.front_rear();
201  spDataRecord[sector][tbin][nTrk[sector][tbin]].charge_ = trk->first.charge_packed(); //
202  spDataRecord[sector][tbin][nTrk[sector][tbin]].eta_ = trk->first.eta_packed();
203 
204  spDataRecord[sector][tbin][nTrk[sector][tbin]].halo_ = trk->first.finehalo_packed();
205  spDataRecord[sector][tbin][nTrk[sector][tbin]].se = 0; // dummy
206  spDataRecord[sector][tbin][nTrk[sector][tbin]].deltaPhi12_= trk->first.ptLUTAddress()&0xFF;
207  spDataRecord[sector][tbin][nTrk[sector][tbin]].deltaPhi23_=(trk->first.ptLUTAddress()>>8)&0xF;
208  spDataRecord[sector][tbin][nTrk[sector][tbin]].bxn0_ = 0; //dummy
209  spDataRecord[sector][tbin][nTrk[sector][tbin]].bc0_ = 0; //dummy
210 
211  spDataRecord[sector][tbin][nTrk[sector][tbin]].me1_id = trk->first.me1ID();
212  spDataRecord[sector][tbin][nTrk[sector][tbin]].me2_id = trk->first.me2ID();
213  spDataRecord[sector][tbin][nTrk[sector][tbin]].me3_id = trk->first.me3ID();
214  spDataRecord[sector][tbin][nTrk[sector][tbin]].me4_id = trk->first.me4ID();
215  spDataRecord[sector][tbin][nTrk[sector][tbin]].mb_id = trk->first.mb1ID();
216  spDataRecord[sector][tbin][nTrk[sector][tbin]].ms_id = 0; // don't care winner()
217 
218  // Warning, digi copying was broken for <= CMSSW_3_8_x! The 5 lines of code below will give problems there:
219  spDataRecord[sector][tbin][nTrk[sector][tbin]].me1_tbin = trk->first.me1Tbin();
220  spDataRecord[sector][tbin][nTrk[sector][tbin]].me2_tbin = trk->first.me2Tbin();
221  spDataRecord[sector][tbin][nTrk[sector][tbin]].me3_tbin = trk->first.me3Tbin();
222  spDataRecord[sector][tbin][nTrk[sector][tbin]].me4_tbin = trk->first.me4Tbin();
223  spDataRecord[sector][tbin][nTrk[sector][tbin]].mb_tbin = trk->first.mb1Tbin();
224  // As the MB stubs are not saved in simulation, we want to introduce an artificial ids
225  if( trk->first.mb1ID() ){
226  int subSector = (trk->first.mb1ID() - 1)%2;
227  int MBtbin = tbin - spDataRecord[sector][tbin][nTrk[sector][tbin]].mb_tbin;
228  if( subSector<0 || subSector>1 || MBtbin<0 || MBtbin>7 || !mbDataRecord[sector][subSector][MBtbin].id_ )
229  spDataRecord[sector][tbin][nTrk[sector][tbin]].mb_id = ( subSector ? 6 : 5 );
230  }
231  spDataRecord[sector][tbin][nTrk[sector][tbin]].id_ = nTrk[sector][tbin]+1; // for later use
232 
233  nTrk[sector][tbin]++;
234  switch(nTrk[sector][tbin]){
235  case 1: meDataHeader[sector][tbin].mode1 = (trk->first.ptLUTAddress()>>16)&0xF; break;
236  case 2: meDataHeader[sector][tbin].mode2 = (trk->first.ptLUTAddress()>>16)&0xF; break;
237  case 3: meDataHeader[sector][tbin].mode3 = (trk->first.ptLUTAddress()>>16)&0xF; break;
238  default:
239  edm::LogInfo("More than 3 tracks from one SP in the BX");
240  continue;
241  break;
242  }
243  }
244  }
245 
247  bzero(&header,sizeof(header));
248 
249  header.header_mark_1 = 0x9;
250  header.header_mark_2 = 0x9;
251  header.header_mark_3 = 0x9;
252  header.header_mark_4 = 0x9;
253 
254  header.header_mark_5 = 0xA;
255  header.header_mark_6 = 0xA;
256  header.header_mark_7 = 0xA;
257  header.header_mark_8 = 0xA;
258 
259  header.csr_dfc = nTBINs;
260  header.csr_dfc |= ( zeroSuppression ? 0x8 : 0x0 );
261  header.csr_dfc |= 0x7F0; // All FPGAs are active
262  header.skip = 0;
263  header.sp_ersv = 2; // Format version with block of counters
264 
265  CSCSPCounters counters;
266  bzero(&counters,sizeof(counters));
267 
268  CSCSPTrailer trailer;
269  bzero(&trailer,sizeof(trailer));
270 
271  trailer.trailer_mark_1 = 0xF;
272  trailer.trailer_mark_2 = 0xF;
273  trailer.trailer_mark_3 = 0x7;
274  trailer.trailer_mark_4 = 0xF;
275  trailer.trailer_mark_5 = 0xF;
276  trailer.trailer_mark_6 = 0xF;
277  trailer.trailer_mark_7 = 0xE;
278  trailer.trailer_mark_8 = 0xE;
279  trailer.trailer_mark_9 = 0xE;
280  trailer.trailer_mark_10= 0xE;
281 
282  unsigned short spDDUrecord[700*12], *pos=spDDUrecord; // max length
283  bzero(&spDDUrecord,sizeof(spDDUrecord));
284  int eventNumber = e.id().event();
285  *pos++ = 0x0000; *pos++ = 0x0000; *pos++ = 0xFFFF&eventNumber; *pos++ = 0x5000|(eventNumber>>16);
286  *pos++ = 0x0000; *pos++ = 0x8000; *pos++ = 0x0001; *pos++ = 0x8000;
287  *pos++ = 0x0000; *pos++ = 0x0000; *pos++ = 0x0000; *pos++ = 0x0000;
288 
289  for(int sector=0; sector<12; sector++){
290  if( !(activeSectors & (1<<sector)) ) continue;
291  header.sp_trigger_sector = sector+1;
292  memcpy(pos,&header,16);
293  pos+=8;
294  memcpy(pos,&counters,8);
295  pos+=4;
296 
297  for(int tbin=0; tbin<nTBINs; tbin++){
298  memcpy(pos,&meDataHeader[sector][tbin],16);
299  pos+=8;
300  for(int fpga=0; fpga<5; fpga++){
301  int nLCTs=0;
302  for(int link=0; link<3; link++){
303  for(int cscId=0; cscId<9; cscId++)
304  for(int lctId=0; lctId<2; lctId++)
305  // Only 3 LCT per BX from the same fpga are allowed (to be valid):
306  if( meDataRecord[sector][tbin][fpga][cscId][lctId].valid_pattern
307  && meDataRecord[sector][tbin][fpga][cscId][lctId].link_id==link+1 ){
308  memcpy(pos,&meDataRecord[sector][tbin][fpga][cscId][lctId],8);
309  pos+=4;
310  nLCTs++;
311  }
312  }
313  if( !zeroSuppression ) pos += 4*(3-nLCTs);
314  }
315  for(int subSector=0; subSector<2; subSector++)
316  if( !zeroSuppression || (subSector==0 && meDataHeader[sector][tbin].vq_a) || (subSector==1 && meDataHeader[sector][tbin].vq_b) ){
317  memcpy(pos,&mbDataRecord[sector][subSector][tbin],8);
318  pos+=4;
319  }
320  for(int trk=0; trk<3; trk++){
321  if( !zeroSuppression || spDataRecord[sector][tbin][trk].id_ ){
322  memcpy(pos,&spDataRecord[sector][tbin][trk],8);
323  pos+=4;
324  }
325  }
326  }
327  memcpy(pos,&trailer,16);
328  pos+=8;
329  }
330 
331  *pos++ = 0x8000; *pos++ = 0x8000; *pos++ = 0xFFFF; *pos++ = 0x8000;
332  *pos++ = 0x0000; *pos++ = 0x0000; *pos++ = 0x0000; *pos++ = 0x0000;
333  *pos++ = 0x0000; *pos++ = 0x0000; *pos++ = 0x0000; *pos++ = 0x0000;
334 
335  if( putBufferToEvent ){
336  auto data = std::make_unique<FEDRawDataCollection>();
337  FEDRawData& fedRawData = data->FEDData((unsigned int)FEDNumbering::MINCSCTFFEDID);
338  fedRawData.resize((pos-spDDUrecord)*sizeof(unsigned short));
339  std::copy((unsigned char*)spDDUrecord,(unsigned char*)pos,fedRawData.data());
340  FEDHeader csctfFEDHeader (fedRawData.data());
341  csctfFEDHeader.set(fedRawData.data(), 0, e.id().event(), 0, FEDNumbering::MINCSCTFFEDID);
342  FEDTrailer csctfFEDTrailer(fedRawData.data()+(fedRawData.size()-8));
343  csctfFEDTrailer.set(fedRawData.data()+(fedRawData.size()-8), fedRawData.size()/8, evf::compute_crc(fedRawData.data(),fedRawData.size()), 0, 0);
344  e.put(std::move(data),"CSCTFRawData");
345  }
346 
347  if(file) fwrite(spDDUrecord,2,pos-spDDUrecord,file);
348 }
unsigned header_mark_8
Definition: CSCSPHeader.h:63
unsigned sp_trigger_sector
Definition: CSCSPHeader.h:27
unsigned me1_id
Definition: CSCSP_SPblock.h:27
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:41
unsigned bx_bits
Definition: CSCSPRecord.h:33
unsigned phi_
Definition: CSCSP_MBblock.h:17
float dt
Definition: AMPTWrapper.h:126
unsigned deltaPhi23_
Definition: CSCSP_SPblock.h:21
unsigned eta_
Definition: CSCSP_SPblock.h:15
unsigned trailer_mark_10
Definition: CSCSPTrailer.h:43
unsigned me_bxn
Definition: CSCSP_MEblock.h:21
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
unsigned mb_tbin
Definition: CSCSP_SPblock.h:39
unsigned front_rear
Definition: CSCSP_SPblock.h:13
unsigned trailer_mark_2
Definition: CSCSPTrailer.h:13
unsigned trailer_mark_4
Definition: CSCSPTrailer.h:17
unsigned aligment_fifo_empty
Definition: CSCSP_MEblock.h:32
unsigned spare_1
Definition: CSCSPRecord.h:21
def copy(args, dbName)
unsigned skip
Definition: CSCSPHeader.h:62
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
unsigned trailer_mark_6
Definition: CSCSPTrailer.h:28
unsigned clct_pattern_number
Definition: CSCSP_MEblock.h:9
unsigned mb_id
Definition: CSCSP_SPblock.h:31
unsigned me3_tbin
Definition: CSCSP_SPblock.h:37
unsigned bx0_
Definition: CSCSP_MEblock.h:17
unsigned aligment_fifo_full
Definition: CSCSP_MEblock.h:24
unsigned trailer_mark_3
Definition: CSCSPTrailer.h:14
unsigned trailer_mark_7
Definition: CSCSPTrailer.h:32
CSCTFPacker(const edm::ParameterSet &conf)
Definition: CSCTFPacker.cc:23
unsigned af_bits
Definition: CSCSPRecord.h:30
unsigned sign_
Definition: CSCSP_SPblock.h:12
#define nullptr
unsigned me2_id
Definition: CSCSP_SPblock.h:28
unsigned bc0_
Definition: CSCSP_MBblock.h:20
unsigned csc_id
Definition: CSCSP_MEblock.h:15
unsigned left_right
Definition: CSCSP_MEblock.h:16
unsigned deltaPhi12_
Definition: CSCSP_SPblock.h:20
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > CSCTC_Tok
Definition: CSCTFPacker.h:34
unsigned mode2
Definition: CSCSPRecord.h:17
unsigned cal_
Definition: CSCSP_MBblock.h:14
~CSCTFPacker(void) override
Definition: CSCTFPacker.cc:63
unsigned flag_
Definition: CSCSP_MBblock.h:13
unsigned header_mark_7
Definition: CSCSPHeader.h:44
unsigned bxn1_
Definition: CSCSP_MBblock.h:18
unsigned me2_tbin
Definition: CSCSP_SPblock.h:36
unsigned header_mark_6
Definition: CSCSPHeader.h:29
unsigned clct_pattern_id
Definition: CSCSP_MEblock.h:14
unsigned halo_
Definition: CSCSP_SPblock.h:16
static void set(unsigned char *trailer, uint32_t lenght, uint16_t crc, uint8_t evt_stat, uint8_t tts, bool moreTrailers=false)
Set all fields in the trailer.
Definition: FEDTrailer.cc:60
unsigned header_mark_1
Definition: CSCSPHeader.h:10
unsigned receiver_status_dv2
Definition: CSCSP_MEblock.h:31
edm::InputTag trackProducer
Definition: CSCTFPacker.h:20
unsigned receiver_status_dv1
Definition: CSCSP_MEblock.h:23
unsigned header_mark_2
Definition: CSCSPHeader.h:13
unsigned trailer_mark_1
Definition: CSCSPTrailer.h:11
unsigned short compute_crc(unsigned char *buffer, unsigned int bufSize)
Definition: CRC16.h:67
void produce(edm::Event &e, const edm::EventSetup &c) override
Definition: CSCTFPacker.cc:67
unsigned receiver_status_er2
Definition: CSCSP_MEblock.h:30
unsigned sp_ersv
Definition: CSCSPHeader.h:26
unsigned phi_bend_
Definition: CSCSP_MBblock.h:11
unsigned int id_
Definition: CSCSP_MBblock.h:39
unsigned trailer_mark_8
Definition: CSCSPTrailer.h:35
unsigned bc0_
Definition: CSCSP_MEblock.h:18
unsigned receiver_status_er1
Definition: CSCSP_MEblock.h:22
bool isValid() const
Definition: HandleBase.h:74
unsigned header_mark_4
Definition: CSCSPHeader.h:19
Definition: L1Track.h:19
unsigned me3_id
Definition: CSCSP_SPblock.h:29
unsigned header_mark_5
Definition: CSCSPHeader.h:23
unsigned int id_
Definition: CSCSP_SPblock.h:56
unsigned charge_
Definition: CSCSP_SPblock.h:14
bool putBufferToEvent
Definition: CSCTFPacker.h:25
unsigned short activeSectors
Definition: CSCTFPacker.h:24
unsigned trailer_mark_5
Definition: CSCSPTrailer.h:25
bool zeroSuppression
Definition: CSCTFPacker.h:22
T const * product() const
Definition: Handle.h:81
unsigned csr_dfc
Definition: CSCSPHeader.h:61
unsigned mode3
Definition: CSCSPRecord.h:18
edm::InputTag lctProducer
Definition: CSCTFPacker.h:20
unsigned header_mark_3
Definition: CSCSPHeader.h:16
bool swapME1strips
Definition: CSCTFPacker.h:27
std::vector< CSCCorrelatedLCTDigi >::const_iterator const_iterator
static int triggerSubSectorFromLabels(int station, int chamber)
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > CSCCDC_Tok
Definition: CSCTFPacker.h:33
std::string const & label() const
Definition: InputTag.h:36
edm::InputTag mbProducer
Definition: CSCTFPacker.h:20
edm::EventID id() const
Definition: EventBase.h:60
int central_sp_bx
Definition: CSCTFPacker.h:31
unsigned mode1
Definition: CSCSPRecord.h:16
HLT enums.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int central_lct_bx
Definition: CSCTFPacker.h:31
unsigned quality_
Definition: CSCSP_MEblock.h:10
unsigned wire_group_id
Definition: CSCSP_MEblock.h:11
std::pair< const_iterator, const_iterator > Range
unsigned vq_a
Definition: CSCSPRecord.h:19
unsigned mpc_id
Definition: CSCSP_MEblock.h:28
unsigned me4_tbin
Definition: CSCSP_SPblock.h:38
unsigned bxn0_
Definition: CSCSP_MBblock.h:19
unsigned err_prop_cnt
Definition: CSCSP_MEblock.h:29
unsigned se_bits
Definition: CSCSPRecord.h:24
static void set(unsigned char *header, uint8_t triggerType, uint32_t lvl1ID, uint16_t bxID, uint16_t sourceID, uint8_t version=0, bool moreHeaders=false)
Set all fields in the header.
Definition: FEDHeader.cc:47
FILE * file
Definition: CSCTFPacker.h:29
unsigned vq_b
Definition: CSCSPRecord.h:20
unsigned mb_bxn_
Definition: CSCSP_MBblock.h:23
unsigned trailer_mark_9
Definition: CSCSPTrailer.h:39
unsigned short nTBINs
Definition: CSCTFPacker.h:23
unsigned bc0_
Definition: CSCSP_SPblock.h:24
std::string const & instance() const
Definition: InputTag.h:37
unsigned int valid_pattern
Definition: CSCSP_MEblock.h:48
unsigned bxn0_
Definition: CSCSP_SPblock.h:23
unsigned phi_
Definition: CSCSP_SPblock.h:11
def move(src, dest)
Definition: eostools.py:511
unsigned link_id
Definition: CSCSP_MEblock.h:27
unsigned ms_id
Definition: CSCSP_SPblock.h:32
unsigned me1_tbin
Definition: CSCSP_SPblock.h:35
unsigned sm_bits
Definition: CSCSPRecord.h:27
unsigned quality_
Definition: CSCSP_MBblock.h:9
edm::EDGetTokenT< L1CSCTrackCollection > L1CSCTr_Tok
Definition: CSCTFPacker.h:35
unsigned vp_bits
Definition: CSCSPRecord.h:13
unsigned me4_id
Definition: CSCSP_SPblock.h:30