CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
L1EventTreeProducer Class Reference

#include <L1TriggerDPG/L1Ntuples/src/L1EventTreeProducer.cc>

Inheritance diagram for L1EventTreeProducer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1EventTreeProducer (const edm::ParameterSet &)
 
 ~L1EventTreeProducer () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > 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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Public Attributes

L1Analysis::L1AnalysisEventl1Event
 
L1Analysis::L1AnalysisEventDataFormatl1EventData
 

Private Member Functions

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

Private Attributes

edm::Service< TFileServicefs_
 
edm::EDGetTokenT< edm::TriggerResultshltSource_
 
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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: Produce L1 Extra tree

Implementation:

Definition at line 49 of file L1EventTreeProducer.cc.

Constructor & Destructor Documentation

◆ L1EventTreeProducer()

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

Definition at line 76 of file L1EventTreeProducer.cc.

76  {
77  hltSource_ = consumes<edm::TriggerResults>(iConfig.getParameter<edm::InputTag>("hltSource"));
78 
79  std::string puMCFile = iConfig.getUntrackedParameter<std::string>("puMCFile", "");
80  std::string puMCHist = iConfig.getUntrackedParameter<std::string>("puMCHist", "pileup");
81  std::string puDataFile = iConfig.getUntrackedParameter<std::string>("puDataFile", "");
82  std::string puDataHist = iConfig.getUntrackedParameter<std::string>("puDataHist", "pileup");
83 
84  bool useAvgVtx = iConfig.getUntrackedParameter<bool>("useAvgVtx", true);
85  double maxAllowedWeight = iConfig.getUntrackedParameter<double>("maxAllowedWeight", -1);
86 
90 
91  // set up output
92  tree_ = fs_->make<TTree>("L1EventTree", "L1EventTree");
93  tree_->Branch("Event", "L1Analysis::L1AnalysisEventDataFormat", &l1EventData, 32000, 3);
94 }

References edm::EDConsumerBase::consumesCollector(), fs_, L1Analysis::L1AnalysisEvent::getData(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hltSource_, l1Event, l1EventData, TFileService::make(), l1EventTree_cfi::maxAllowedWeight, l1EventTree_cfi::puDataFile, l1EventTree_cfi::puDataHist, l1EventTree_cfi::puMCFile, l1EventTree_cfi::puMCHist, AlCaHLTBitMon_QueryRunRegistry::string, tree_, and l1EventTree_cfi::useAvgVtx.

◆ ~L1EventTreeProducer()

L1EventTreeProducer::~L1EventTreeProducer ( )
override

Definition at line 96 of file L1EventTreeProducer.cc.

96  {
97  // do anything here that needs to be done at desctruction time
98  // (e.g. close files, deallocate resources etc.)
99  delete l1Event;
100 }

References l1Event.

Member Function Documentation

◆ analyze()

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

◆ beginJob()

void L1EventTreeProducer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 116 of file L1EventTreeProducer.cc.

116 {}

◆ endJob()

void L1EventTreeProducer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 119 of file L1EventTreeProducer.cc.

119 {}

Member Data Documentation

◆ fs_

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

Definition at line 65 of file L1EventTreeProducer.cc.

Referenced by L1EventTreeProducer().

◆ hltSource_

edm::EDGetTokenT<edm::TriggerResults> L1EventTreeProducer::hltSource_
private

Definition at line 70 of file L1EventTreeProducer.cc.

Referenced by analyze(), and L1EventTreeProducer().

◆ l1Event

L1Analysis::L1AnalysisEvent* L1EventTreeProducer::l1Event

Definition at line 60 of file L1EventTreeProducer.cc.

Referenced by analyze(), L1EventTreeProducer(), and ~L1EventTreeProducer().

◆ l1EventData

L1Analysis::L1AnalysisEventDataFormat* L1EventTreeProducer::l1EventData

Definition at line 61 of file L1EventTreeProducer.cc.

Referenced by L1EventTreeProducer().

◆ tree_

TTree* L1EventTreeProducer::tree_
private

Definition at line 68 of file L1EventTreeProducer.cc.

Referenced by analyze(), and L1EventTreeProducer().

L1Analysis::L1AnalysisEvent::Reset
void Reset()
Definition: L1AnalysisEvent.h:40
L1Analysis::L1AnalysisEvent::getData
L1AnalysisEventDataFormat * getData()
Definition: L1AnalysisEvent.h:41
edm::EDGetTokenT::isUninitialized
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:99
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:47
l1EventTree_cfi.puDataHist
puDataHist
Definition: l1EventTree_cfi.py:8
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
L1EventTreeProducer::l1Event
L1Analysis::L1AnalysisEvent * l1Event
Definition: L1EventTreeProducer.cc:60
l1EventTree_cfi.useAvgVtx
useAvgVtx
Definition: l1EventTree_cfi.py:9
L1Analysis::L1AnalysisEvent
Definition: L1AnalysisEvent.h:27
l1EventTree_cfi.puMCFile
puMCFile
Definition: l1EventTree_cfi.py:5
l1EventTree_cfi.maxAllowedWeight
maxAllowedWeight
Definition: l1EventTree_cfi.py:10
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
iEvent
int iEvent
Definition: GenABIO.cc:224
L1EventTreeProducer::tree_
TTree * tree_
Definition: L1EventTreeProducer.cc:68
L1Analysis::L1AnalysisEvent::Set
void Set(const edm::Event &e, const edm::EDGetTokenT< edm::TriggerResults > &hlt_)
Definition: L1AnalysisEvent.cc:31
l1EventTree_cfi.puDataFile
puDataFile
Definition: l1EventTree_cfi.py:6
L1EventTreeProducer::hltSource_
edm::EDGetTokenT< edm::TriggerResults > hltSource_
Definition: L1EventTreeProducer.cc:70
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1EventTreeProducer::l1EventData
L1Analysis::L1AnalysisEventDataFormat * l1EventData
Definition: L1EventTreeProducer.cc:61
L1EventTreeProducer::fs_
edm::Service< TFileService > fs_
Definition: L1EventTreeProducer.cc:65
l1EventTree_cfi.puMCHist
puMCHist
Definition: l1EventTree_cfi.py:7
edm::InputTag
Definition: InputTag.h:15
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64