test
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
CSCTFTrackProducer Class Reference

#include <CSCTFTrackProducer.h>

Inheritance diagram for CSCTFTrackProducer:
edm::one::EDProducer< edm::one::SharedResources > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void beginJob ()
 
 CSCTFTrackProducer (const edm::ParameterSet &)
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
virtual ~CSCTFTrackProducer ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::one::SharedResources >
 EDProducer ()=default
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- 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
 
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::InputTag directProd
 
edm::InputTag dt_producer
 
edm::InputTag input_module
 
unsigned long long m_ptScaleCacheID
 
unsigned long long m_scalesCacheID
 
CSCTFTrackBuildermy_builder
 
CSCTFDTReceivermy_dtrc
 
bool readDtDirect
 
edm::ParameterSet sp_pset
 
bool TMB07
 
bool useDT
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
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

Definition at line 14 of file CSCTFTrackProducer.h.

Constructor & Destructor Documentation

CSCTFTrackProducer::CSCTFTrackProducer ( const edm::ParameterSet pset)

Definition at line 25 of file CSCTFTrackProducer.cc.

References directProd, dt_producer, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), input_module, m_ptScaleCacheID, m_scalesCacheID, my_builder, my_dtrc, readDtDirect, sp_pset, TMB07, and useDT.

26 {
27  input_module = pset.getUntrackedParameter<edm::InputTag>("SectorReceiverInput");
28  dt_producer = pset.getUntrackedParameter<edm::InputTag>("DTproducer");
29  directProd = pset.getUntrackedParameter<edm::InputTag>("DtDirectProd");
30  sp_pset = pset.getParameter<edm::ParameterSet>("SectorProcessor");
31  useDT = pset.getParameter<bool>("useDT");
32  readDtDirect = pset.getParameter<bool>("readDtDirect");
33  TMB07 = pset.getParameter<bool>("isTMB07");
34  my_dtrc = new CSCTFDTReceiver();
35  m_scalesCacheID = 0ULL ;
36  m_ptScaleCacheID = 0ULL ;
37  my_builder = 0 ;
38  produces<L1CSCTrackCollection>();
39  produces<CSCTriggerContainer<csctf::TrackStub> >();
40  usesResource("CSCTFTrackProducer");
41  consumes<CSCCorrelatedLCTDigiCollection>(input_module);
42  consumes<L1MuDTChambPhContainer>(dt_producer);
43  consumes<CSCTriggerContainer<csctf::TrackStub> >(directProd);
44 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
CSCTFDTReceiver * my_dtrc
unsigned long long m_scalesCacheID
CSCTFTrackBuilder * my_builder
unsigned long long m_ptScaleCacheID
edm::InputTag input_module
edm::InputTag directProd
edm::InputTag dt_producer
edm::ParameterSet sp_pset
CSCTFTrackProducer::~CSCTFTrackProducer ( )
virtual

Definition at line 46 of file CSCTFTrackProducer.cc.

References my_builder, my_dtrc, and NULL.

47 {
48  delete my_dtrc;
49  my_dtrc = NULL;
50 
51  delete my_builder;
52  my_builder = 0;
53 }
CSCTFDTReceiver * my_dtrc
#define NULL
Definition: scimark2.h:8
CSCTFTrackBuilder * my_builder

Member Function Documentation

void CSCTFTrackProducer::beginJob ( void  )
virtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 55 of file CSCTFTrackProducer.cc.

55  {
56  // my_builder->initialize(es);
57 }
void CSCTFTrackProducer::produce ( edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::one::EDProducerBase.

Definition at line 59 of file CSCTFTrackProducer.cc.

References CSCTFTrackBuilder::buildTracks(), edm::eventsetup::EventSetupRecord::cacheIdentifier(), directProd, dt_producer, edm::EventSetup::get(), edm::Event::getByLabel(), CSCTFTrackBuilder::initialize(), input_module, edm::InputTag::instance(), edm::InputTag::label(), m_ptScaleCacheID, m_scalesCacheID, my_builder, my_dtrc, CSCTFDTReceiver::process(), edm::Handle< T >::product(), edm::ESHandle< class >::product(), CSCTriggerContainer< T >::push_many(), edm::Event::put(), readDtDirect, CSCTriggerGeometry::setGeometry(), sp_pset, TMB07, and useDT.

60 {
61  // Update CSCTFTrackBuilder only if the scales have changed. Use the
62  // EventSetup cacheIdentifier to tell when this has happened.
64  c.get< L1MuTriggerPtScaleRcd >().cacheIdentifier() != m_ptScaleCacheID )
65  {
66  if(my_builder) delete my_builder ;
67 
69  c.get< L1MuTriggerScalesRcd >().get( scales ) ;
70 
72  c.get< L1MuTriggerPtScaleRcd >().get( ptScale ) ;
73 
75  scales.product(),ptScale.product());
77 
78  m_scalesCacheID = c.get< L1MuTriggerScalesRcd >().cacheIdentifier() ;
79  m_ptScaleCacheID = c.get< L1MuTriggerPtScaleRcd >().cacheIdentifier() ;
80  }
81 
82  // set geometry pointer
84 
85  c.get<MuonGeometryRecord>().get( pDD );
87 
89  std::auto_ptr<L1CSCTrackCollection> track_product(new L1CSCTrackCollection);
91  std::auto_ptr<CSCTriggerContainer<csctf::TrackStub> > dt_stubs(new CSCTriggerContainer<csctf::TrackStub>);
92 
93  // Either emulate or directly read in DT stubs based on switch
96  if(readDtDirect == false)
97  {
100  emulStub = my_dtrc->process(dttrig.product());
101  } else {
103  //e.getByLabel("csctfunpacker","DT",stubsFromDaq);
104  e.getByLabel(directProd.label(),directProd.instance(), stubsFromDaq);
105  const CSCTriggerContainer<csctf::TrackStub>* stubPointer = stubsFromDaq.product();
106  emulStub.push_many(*stubPointer);
107  }
108 
109  my_builder->buildTracks(LCTs.product(), (useDT?&emulStub:0), track_product.get(), dt_stubs.get());
110 
111  e.put(track_product);
112  e.put(dt_stubs);
113 }
unsigned long long cacheIdentifier() const
CSCTFDTReceiver * my_dtrc
void initialize(const edm::EventSetup &c)
unsigned long long m_scalesCacheID
std::vector< L1CSCTrack > L1CSCTrackCollection
CSCTriggerContainer< csctf::TrackStub > process(const L1MuDTChambPhContainer *)
static void setGeometry(const edm::ESHandle< CSCGeometry > &thegeom)
CSCTFTrackBuilder * my_builder
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
unsigned long long m_ptScaleCacheID
edm::InputTag input_module
void push_many(const std::vector< T > &data)
edm::InputTag directProd
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
void buildTracks(const CSCCorrelatedLCTDigiCollection *, const CSCTriggerContainer< csctf::TrackStub > *, L1CSCTrackCollection *, CSCTriggerContainer< csctf::TrackStub > *)
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
T const * product() const
Definition: Handle.h:81
std::string const & label() const
Definition: InputTag.h:42
edm::InputTag dt_producer
edm::ParameterSet sp_pset
std::string const & instance() const
Definition: InputTag.h:43

Member Data Documentation

edm::InputTag CSCTFTrackProducer::directProd
private

Definition at line 25 of file CSCTFTrackProducer.h.

Referenced by CSCTFTrackProducer(), and produce().

edm::InputTag CSCTFTrackProducer::dt_producer
private

Definition at line 25 of file CSCTFTrackProducer.h.

Referenced by CSCTFTrackProducer(), and produce().

edm::InputTag CSCTFTrackProducer::input_module
private

Definition at line 25 of file CSCTFTrackProducer.h.

Referenced by CSCTFTrackProducer(), and produce().

unsigned long long CSCTFTrackProducer::m_ptScaleCacheID
private

Definition at line 28 of file CSCTFTrackProducer.h.

Referenced by CSCTFTrackProducer(), and produce().

unsigned long long CSCTFTrackProducer::m_scalesCacheID
private

Definition at line 27 of file CSCTFTrackProducer.h.

Referenced by CSCTFTrackProducer(), and produce().

CSCTFTrackBuilder* CSCTFTrackProducer::my_builder
private

Definition at line 29 of file CSCTFTrackProducer.h.

Referenced by CSCTFTrackProducer(), produce(), and ~CSCTFTrackProducer().

CSCTFDTReceiver* CSCTFTrackProducer::my_dtrc
private

Definition at line 23 of file CSCTFTrackProducer.h.

Referenced by CSCTFTrackProducer(), produce(), and ~CSCTFTrackProducer().

bool CSCTFTrackProducer::readDtDirect
private

Definition at line 24 of file CSCTFTrackProducer.h.

Referenced by CSCTFTrackProducer(), and produce().

edm::ParameterSet CSCTFTrackProducer::sp_pset
private

Definition at line 26 of file CSCTFTrackProducer.h.

Referenced by CSCTFTrackProducer(), and produce().

bool CSCTFTrackProducer::TMB07
private

Definition at line 24 of file CSCTFTrackProducer.h.

Referenced by CSCTFTrackProducer(), and produce().

bool CSCTFTrackProducer::useDT
private

Definition at line 24 of file CSCTFTrackProducer.h.

Referenced by CSCTFTrackProducer(), and produce().