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
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 ()
 
- 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::L1AnalysisEventl1Event
 
L1Analysis::L1AnalysisEventDataFormatl1EventData
 

Private Member Functions

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

Private Attributes

edm::Service< TFileServicefs_
 
edm::EDGetTokenT
< edm::TriggerResults
hltSource_
 
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

Description: Produce L1 Extra tree

Implementation:

Definition at line 50 of file L1EventTreeProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 83 of file L1EventTreeProducer.cc.

References gather_cfg::cout, fs_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hltSource_, l1Event, l1EventData, TFileService::make(), AlCaHLTBitMon_QueryRunRegistry::string, and tree_.

84 {
85  std::cout << "CCLA Begin constructor" << std::endl;
86  hltSource_ = consumes<edm::TriggerResults>(iConfig.getParameter<edm::InputTag>("hltSource"));
87 
88  std::string puMCFile = iConfig.getUntrackedParameter<std::string>("puMCFile", "");
89  std::string puMCHist = iConfig.getUntrackedParameter<std::string>("puMCHist", "pileup");
90  std::string puDataFile = iConfig.getUntrackedParameter<std::string>("puDataFile", "");
91  std::string puDataHist = iConfig.getUntrackedParameter<std::string>("puDataHist", "pileup");
92 
93  bool useAvgVtx = iConfig.getUntrackedParameter<bool>("useAvgVtx", true);
94  double maxAllowedWeight = iConfig.getUntrackedParameter<double>("maxAllowedWeight", -1);
95 
96  l1Event = new L1Analysis::L1AnalysisEvent(puMCFile, puMCHist,
97  puDataFile, puDataHist,
98  useAvgVtx, maxAllowedWeight);
100 
101  // set up output
102  tree_=fs_->make<TTree>("L1EventTree", "L1EventTree");
103  tree_->Branch("Event", "L1Analysis::L1AnalysisEventDataFormat", &l1EventData, 32000, 3);
104 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::TriggerResults > hltSource_
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
L1AnalysisEventDataFormat * getData()
edm::Service< TFileService > fs_
L1Analysis::L1AnalysisEvent * l1Event
L1Analysis::L1AnalysisEventDataFormat * l1EventData
tuple cout
Definition: gather_cfg.py:145
L1EventTreeProducer::~L1EventTreeProducer ( )

Definition at line 107 of file L1EventTreeProducer.cc.

References l1Event.

108 {
109 
110  // do anything here that needs to be done at desctruction time
111  // (e.g. close files, deallocate resources etc.)
112  delete l1Event;
113 
114 }
L1Analysis::L1AnalysisEvent * l1Event

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 123 of file L1EventTreeProducer.cc.

References hltSource_, edm::EDGetTokenT< T >::isUninitialized(), l1Event, L1Analysis::L1AnalysisEvent::Reset(), L1Analysis::L1AnalysisEvent::Set(), and tree_.

124 {
125  if(!hltSource_.isUninitialized()) {
126  l1Event->Reset();
127  l1Event->Set(iEvent,hltSource_);
128  }
129  tree_->Fill();
130 }
edm::EDGetTokenT< edm::TriggerResults > hltSource_
L1Analysis::L1AnalysisEvent * l1Event
void Set(const edm::Event &e, const edm::EDGetTokenT< edm::TriggerResults > &hlt_)
bool isUninitialized() const
Definition: EDGetToken.h:73
void L1EventTreeProducer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 134 of file L1EventTreeProducer.cc.

135 {
136 }
void L1EventTreeProducer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 140 of file L1EventTreeProducer.cc.

140  {
141 }

Member Data Documentation

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

Definition at line 69 of file L1EventTreeProducer.cc.

Referenced by L1EventTreeProducer().

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

Definition at line 74 of file L1EventTreeProducer.cc.

Referenced by analyze(), and L1EventTreeProducer().

L1Analysis::L1AnalysisEvent* L1EventTreeProducer::l1Event

Definition at line 63 of file L1EventTreeProducer.cc.

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

L1Analysis::L1AnalysisEventDataFormat* L1EventTreeProducer::l1EventData

Definition at line 64 of file L1EventTreeProducer.cc.

Referenced by L1EventTreeProducer().

TTree* L1EventTreeProducer::tree_
private

Definition at line 72 of file L1EventTreeProducer.cc.

Referenced by analyze(), and L1EventTreeProducer().