Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:25

0001 #include "EventFilter/CSCRawToDigi/interface/CSCALCTHeader2007.h"
0002 #include "EventFilter/CSCRawToDigi/interface/CSCDMBHeader.h"
0003 
0004 CSCALCT::CSCALCT() {
0005   bzero(this, 2);  ///size of ALCT = 2bytes
0006 }
0007 
0008 CSCALCT::CSCALCT(const CSCALCTDigi& alctDigi)
0009     : valid(alctDigi.isValid()),
0010       quality(alctDigi.getQuality()),
0011       accel(alctDigi.getAccelerator()),
0012       pattern(alctDigi.getCollisionB()),
0013       keyWire(alctDigi.getKeyWG()),
0014       reserved(0) {}
0015 
0016 #include <iostream>
0017 CSCALCTHeader2007::CSCALCTHeader2007() {
0018   bzero(this, sizeInWords() * 2);  ///size of 2007 header w/o variable parts = 16 bytes
0019   flag1 = 0xDB0A;
0020   reserved1 = reserved2 = reserved3 = 0xD;
0021   rawBins = 16;
0022   lctBins = 8;
0023 }
0024 
0025 CSCALCTHeader2007::CSCALCTHeader2007(int chamberType) {
0026   bzero(this, sizeInWords() * 2);  ///size of 2007 header w/o variable parts = 16 bytes
0027   // things that depend on chamber type
0028   int boardTypes[11] = {0, 2, 2, 3, 1, 6, 3, 5, 3, 5, 3};
0029   flag1 = 0xDB0A;
0030   reserved1 = reserved2 = reserved3 = 0xD;
0031   boardType = boardTypes[chamberType];
0032   //FIXME how do BXes work?  Dump other raw data
0033   // shows rawBins=16lctBins=8 or rawbins=0, lctBins=1
0034   rawBins = 16;
0035   lctBins = 8;
0036 }
0037 
0038 void CSCALCTHeader2007::setEventInformation(const CSCDMBHeader& dmb) {
0039   l1aCounter = dmb.l1a24() & 0xFFF;
0040   bxnCount = dmb.bxn12();
0041 }