CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
ShallowEventDataProducer Class Reference

#include <ShallowEventDataProducer.h>

Inheritance diagram for ShallowEventDataProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 ShallowEventDataProducer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector
< edm::ProductResolverIndex >
const & 
indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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 & 
itemsToGetFromEvent () 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

edm::EDGetTokenT
< L1GlobalTriggerReadoutRecord
trig_token_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDProducer
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)
 
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

Definition at line 9 of file ShallowEventDataProducer.h.

Constructor & Destructor Documentation

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

Definition at line 5 of file ShallowEventDataProducer.cc.

References edm::ParameterSet::getParameter(), and trig_token_.

5  {
6  produces <unsigned int> ( "run" );
7  produces <unsigned int> ( "event" );
8  produces <unsigned int> ( "bx" );
9  produces <unsigned int> ( "lumi" );
10  produces <std::vector<bool> > ( "TrigTech" );
11  produces <std::vector<bool> > ( "TrigPh" );
12  trig_token_ = consumes<L1GlobalTriggerReadoutRecord>(
13  iConfig.getParameter<edm::InputTag>("trigRecord")
14  );
15 }
T getParameter(std::string const &) const
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > trig_token_

Member Function Documentation

void ShallowEventDataProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 18 of file ShallowEventDataProducer.cc.

References edm::EventBase::bunchCrossing(), edm::EventID::event(), event(), edm::Event::getByToken(), i, edm::EventBase::id(), fjr2json::lumi, edm::EventBase::luminosityBlock(), eostools::move(), edm::Event::put(), edm::EventID::run(), DTTTrigCorrFirst::run, and trig_token_.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

18  {
19 
20 
21  auto run = std::make_unique<unsigned int>(iEvent.id().run() );
22  auto event = std::make_unique<unsigned int>(iEvent.id().event() );
23  auto bx = std::make_unique<unsigned int>(iEvent.bunchCrossing() );
24  auto lumi = std::make_unique<unsigned int>(iEvent.luminosityBlock() );
25 
26 
28  iEvent.getByToken(trig_token_, gtRecord);
29 
30  std::vector<bool> TrigTech_(64,0);
31  std::vector<bool> TrigPh_(128,0);
32 
33  // Get dWord after masking disabled bits
34  DecisionWord dWord = gtRecord->decisionWord();
35  if ( ! dWord.empty() ) { // if board not there this is zero
36  // loop over dec. bit to get total rate (no overlap)
37  for ( int i = 0; i < 64; ++i ) {
38  TrigPh_[i]= dWord[i];
39  }
40  }
41 
42  TechnicalTriggerWord tw = gtRecord->technicalTriggerWord();
43  if ( ! tw.empty() ) {
44  // loop over dec. bit to get total rate (no overlap)
45  for ( int i = 0; i < 64; ++i ) {
46  TrigTech_[i]=tw[i];
47  }
48  }
49 
50  auto TrigTech = std::make_unique<std::vector<bool>>(TrigTech_);
51  auto TrigPh = std::make_unique<std::vector<bool>>(TrigPh_);
52 
53  iEvent.put(std::move(run), "run" );
54  iEvent.put(std::move(event), "event" );
55  iEvent.put(std::move(bx), "bx" );
56  iEvent.put(std::move(lumi), "lumi" );
57  iEvent.put(std::move(TrigTech), "TrigTech" );
58  iEvent.put(std::move(TrigPh), "TrigPh" );
59 }
RunNumber_t run() const
Definition: EventID.h:39
EventNumber_t event() const
Definition: EventID.h:41
int i
Definition: DBlmapReader.cc:9
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
tuple lumi
Definition: fjr2json.py:35
int bunchCrossing() const
Definition: EventBase.h:64
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:61
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > trig_token_
std::vector< bool > DecisionWord
typedefs
def move
Definition: eostools.py:510
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
edm::EventID id() const
Definition: EventBase.h:58

Member Data Documentation

edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > ShallowEventDataProducer::trig_token_
private

Definition at line 14 of file ShallowEventDataProducer.h.

Referenced by produce(), and ShallowEventDataProducer().