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 &&)=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::vector< ModuleDescription const * > &modules, 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)
 

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 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

Definition at line 11 of file HGCalTriggerNtupleManager.cc.

Member Typedef Documentation

◆ ntuple_ptr

Definition at line 13 of file HGCalTriggerNtupleManager.cc.

Constructor & Destructor Documentation

◆ HGCalTriggerNtupleManager()

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

Definition at line 29 of file HGCalTriggerNtupleManager.cc.

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 }

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

◆ ~HGCalTriggerNtupleManager()

HGCalTriggerNtupleManager::~HGCalTriggerNtupleManager ( )
inlineoverride

Definition at line 17 of file HGCalTriggerNtupleManager.cc.

17 {};

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 39 of file HGCalTriggerNtupleManager.cc.

39  {
40  for (auto& hgc_ntuple : hgc_ntuples_) {
41  hgc_ntuple->fill(e, es);
42  }
43  tree_->Fill();
44 }

References MillePedeFileConverter_cfg::e, hgc_ntuples_, and tree_.

◆ beginRun()

void HGCalTriggerNtupleManager::beginRun ( const edm::Run ,
const edm::EventSetup  
)
inlineoverridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 18 of file HGCalTriggerNtupleManager.cc.

18 {};

Member Data Documentation

◆ file_service_

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

Definition at line 22 of file HGCalTriggerNtupleManager.cc.

Referenced by HGCalTriggerNtupleManager().

◆ hgc_ntuples_

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

Definition at line 23 of file HGCalTriggerNtupleManager.cc.

Referenced by analyze(), and HGCalTriggerNtupleManager().

◆ tree_

TTree* HGCalTriggerNtupleManager::tree_
private

Definition at line 24 of file HGCalTriggerNtupleManager.cc.

Referenced by analyze(), and HGCalTriggerNtupleManager().

HGCalTriggerNtupleManager::hgc_ntuples_
std::vector< ntuple_ptr > hgc_ntuples_
Definition: HGCalTriggerNtupleManager.cc:23
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:46
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
HGCalTriggerNtupleManager::tree_
TTree * tree_
Definition: HGCalTriggerNtupleManager.cc:24
HGCalTriggerNtupleManager::file_service_
edm::Service< TFileService > file_service_
Definition: HGCalTriggerNtupleManager.cc:22
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
get
#define get
edm::ParameterSet::getParameterSetVector
VParameterSet const & getParameterSetVector(std::string const &name) const
Definition: ParameterSet.cc:2160
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37