CMS 3D CMS Logo

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

#include <DTTFFEDSim.h>

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

Public Member Functions

 DTTFFEDSim (const edm::ParameterSet &pset)
 Constructor. More...
 
bool fillRawData (edm::Event &e, FEDRawDataCollection &data)
 Generate and fill FED raw data for a full event. More...
 
void produce (edm::Event &e, const edm::EventSetup &c)
 Produce digis out of raw data. More...
 
virtual ~DTTFFEDSim ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 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
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

int bxNr (int channel)
 
void calcCRC (int myD1, int myD2, int &myC)
 
int channel (int wheel, int sector, int bx)
 
edm::InputTag getDTDigiInputTag ()
 
edm::InputTag getDTPHTFInputTag ()
 
int sector (int channel)
 
int wheel (int channel)
 

Private Attributes

edm::InputTag DTDigiInputTag
 
edm::InputTag DTPHTFInputTag
 
unsigned int eventNum
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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

L1 DT Track Finder Digi-to-Raw

J. Troconiz UAM Madrid

Definition at line 24 of file DTTFFEDSim.h.

Constructor & Destructor Documentation

DTTFFEDSim::DTTFFEDSim ( const edm::ParameterSet pset)

Constructor.

Definition at line 28 of file DTTFFEDSim.cc.

References DTDigiInputTag, DTPHTFInputTag, and edm::ParameterSet::getParameter().

28  : eventNum(0) {
29 
30  produces<FEDRawDataCollection>();
31 
32  DTDigiInputTag = pset.getParameter<edm::InputTag>("DTDigi_Source");
33  DTPHTFInputTag = pset.getParameter<edm::InputTag>("DTTracks_Source");
34 
35 }
T getParameter(std::string const &) const
unsigned int eventNum
Definition: DTTFFEDSim.h:43
edm::InputTag DTDigiInputTag
Definition: DTTFFEDSim.h:45
edm::InputTag DTPHTFInputTag
Definition: DTTFFEDSim.h:46
DTTFFEDSim::~DTTFFEDSim ( )
virtual

Destructor.

Definition at line 37 of file DTTFFEDSim.cc.

37 {}

Member Function Documentation

int DTTFFEDSim::bxNr ( int  channel)
private

Definition at line 290 of file DTTFFEDSim.cc.

References channel().

290  {
291 
292  int myChannel = channel;
293 
294  if (myChannel > 127) myChannel -= 2;
295 
296  if (myChannel < 0 || myChannel > 251 ){ return -999; }
297 
298  int myBx = 1-(myChannel%3);
299 
300  return myBx;
301 }
int channel(int wheel, int sector, int bx)
Definition: DTTFFEDSim.cc:270
void DTTFFEDSim::calcCRC ( int  myD1,
int  myD2,
int &  myC 
)
private

Definition at line 327 of file DTTFFEDSim.cc.

References funct::C, and i.

Referenced by fillRawData().

327  {
328 
329  int myCRC[16],D[64],C[16];
330 
331  for( int i=0; i < 32; i++ ){ D[i]=(myD2>>i)&0x1; }
332  for( int i=0; i < 32; i++ ){ D[i+32]=(myD1>>i)&0x1; }
333  for( int i=0; i < 16; i++ ){ C[i]=(myC>>i)&0x1; }
334 
335  myCRC[0] = ( D[63] + D[62] + D[61] + D[60] + D[55] + D[54] +
336  D[53] + D[52] + D[51] + D[50] + D[49] + D[48] +
337  D[47] + D[46] + D[45] + D[43] + D[41] + D[40] +
338  D[39] + D[38] + D[37] + D[36] + D[35] + D[34] +
339  D[33] + D[32] + D[31] + D[30] + D[27] + D[26] +
340  D[25] + D[24] + D[23] + D[22] + D[21] + D[20] +
341  D[19] + D[18] + D[17] + D[16] + D[15] + D[13] +
342  D[12] + D[11] + D[10] + D[9] + D[8] + D[7] +
343  D[6] + D[5] + D[4] + D[3] + D[2] + D[1] +
344  D[0] + C[0] + C[1] + C[2] + C[3] + C[4] +
345  C[5] + C[6] + C[7] + C[12] + C[13] + C[14] +
346  C[15] )%2;
347 
348  myCRC[1] = ( D[63] + D[62] + D[61] + D[56] + D[55] + D[54] +
349  D[53] + D[52] + D[51] + D[50] + D[49] + D[48] +
350  D[47] + D[46] + D[44] + D[42] + D[41] + D[40] +
351  D[39] + D[38] + D[37] + D[36] + D[35] + D[34] +
352  D[33] + D[32] + D[31] + D[28] + D[27] + D[26] +
353  D[25] + D[24] + D[23] + D[22] + D[21] + D[20] +
354  D[19] + D[18] + D[17] + D[16] + D[14] + D[13] +
355  D[12] + D[11] + D[10] + D[9] + D[8] + D[7] +
356  D[6] + D[5] + D[4] + D[3] + D[2] + D[1] +
357  C[0] + C[1] + C[2] + C[3] + C[4] + C[5] +
358  C[6] + C[7] + C[8] + C[13] + C[14] + C[15] )%2;
359 
360  myCRC[2] = ( D[61] + D[60] + D[57] + D[56] + D[46] + D[42] +
361  D[31] + D[30] + D[29] + D[28] + D[16] + D[14] +
362  D[1] + D[0] + C[8] + C[9] + C[12] + C[13] )%2;
363 
364  myCRC[3] = ( D[62] + D[61] + D[58] + D[57] + D[47] + D[43] +
365  D[32] + D[31] + D[30] + D[29] + D[17] + D[15] +
366  D[2] + D[1] + C[9] + C[10] + C[13] + C[14] )%2;
367 
368  myCRC[4] = ( D[63] + D[62] + D[59] + D[58] + D[48] + D[44] +
369  D[33] + D[32] + D[31] + D[30] + D[18] + D[16] +
370  D[3] + D[2] + C[0] + C[10] + C[11] + C[14] +
371  C[15] )%2;
372 
373  myCRC[5] = ( D[63] + D[60] + D[59] + D[49] + D[45] + D[34] +
374  D[33] + D[32] + D[31] + D[19] + D[17] + D[4] +
375  D[3] + C[1] + C[11] + C[12] + C[15] )%2;
376 
377  myCRC[6] = ( D[61] + D[60] + D[50] + D[46] + D[35] + D[34] +
378  D[33] + D[32] + D[20] + D[18] + D[5] + D[4] +
379  C[2] + C[12] + C[13] )%2;
380 
381  myCRC[7] = ( D[62] + D[61] + D[51] + D[47] + D[36] + D[35] +
382  D[34] + D[33] + D[21] + D[19] + D[6] + D[5] +
383  C[3] + C[13] + C[14] )%2;
384 
385  myCRC[8] = ( D[63] + D[62] + D[52] + D[48] + D[37] + D[36] +
386  D[35] + D[34] + D[22] + D[20] + D[7] + D[6] +
387  C[0] + C[4] + C[14] + C[15] )%2;
388 
389  myCRC[9] = ( D[63] + D[53] + D[49] + D[38] + D[37] + D[36] +
390  D[35] + D[23] + D[21] + D[8] + D[7] + C[1] +
391  C[5] + C[15] )%2;
392 
393  myCRC[10] = ( D[54] + D[50] + D[39] + D[38] + D[37] + D[36] +
394  D[24] + D[22] + D[9] + D[8] + C[2] + C[6] )%2;
395 
396  myCRC[11] = ( D[55] + D[51] + D[40] + D[39] + D[38] + D[37] +
397  D[25] + D[23] + D[10] + D[9] + C[3] + C[7] )%2;
398 
399  myCRC[12] = ( D[56] + D[52] + D[41] + D[40] + D[39] + D[38] +
400  D[26] + D[24] + D[11] + D[10] + C[4] + C[8] )%2;
401 
402  myCRC[13] = ( D[57] + D[53] + D[42] + D[41] + D[40] + D[39] +
403  D[27] + D[25] + D[12] + D[11] + C[5] + C[9] )%2;
404 
405  myCRC[14] = ( D[58] + D[54] + D[43] + D[42] + D[41] + D[40] +
406  D[28] + D[26] + D[13] + D[12] + C[6] + C[10] )%2;
407 
408  myCRC[15] = ( D[63] + D[62] + D[61] + D[60] + D[59] + D[54] +
409  D[53] + D[52] + D[51] + D[50] + D[49] + D[48] +
410  D[47] + D[46] + D[45] + D[44] + D[42] + D[40] +
411  D[39] + D[38] + D[37] + D[36] + D[35] + D[34] +
412  D[33] + D[32] + D[31] + D[30] + D[29] + D[26] +
413  D[25] + D[24] + D[23] + D[22] + D[21] + D[20] +
414  D[19] + D[18] + D[17] + D[16] + D[15] + D[14] +
415  D[12] + D[11] + D[10] + D[9] + D[8] + D[7] +
416  D[6] + D[5] + D[4] + D[3] + D[2] + D[1] +
417  D[0] + C[0] + C[1] + C[2] + C[3] + C[4] +
418  C[5] + C[6] + C[11] + C[12] + C[13] + C[14] +
419  C[15] )%2;
420 
421  int tempC = 0x0;
422  for(int i=0; i<16 ; i++){ tempC = tempC + (myCRC[i]<<i); }
423  myC = tempC ;
424  return;
425 }
int i
Definition: DBlmapReader.cc:9
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
int DTTFFEDSim::channel ( int  wheel,
int  sector,
int  bx 
)
private

Definition at line 270 of file DTTFFEDSim.cc.

References funct::abs().

Referenced by bxNr(), fillRawData(), sector(), and wheel().

270  {
271 
272  // wheel : -3 -2 -1 +1 +2 +3 <=> PHTF's : N2, N1, N0, P0, P1, P2
273  // 0 <=> ETTF
274  // sector : 0 -> 11
275  // bx : -1 -> +1
276 
277  int myChannel = 255;
278 
279  if ( abs(bx) > 1) { return myChannel; }
280  if ( sector < 0 || sector > 11) { return myChannel; }
281  if ( abs(wheel) > 3) { return myChannel; }
282 
283  myChannel = sector*21 + wheel*3 - bx + 10 ;
284 
285  if (myChannel > 125) myChannel += 2;
286 
287  return myChannel;
288 }
int sector(int channel)
Definition: DTTFFEDSim.cc:303
int wheel(int channel)
Definition: DTTFFEDSim.cc:314
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool DTTFFEDSim::fillRawData ( edm::Event e,
FEDRawDataCollection data 
)

Generate and fill FED raw data for a full event.

Definition at line 51 of file DTTFFEDSim.cc.

References calcCRC(), channel(), FEDRawData::data(), edm::EventID::event(), eventNum, FEDRawDataCollection::FEDData(), edm::Event::getByLabel(), getDTDigiInputTag(), getDTPHTFInputTag(), edm::EventBase::id(), groupFilesInBlocks::lines, and FEDRawData::resize().

Referenced by produce().

52  {
53 
54  eventNum = e.id().event();
55 
56  int lines = 2;
57 
59  e.getByLabel(getDTDigiInputTag(),phtrig);
60  lines += phtrig->bxSize(-1, 1);
61 
63  e.getByLabel(getDTDigiInputTag(),thtrig);
64  lines += thtrig->bxSize(-1, 1);
65 
67  e.getByLabel(getDTPHTFInputTag(),trtrig);
68  lines += trtrig->bxSize(-1, 1)*3;
69 
70  FEDRawData& dttfdata = data.FEDData(0x30C);
71  dttfdata.resize(lines*8); // size in bytes
72  unsigned char* LineFED=dttfdata.data();
73 
74  int* dataWord1 = new int;
75  int* dataWord2 = new int;
76 
77  //--> Header
78 
79  *dataWord1 = 0x50000000
80  + (eventNum&0xFFFFFF);
81  *dataWord2 = 0x00030C00;
82 
83  int newCRC = 0xFFFF;
84  calcCRC(*dataWord1, *dataWord2, newCRC);
85  *((int*)LineFED)=*dataWord2;
86  LineFED+=4;
87  *((int*)LineFED)=*dataWord1;
88 
89  //--> DTTF data
90 
91  int TS1Id[4], TS2Id[4]; // word identifier for TS #1,#2 for stations
92  TS1Id[0] = 0x0E;
93  TS2Id[0] = 0x1E;
94  TS1Id[1] = 0x2E;
95  TS2Id[1] = 0x3E;
96  TS1Id[3] = 0x4E;
97  TS2Id[3] = 0x5E;
98  TS1Id[2] = 0x8FFF8;
99  TS2Id[2] = 0x9FFF8;
100 
101  //Input
103 
104  for ( tsphi = phtrig->getContainer()->begin();
105  tsphi != phtrig->getContainer()->end();
106  tsphi++ ) {
107  if ( tsphi->code() != 7 ) {
108 
109  int wheelID = tsphi->whNum()+1;
110  if ( wheelID <= 0 ) wheelID -= 2;
111  int stationID = tsphi->stNum()-1;
112  int is2nd = tsphi->Ts2Tag();
113 
114  int channelNr = channel(wheelID, tsphi->scNum(), tsphi->bxNum()-is2nd);
115  if ( channelNr == 255 ) continue;
116  int TSId = ( is2nd == 0 ) ? TS1Id[stationID] : TS2Id[stationID];
117 
118  *dataWord1 = ((channelNr&0xFF)<<24)
119  + 0x00FFFFFF;
120 
121  if ( stationID != 2 ){
122  *dataWord2 = ( (TSId&0x0FF)<<24)
123  + (~(tsphi->code()+1)&0x007)
124  + ( (~tsphi->phiB()&0x3FF)<<3)
125  + ( (~tsphi->phi()&0xFFF)<<13);
126  }
127  else {
128  *dataWord2 = ( (TSId&0xFFFFF)<<12)
129  + (~(tsphi->code()+1)&0x00007)
130  + ( (~tsphi->phi()&0x00FFF)<<3);
131  }
132 
133  calcCRC(*dataWord1, *dataWord2, newCRC);
134  LineFED+=4;
135  *((int*)LineFED)=*dataWord2;
136  LineFED+=4;
137  *((int*)LineFED)=*dataWord1;
138  }
139  }
140  //Input
141 
142  //Input
144 
145  for ( tsthe = thtrig->getContainer()->begin();
146  tsthe != thtrig->getContainer()->end();
147  tsthe++ ) {
148 
149  int wheelTh = tsthe->whNum();
150  int sectorID = tsthe->scNum();
151 
152  int channelNr = channel(0, sectorID, tsthe->bxNum());
153  if ( channelNr == 255 ) continue;
154  int TSId = wheelTh+2;
155 
156  *dataWord1 = ((channelNr&0xFF)<<24)
157  + 0x00FFFFFF;
158 
159  *dataWord2 = ((TSId&0x07)<<28)
160  + 0x0FFFFFFF;
161 
162  int stationID = tsthe->stNum()-1;
163  for ( int bti = 0; bti < 7; bti++ )
164  if ( wheelTh == -2 || wheelTh == -1 ||
165  ( wheelTh == 0 && (sectorID == 0 || sectorID == 3 || sectorID == 4 || sectorID == 7 || sectorID == 8 || sectorID == 11) ) )
166  *dataWord2 -= (tsthe->position(bti)&0x1)<<(stationID*7+bti);
167  else
168  *dataWord2 -= (tsthe->position(6-bti)&0x1)<<(stationID*7+bti);
169 
170  calcCRC(*dataWord1, *dataWord2, newCRC);
171  LineFED+=4;
172  *((int*)LineFED)=*dataWord2;
173  LineFED+=4;
174  *((int*)LineFED)=*dataWord1;
175  }
176  //Input
177 
178  //Output
180 
181  for ( tstrk = trtrig->getContainer()->begin();
182  tstrk != trtrig->getContainer()->end();
183  tstrk++ ) {
184 
185  int channelNr = channel(tstrk->whNum(), tstrk->scNum(), tstrk->bx());
186  if ( channelNr == 255 ) continue;
187  int TSId = ( tstrk->TrkTag() == 0 ) ? 0xAFFF : 0xBFFF;
188 
189  *dataWord1 = ((channelNr&0xFF)<<24)
190  + 0x00FFFFFF;
191 
192  *dataWord2 = ( (TSId&0xFFFF)<<16)
193  + ( tstrk->stNum(4)&0x0000F)
194  + ((tstrk->stNum(3)&0x0000F)<<4)
195  + ((tstrk->stNum(2)&0x0000F)<<8)
196  + ((tstrk->stNum(1)&0x00003)<<12);
197 
198  calcCRC(*dataWord1, *dataWord2, newCRC);
199  LineFED+=4;
200  *((int*)LineFED)=*dataWord2;
201  LineFED+=4;
202  *((int*)LineFED)=*dataWord1;
203 
204  TSId = ( tstrk->TrkTag() == 0 ) ? 0xCFFE : 0xDFFE;
205 
206  *dataWord1 = ((channelNr&0xFF)<<24)
207  + 0x00FFFFFF;
208 
209  *dataWord2 = ( (TSId&0xFFFE)<<16)
210  + ( ~tstrk->quality_packed()&0x0007)
211  + ( (tstrk->phi_packed()&0x00FF)<<3)
212  + ( (~tstrk->charge_packed()&0x0001)<<11)
213  + ( (~tstrk->pt_packed()&0x001F)<<12);
214 
215  calcCRC(*dataWord1, *dataWord2, newCRC);
216  LineFED+=4;
217  *((int*)LineFED)=*dataWord2;
218  LineFED+=4;
219  *((int*)LineFED)=*dataWord1;
220 
221  channelNr = channel(0, tstrk->scNum(), tstrk->bx());
222  if ( channelNr == 255 ) continue;
223  TSId = (tstrk->whNum()+3)<<16;
224  TSId += ( tstrk->whNum() < 0 ) ? 0x8FFFC : 0x7FFFC;
225 
226  *dataWord1 = ((channelNr&0xFF)<<24)
227  + 0x00FFFFFF;
228 
229  *dataWord2 = (TSId&0xFFFFC)<<12;
230 
231  if ( tstrk->TrkTag() == 0 ) {
232  *dataWord2 += 0x3F80
233  + ( tstrk->eta_packed()&0x003F)
234  + ((~tstrk->finehalo_packed()&0x0001)<<6);
235  }
236  else {
237  *dataWord2 += 0x007F
238  + ( ( tstrk->eta_packed()&0x003F)<<7)
239  + ((~tstrk->finehalo_packed()&0x0001)<<13);
240  }
241 
242  calcCRC(*dataWord1, *dataWord2, newCRC);
243  LineFED+=4;
244  *((int*)LineFED)=*dataWord2;
245  LineFED+=4;
246  *((int*)LineFED)=*dataWord1;
247  }
248  //Output
249 
250  //--> Trailer
251 
252  *dataWord1 = 0xA0000000
253  + (lines&0xFFFFFF);
254  *dataWord2 = 0;
255 
256  calcCRC(*dataWord1, *dataWord2&0xFFFF, newCRC);
257 
258  *dataWord2 += (newCRC&0xFFFF)<<16;
259 
260  LineFED+=4;
261  *((int*)LineFED)=*dataWord2;
262  LineFED+=4;
263  *((int*)LineFED)=*dataWord1;
264 
265  delete dataWord1;
266  delete dataWord2;
267  return true;
268 }
EventNumber_t event() const
Definition: EventID.h:44
edm::InputTag getDTPHTFInputTag()
Definition: DTTFFEDSim.h:60
The_Container::const_iterator The_iterator
unsigned int eventNum
Definition: DTTFFEDSim.h:43
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void resize(size_t newsize)
Definition: FEDRawData.cc:32
void calcCRC(int myD1, int myD2, int &myC)
Definition: DTTFFEDSim.cc:327
edm::InputTag getDTDigiInputTag()
Definition: DTTFFEDSim.h:59
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
Phi_Container::const_iterator Phi_iterator
int channel(int wheel, int sector, int bx)
Definition: DTTFFEDSim.cc:270
TrackContainer::const_iterator Trackiterator
edm::EventID id() const
Definition: EventBase.h:56
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
edm::InputTag DTTFFEDSim::getDTDigiInputTag ( )
inlineprivate

Definition at line 59 of file DTTFFEDSim.h.

References DTDigiInputTag.

Referenced by fillRawData().

59 { return DTDigiInputTag; }
edm::InputTag DTDigiInputTag
Definition: DTTFFEDSim.h:45
edm::InputTag DTTFFEDSim::getDTPHTFInputTag ( )
inlineprivate

Definition at line 60 of file DTTFFEDSim.h.

References DTPHTFInputTag.

Referenced by fillRawData().

60 { return DTPHTFInputTag; }
edm::InputTag DTPHTFInputTag
Definition: DTTFFEDSim.h:46
void DTTFFEDSim::produce ( edm::Event e,
const edm::EventSetup c 
)
virtual

Produce digis out of raw data.

Implements edm::EDProducer.

Definition at line 39 of file DTTFFEDSim.cc.

References data, fillRawData(), and edm::Event::put().

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

39  {
40 
42 
43  if (!fillRawData(e, data)) return;
44 
45  auto_ptr<FEDRawDataCollection> fed_product(new FEDRawDataCollection(data));
46 
47  e.put(fed_product);
48 
49 }
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
bool fillRawData(edm::Event &e, FEDRawDataCollection &data)
Generate and fill FED raw data for a full event.
Definition: DTTFFEDSim.cc:51
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int DTTFFEDSim::sector ( int  channel)
private

Definition at line 303 of file DTTFFEDSim.cc.

References channel().

Referenced by geometryXMLparser.DTAlignable::index().

303  {
304 
305  int myChannel = channel;
306 
307  if (myChannel > 127) myChannel -= 2;
308 
309  if (myChannel < 0 || myChannel > 251 ){ return -999; }
310 
311  return myChannel/21;
312 }
int channel(int wheel, int sector, int bx)
Definition: DTTFFEDSim.cc:270
int DTTFFEDSim::wheel ( int  channel)
private

Definition at line 314 of file DTTFFEDSim.cc.

References channel().

Referenced by geometryXMLparser.DTAlignable::index().

314  {
315 
316  int myChannel = channel;
317 
318  if (myChannel > 127) myChannel -= 2;
319 
320  if (myChannel < 0 || myChannel > 251 ){ return -999; }
321 
322  int myWheel = ((myChannel%21)/3)-3;
323 
324  return myWheel;
325 }
int channel(int wheel, int sector, int bx)
Definition: DTTFFEDSim.cc:270

Member Data Documentation

edm::InputTag DTTFFEDSim::DTDigiInputTag
private

Definition at line 45 of file DTTFFEDSim.h.

Referenced by DTTFFEDSim(), and getDTDigiInputTag().

edm::InputTag DTTFFEDSim::DTPHTFInputTag
private

Definition at line 46 of file DTTFFEDSim.h.

Referenced by DTTFFEDSim(), and getDTPHTFInputTag().

unsigned int DTTFFEDSim::eventNum
private

Definition at line 43 of file DTTFFEDSim.h.

Referenced by fillRawData().