CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1uGTTreeProducer Class Reference
Inheritance diagram for L1uGTTreeProducer:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 L1uGTTreeProducer (edm::ParameterSet const &)
 
 ~L1uGTTreeProducer () 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
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, 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::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

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

Private Attributes

unsigned long long cache_id_
 
edm::Service< TFileServicefs_
 
const edm::ESGetToken
< L1TUtmTriggerMenu,
L1TUtmTriggerMenuRcd
l1GtMenuToken_
 
GlobalAlgBlk const * results_
 
TTree * tree_
 
const edm::EDGetTokenT
< GlobalAlgBlkBxCollection
ugtToken_
 

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 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<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 28 of file L1uGTTreeProducer.cc.

Constructor & Destructor Documentation

L1uGTTreeProducer::L1uGTTreeProducer ( edm::ParameterSet const &  config)
explicit

Definition at line 56 of file L1uGTTreeProducer.cc.

References fs_, TFileService::kSharedResource, TFileService::make(), results_, and tree_.

57  : results_(nullptr),
58  tree_(nullptr),
59  ugtToken_(consumes<GlobalAlgBlkBxCollection>(config.getParameter<edm::InputTag>("ugtToken"))),
60  l1GtMenuToken_(esConsumes<L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd>()),
61  cache_id_(0) {
62  usesResource(TFileService::kSharedResource);
63  // set up the TTree and its branches
64  tree_ = fs_->make<TTree>("L1uGTTree", "L1uGTTree");
65  tree_->Branch("L1uGT", "GlobalAlgBlk", &results_, 32000, 3);
66 }
static const std::string kSharedResource
Definition: TFileService.h:76
const edm::ESGetToken< L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd > l1GtMenuToken_
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
GlobalAlgBlk const * results_
unsigned long long cache_id_
tuple config
parse the configuration file
edm::Service< TFileService > fs_
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > ugtToken_
L1uGTTreeProducer::~L1uGTTreeProducer ( )
overridedefault

Member Function Documentation

void L1uGTTreeProducer::analyze ( edm::Event const &  event,
edm::EventSetup const &  setup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 73 of file L1uGTTreeProducer.cc.

References cache_id_, edm::EventSetup::get(), edm::EventSetup::getHandle(), gpuClustering::id, edm::HandleBase::isValid(), l1GtMenuToken_, relval_steps::menu, mergeVDriftHistosByStation::name, results_, AlCaHLTBitMon_QueryRunRegistry::string, tree_, and ugtToken_.

73  {
74  unsigned long long id = setup.get<L1TUtmTriggerMenuRcd>().cacheIdentifier();
75  if (id != cache_id_) {
76  cache_id_ = id;
78  menu = setup.getHandle(l1GtMenuToken_);
79 
80  for (auto const &keyval : menu->getAlgorithmMap()) {
81  std::string const &name = keyval.second.getName();
82  unsigned int index = keyval.second.getIndex();
83  //std::cerr << fmt::sprintf("bit %4d: %s", index, name) << std::endl;
84  tree_->SetAlias(name.c_str(), fmt::sprintf("L1uGT.m_algoDecisionInitial[%d]", index).c_str());
85  }
86  }
87 
89  event.getByToken(ugtToken_, ugt);
90  if (ugt.isValid()) {
91  results_ = &ugt->at(0, 0);
92  }
93 
94  tree_->Fill();
95 }
uint16_t *__restrict__ id
const edm::ESGetToken< L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd > l1GtMenuToken_
GlobalAlgBlk const * results_
bool isValid() const
Definition: HandleBase.h:70
unsigned long long cache_id_
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > ugtToken_
void L1uGTTreeProducer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 98 of file L1uGTTreeProducer.cc.

98 {}
void L1uGTTreeProducer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 101 of file L1uGTTreeProducer.cc.

101 {}

Member Data Documentation

unsigned long long L1uGTTreeProducer::cache_id_
private

Definition at line 53 of file L1uGTTreeProducer.cc.

Referenced by analyze().

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

Definition at line 40 of file L1uGTTreeProducer.cc.

Referenced by L1uGTTreeProducer().

const edm::ESGetToken<L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd> L1uGTTreeProducer::l1GtMenuToken_
private

Definition at line 50 of file L1uGTTreeProducer.cc.

Referenced by analyze().

GlobalAlgBlk const* L1uGTTreeProducer::results_
private

Definition at line 43 of file L1uGTTreeProducer.cc.

Referenced by analyze(), and L1uGTTreeProducer().

TTree* L1uGTTreeProducer::tree_
private

Definition at line 46 of file L1uGTTreeProducer.cc.

Referenced by analyze(), and L1uGTTreeProducer().

const edm::EDGetTokenT<GlobalAlgBlkBxCollection> L1uGTTreeProducer::ugtToken_
private

Definition at line 49 of file L1uGTTreeProducer.cc.

Referenced by analyze().