CMS 3D CMS Logo

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

#include <CSCDigiToPattern.h>

Inheritance diagram for CSCDigiToPattern:
edm::EDAnalyzer

Public Member Functions

virtual void analyze (edm::Event const &e, edm::EventSetup const &iSetup)
 
 CSCDigiToPattern (edm::ParameterSet const &conf)
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 17 of file CSCDigiToPattern.h.

Constructor & Destructor Documentation

CSCDigiToPattern::CSCDigiToPattern ( edm::ParameterSet const &  conf)
explicit

Definition at line 6 of file CSCDigiToPattern.cc.

6  {
7 
8  // If your module takes parameters, here is where you would define
9  // their names and types, and access them to initialize internal
10  // variables. Example as follows:
11  //
12 }

Member Function Documentation

void CSCDigiToPattern::analyze ( edm::Event const &  e,
edm::EventSetup const &  iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 14 of file CSCDigiToPattern.cc.

References gather_cfg::cout, edm::Event::getByLabel(), j, prof2calltree::last, listBenchmarks::pattern, strip(), and TrackValidation_HighPurity_cff::valid.

14  {
15 
16  // These declarations create handles to the types of records that you want
17  // to retrieve from event "e".
18  //
20  e.getByLabel("muonCSCDigis","MuonCSCCorrelatedLCTDigi",correlatedlcts);
21  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j=correlatedlcts->begin(); j!=correlatedlcts->end(); j++) {
22  CSCDetId id=(*j).first;
23  std::cout<<id<<std::endl;
24  std::vector<CSCCorrelatedLCTDigi>::const_iterator digiIt = (*j).second.first;
25  std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second;
26  for( ; digiIt != last; ++digiIt) {
27  uint16_t wire = digiIt->getKeyWG(); // 7 bits
28  uint16_t pattern = digiIt->getPattern(); // 4 bits
29  uint16_t quality = digiIt->getQuality(); // 4 bits
30  uint16_t valid = digiIt->isValid(); // 1 bit
31  uint16_t strip = digiIt->getStrip(); // 8 bits
32  uint16_t bend = digiIt->getBend(); // 1 bit
33  uint16_t syncErr = digiIt->getSyncErr(); // 1 bit
34  uint16_t bx = digiIt->getBX(); // 1 bit
35  uint16_t bx0 = digiIt->getBX0(); // 1 bit
36  uint16_t cscId = digiIt->getCSCID(); // 4 bits
37  // __
38  // 32 bits in total
39  long unsigned int mpc =
40  ((cscId&0xF)<<28) | ((bx0&0x1)<<27) | ((bx&0x1)<<26) |
41  ((syncErr&0x1)<<25) | ((bend&0x1)<<24) | ((strip&0xFF)<<16) |
42  ((valid&0x1)<<15) | ((quality&0xF)<<11) | ((pattern&0xF)<<7) |
43  (wire&0x7F);
44  std::cout <<"MPC"<<digiIt->getTrknmb()<< " " << std::hex << mpc <<std::dec <<std::endl;
45  }
46  }
47 }
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
int j
Definition: DBlmapReader.cc:9
tuple cout
Definition: gather_cfg.py:121