CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
HGCalTriggerNtupleManager Class Reference
Inheritance diagram for HGCalTriggerNtupleManager:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

typedef std::unique_ptr< HGCalTriggerNtupleBasentuple_ptr
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
 HGCalTriggerNtupleManager (const edm::ParameterSet &conf)
 
 ~HGCalTriggerNtupleManager () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, 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
 
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)
 

Private Attributes

edm::Service< TFileServicefile_service_
 
std::vector< ntuple_ptrhgc_ntuples_
 
TTree * tree_
 

Additional Inherited Members

- 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 wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 11 of file HGCalTriggerNtupleManager.cc.

Member Typedef Documentation

Definition at line 13 of file HGCalTriggerNtupleManager.cc.

Constructor & Destructor Documentation

HGCalTriggerNtupleManager::HGCalTriggerNtupleManager ( const edm::ParameterSet conf)
explicit

Definition at line 29 of file HGCalTriggerNtupleManager.cc.

References edm::EDConsumerBase::consumesCollector(), beamerCreator::create(), file_service_, reco::get(), edm::ParameterSet::getParameterSetVector(), hgc_ntuples_, TFileService::make(), AlCaHLTBitMon_QueryRunRegistry::string, and tree_.

29  {
30  tree_ = file_service_->make<TTree>("HGCalTriggerNtuple", "HGCalTriggerNtuple");
31  const std::vector<edm::ParameterSet>& ntuple_cfgs = conf.getParameterSetVector("Ntuples");
32  for (const auto& ntuple_cfg : ntuple_cfgs) {
33  const std::string& ntuple_name = ntuple_cfg.getParameter<std::string>("NtupleName");
34  hgc_ntuples_.emplace_back(HGCalTriggerNtupleFactory::get()->create(ntuple_name, ntuple_cfg));
35  hgc_ntuples_.back()->initialize(*tree_, ntuple_cfg, consumesCollector());
36  }
37 }
VParameterSet const & getParameterSetVector(std::string const &name) const
def create(alignables, pedeDump, additionalData, outputFile, config)
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
edm::Service< TFileService > file_service_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
T get(const Candidate &c)
Definition: component.h:55
std::vector< ntuple_ptr > hgc_ntuples_
HGCalTriggerNtupleManager::~HGCalTriggerNtupleManager ( )
inlineoverride

Definition at line 17 of file HGCalTriggerNtupleManager.cc.

17 {};

Member Function Documentation

void HGCalTriggerNtupleManager::analyze ( const edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 39 of file HGCalTriggerNtupleManager.cc.

References hgc_ntuples_, and tree_.

Referenced by beginRun().

39  {
40  for (auto& hgc_ntuple : hgc_ntuples_) {
41  hgc_ntuple->fill(e, es);
42  }
43  tree_->Fill();
44 }
std::vector< ntuple_ptr > hgc_ntuples_
void HGCalTriggerNtupleManager::beginRun ( const edm::Run ,
const edm::EventSetup  
)
inlineoverride

Definition at line 18 of file HGCalTriggerNtupleManager.cc.

References analyze().

18 {};

Member Data Documentation

edm::Service<TFileService> HGCalTriggerNtupleManager::file_service_
private

Definition at line 22 of file HGCalTriggerNtupleManager.cc.

Referenced by HGCalTriggerNtupleManager().

std::vector<ntuple_ptr> HGCalTriggerNtupleManager::hgc_ntuples_
private

Definition at line 23 of file HGCalTriggerNtupleManager.cc.

Referenced by analyze(), and HGCalTriggerNtupleManager().

TTree* HGCalTriggerNtupleManager::tree_
private

Definition at line 24 of file HGCalTriggerNtupleManager.cc.

Referenced by analyze(), and HGCalTriggerNtupleManager().