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 Attributes
CSCDigiToPattern Class Reference

#include <CSCDigiToPattern.h>

Inheritance diagram for CSCDigiToPattern:
edm::EDAnalyzer edm::EDConsumerBase

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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- 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
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

edm::EDGetTokenT
< CSCCorrelatedLCTDigiCollection
d_token
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- 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::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

Definition at line 16 of file CSCDigiToPattern.h.

Constructor & Destructor Documentation

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

Definition at line 6 of file CSCDigiToPattern.cc.

References d_token, and edm::ParameterSet::getParameter().

6  {
7 
8  d_token = consumes<CSCCorrelatedLCTDigiCollection>( conf.getParameter<edm::InputTag>("corrlctDigiTag") );
9 
10 }
tuple conf
Definition: dbtoconf.py:185
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > d_token

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 12 of file CSCDigiToPattern.cc.

References gather_cfg::cout, d_token, TauDecayModes::dec, edm::Event::getByToken(), j, prof2calltree::last, chain::pattern, and TrackValidation_HighPurity_cff::valid.

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

Member Data Documentation

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> CSCDigiToPattern::d_token
private

Definition at line 24 of file CSCDigiToPattern.h.

Referenced by analyze(), and CSCDigiToPattern().