CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
L1UpgradeTfMuonShowerTreeProducer Class Reference
Inheritance diagram for L1UpgradeTfMuonShowerTreeProducer:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 L1UpgradeTfMuonShowerTreeProducer (const edm::ParameterSet &)
 
 ~L1UpgradeTfMuonShowerTreeProducer () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Public Attributes

L1Analysis::L1AnalysisL1UpgradeTfMuonShower l1UpgradeEmtf
 
L1Analysis::L1AnalysisL1UpgradeTfMuonShowerDataFormatl1UpgradeEmtfData
 

Private Member Functions

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

Private Attributes

edm::EDGetTokenT< l1t::RegionalMuonShowerBxCollectionemtfMuonShowerToken_
 
edm::Service< TFileServicefs_
 
unsigned maxL1UpgradeTfMuonShower_
 
TTree * tree_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 26 of file L1UpgradeTfMuonShowerTreeProducer.cc.

Constructor & Destructor Documentation

◆ L1UpgradeTfMuonShowerTreeProducer()

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

Definition at line 53 of file L1UpgradeTfMuonShowerTreeProducer.cc.

References emtfMuonShowerToken_, fs_, L1Analysis::L1AnalysisL1UpgradeTfMuonShower::getData(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), TFileService::kSharedResource, l1UpgradeEmtf, l1UpgradeEmtfData, TFileService::make(), maxL1UpgradeTfMuonShower_, and tree_.

53  {
54  emtfMuonShowerToken_ = consumes<l1t::RegionalMuonShowerBxCollection>(
55  iConfig.getUntrackedParameter<edm::InputTag>("emtfMuonShowerToken"));
56 
57  maxL1UpgradeTfMuonShower_ = iConfig.getParameter<unsigned int>("maxL1UpgradeTfMuonShower");
58 
60 
61  usesResource(TFileService::kSharedResource);
62 
63  // set up output
64  tree_ = fs_->make<TTree>("L1UpgradeTfMuonShowerTree", "L1UpgradeTfMuonShowerTree");
65  tree_->Branch(
66  "L1UpgradeEmtfMuonShower", "L1Analysis::L1AnalysisL1UpgradeTfMuonShowerDataFormat", &l1UpgradeEmtfData, 32000, 3);
67 }
static const std::string kSharedResource
Definition: TFileService.h:76
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1AnalysisL1UpgradeTfMuonShowerDataFormat * getData()
edm::EDGetTokenT< l1t::RegionalMuonShowerBxCollection > emtfMuonShowerToken_
T getUntrackedParameter(std::string const &, T const &) const
L1Analysis::L1AnalysisL1UpgradeTfMuonShowerDataFormat * l1UpgradeEmtfData
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
L1Analysis::L1AnalysisL1UpgradeTfMuonShower l1UpgradeEmtf

◆ ~L1UpgradeTfMuonShowerTreeProducer()

L1UpgradeTfMuonShowerTreeProducer::~L1UpgradeTfMuonShowerTreeProducer ( )
overridedefault

Member Function Documentation

◆ analyze()

void L1UpgradeTfMuonShowerTreeProducer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 74 of file L1UpgradeTfMuonShowerTreeProducer.cc.

References emtfMuonShowerToken_, iEvent, edm::HandleBase::isValid(), l1UpgradeEmtf, maxL1UpgradeTfMuonShower_, L1Analysis::L1AnalysisL1UpgradeTfMuonShower::Reset(), L1Analysis::L1AnalysisL1UpgradeTfMuonShower::SetTfMuonShower(), and tree_.

74  {
76 
78 
79  iEvent.getByToken(emtfMuonShowerToken_, emtfMuonShower);
80 
81  if (emtfMuonShower.isValid()) {
83  } else {
84  edm::LogWarning("MissingProduct") << "L1Upgrade EMTF muons not found. Branch will not be filled" << std::endl;
85  }
86 
87  tree_->Fill();
88 }
edm::EDGetTokenT< l1t::RegionalMuonShowerBxCollection > emtfMuonShowerToken_
int iEvent
Definition: GenABIO.cc:224
void SetTfMuonShower(const l1t::RegionalMuonShowerBxCollection &muon, unsigned maxL1UpgradeTfMuonShower)
bool isValid() const
Definition: HandleBase.h:70
Log< level::Warning, false > LogWarning
L1Analysis::L1AnalysisL1UpgradeTfMuonShower l1UpgradeEmtf

◆ beginJob()

void L1UpgradeTfMuonShowerTreeProducer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 91 of file L1UpgradeTfMuonShowerTreeProducer.cc.

91 {}

◆ endJob()

void L1UpgradeTfMuonShowerTreeProducer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 94 of file L1UpgradeTfMuonShowerTreeProducer.cc.

94 {}

Member Data Documentation

◆ emtfMuonShowerToken_

edm::EDGetTokenT<l1t::RegionalMuonShowerBxCollection> L1UpgradeTfMuonShowerTreeProducer::emtfMuonShowerToken_
private

◆ fs_

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

◆ l1UpgradeEmtf

L1Analysis::L1AnalysisL1UpgradeTfMuonShower L1UpgradeTfMuonShowerTreeProducer::l1UpgradeEmtf

◆ l1UpgradeEmtfData

L1Analysis::L1AnalysisL1UpgradeTfMuonShowerDataFormat* L1UpgradeTfMuonShowerTreeProducer::l1UpgradeEmtfData

◆ maxL1UpgradeTfMuonShower_

unsigned L1UpgradeTfMuonShowerTreeProducer::maxL1UpgradeTfMuonShower_
private

◆ tree_

TTree* L1UpgradeTfMuonShowerTreeProducer::tree_
private