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::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1uGTTreeProducer (edm::ParameterSet const &)
 
 ~L1uGTTreeProducer () 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
 
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_
 
GlobalAlgBlk const * results_
 
TTree * tree_
 
const edm::EDGetTokenT
< GlobalAlgBlkBxCollection
ugt_token_
 

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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (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 () noexcept
 
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...
 
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 55 of file L1uGTTreeProducer.cc.

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

56  : results_(nullptr),
57  tree_(nullptr),
58  ugt_token_(consumes<GlobalAlgBlkBxCollection>(config.getParameter<edm::InputTag>("ugtToken"))),
59  cache_id_(0) {
60  // set up the TTree and its branches
61  tree_ = fs_->make<TTree>("L1uGTTree", "L1uGTTree");
62  tree_->Branch("L1uGT", "GlobalAlgBlk", &results_, 32000, 3);
63 }
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
GlobalAlgBlk const * results_
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > ugt_token_
unsigned long long cache_id_
tuple config
parse the configuration file
edm::Service< TFileService > fs_
L1uGTTreeProducer::~L1uGTTreeProducer ( )
override

Definition at line 65 of file L1uGTTreeProducer.cc.

65  {
66  //if (tree_) { delete tree_; tree_ = NULL; }
67  //if (results_) { delete results_; results_ = NULL; } // It seems TTree owns this pointer...
68 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 75 of file L1uGTTreeProducer.cc.

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

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

Reimplemented from edm::EDAnalyzer.

Definition at line 102 of file L1uGTTreeProducer.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 105 of file L1uGTTreeProducer.cc.

105 {}

Member Data Documentation

unsigned long long L1uGTTreeProducer::cache_id_
private

Definition at line 52 of file L1uGTTreeProducer.cc.

Referenced by analyze().

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

Definition at line 40 of file L1uGTTreeProducer.cc.

Referenced by L1uGTTreeProducer().

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::ugt_token_
private

Definition at line 49 of file L1uGTTreeProducer.cc.

Referenced by analyze().