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 | Public Attributes | Private Member Functions | Private Attributes
L1UpgradeTfMuonTreeProducer Class Reference

#include <L1Trigger/L1Ntuples/plugins/L1UpgradeTfMuonTreeProducer.cc>

Inheritance diagram for L1UpgradeTfMuonTreeProducer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1UpgradeTfMuonTreeProducer (const edm::ParameterSet &)
 
 ~L1UpgradeTfMuonTreeProducer ()
 
- 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
std::vector< ConsumesInfoconsumesInfo () const
 
 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Public Attributes

L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeBmtf
 
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormatl1UpgradeBmtfData
 
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeEmtf
 
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormatl1UpgradeEmtfData
 
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeOmtf
 
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormatl1UpgradeOmtfData
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob (void)
 
virtual void endJob ()
 

Private Attributes

edm::EDGetTokenT
< l1t::RegionalMuonCandBxCollection
bmtfMuonToken_
 
edm::EDGetTokenT
< l1t::RegionalMuonCandBxCollection
emtfMuonToken_
 
edm::Service< TFileServicefs_
 
unsigned maxL1UpgradeTfMuon_
 
edm::EDGetTokenT
< l1t::RegionalMuonCandBxCollection
omtfMuonToken_
 
TTree * tree_
 

Additional Inherited Members

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

Implementation:

Definition at line 44 of file L1UpgradeTfMuonTreeProducer.cc.

Constructor & Destructor Documentation

L1UpgradeTfMuonTreeProducer::L1UpgradeTfMuonTreeProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 83 of file L1UpgradeTfMuonTreeProducer.cc.

References bmtfMuonToken_, emtfMuonToken_, fs_, L1Analysis::L1AnalysisL1UpgradeTfMuon::getData(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), l1UpgradeBmtf, l1UpgradeBmtfData, l1UpgradeEmtf, l1UpgradeEmtfData, l1UpgradeOmtf, l1UpgradeOmtfData, TFileService::make(), maxL1UpgradeTfMuon_, omtfMuonToken_, and tree_.

84 {
85 
86  bmtfMuonToken_ = consumes<l1t::RegionalMuonCandBxCollection>(iConfig.getUntrackedParameter<edm::InputTag>("bmtfMuonToken"));
87  omtfMuonToken_ = consumes<l1t::RegionalMuonCandBxCollection>(iConfig.getUntrackedParameter<edm::InputTag>("omtfMuonToken"));
88  emtfMuonToken_ = consumes<l1t::RegionalMuonCandBxCollection>(iConfig.getUntrackedParameter<edm::InputTag>("emtfMuonToken"));
89 
90  maxL1UpgradeTfMuon_ = iConfig.getParameter<unsigned int>("maxL1UpgradeTfMuon");
91 
95 
96  // set up output
97  tree_=fs_->make<TTree>("L1UpgradeTfMuonTree", "L1UpgradeTfMuonTree");
98  tree_->Branch("L1UpgradeBmtfMuon", "L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &l1UpgradeBmtfData, 32000, 3);
99  tree_->Branch("L1UpgradeOmtfMuon", "L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &l1UpgradeOmtfData, 32000, 3);
100  tree_->Branch("L1UpgradeEmtfMuon", "L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &l1UpgradeEmtfData, 32000, 3);
101 
102 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeEmtf
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeEmtfData
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeOmtf
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > bmtfMuonToken_
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > omtfMuonToken_
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeBmtf
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeBmtfData
L1AnalysisL1UpgradeTfMuonDataFormat * getData()
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > emtfMuonToken_
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeOmtfData
edm::Service< TFileService > fs_
L1UpgradeTfMuonTreeProducer::~L1UpgradeTfMuonTreeProducer ( )

Definition at line 105 of file L1UpgradeTfMuonTreeProducer.cc.

106 {
107 }

Member Function Documentation

void L1UpgradeTfMuonTreeProducer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 116 of file L1UpgradeTfMuonTreeProducer.cc.

References bmtfMuonToken_, emtfMuonToken_, edm::Event::getByToken(), edm::HandleBase::isValid(), l1UpgradeBmtf, l1UpgradeEmtf, l1UpgradeOmtf, maxL1UpgradeTfMuon_, omtfMuonToken_, L1Analysis::L1AnalysisL1UpgradeTfMuon::Reset(), L1Analysis::L1AnalysisL1UpgradeTfMuon::SetTfMuon(), and tree_.

117 {
118 
122 
126 
127  iEvent.getByToken(bmtfMuonToken_, bmtfMuon);
128  iEvent.getByToken(omtfMuonToken_, omtfMuon);
129  iEvent.getByToken(emtfMuonToken_, emtfMuon);
130 
131  if (bmtfMuon.isValid()){
133  } else {
134  edm::LogWarning("MissingProduct") << "L1Upgrade BMTF muons not found. Branch will not be filled" << std::endl;
135  }
136 
137  if (omtfMuon.isValid()){
139  } else {
140  edm::LogWarning("MissingProduct") << "L1Upgrade OMTF muons not found. Branch will not be filled" << std::endl;
141  }
142 
143  if (emtfMuon.isValid()){
145  } else {
146  edm::LogWarning("MissingProduct") << "L1Upgrade EMTF muons not found. Branch will not be filled" << std::endl;
147  }
148 
149  tree_->Fill();
150 
151 }
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeEmtf
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeOmtf
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > bmtfMuonToken_
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > omtfMuonToken_
bool isValid() const
Definition: HandleBase.h:75
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeBmtf
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > emtfMuonToken_
void SetTfMuon(const l1t::RegionalMuonCandBxCollection &muon, unsigned maxL1UpgradeTfMuon)
void L1UpgradeTfMuonTreeProducer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 155 of file L1UpgradeTfMuonTreeProducer.cc.

156 {
157 }
void L1UpgradeTfMuonTreeProducer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 161 of file L1UpgradeTfMuonTreeProducer.cc.

161  {
162 }

Member Data Documentation

edm::EDGetTokenT<l1t::RegionalMuonCandBxCollection> L1UpgradeTfMuonTreeProducer::bmtfMuonToken_
private

Definition at line 75 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

edm::EDGetTokenT<l1t::RegionalMuonCandBxCollection> L1UpgradeTfMuonTreeProducer::emtfMuonToken_
private

Definition at line 77 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

edm::Service<TFileService> L1UpgradeTfMuonTreeProducer::fs_
private

Definition at line 69 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuon L1UpgradeTfMuonTreeProducer::l1UpgradeBmtf

Definition at line 57 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfData

Definition at line 60 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuon L1UpgradeTfMuonTreeProducer::l1UpgradeEmtf

Definition at line 59 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeEmtfData

Definition at line 62 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuon L1UpgradeTfMuonTreeProducer::l1UpgradeOmtf

Definition at line 58 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeOmtfData

Definition at line 61 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

unsigned L1UpgradeTfMuonTreeProducer::maxL1UpgradeTfMuon_
private

Definition at line 66 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

edm::EDGetTokenT<l1t::RegionalMuonCandBxCollection> L1UpgradeTfMuonTreeProducer::omtfMuonToken_
private

Definition at line 76 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

TTree* L1UpgradeTfMuonTreeProducer::tree_
private

Definition at line 72 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().