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 Attributes
cms::MTCCHLTrigger Class Reference

#include <MTCCHLTrigger.h>

Inheritance diagram for cms::MTCCHLTrigger:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual bool filter (edm::Event &e, edm::EventSetup const &c)
 
 MTCCHLTrigger (const edm::ParameterSet &ps)
 
virtual ~MTCCHLTrigger ()
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDFilter ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

unsigned int ChargeThreshold
 
std::string clusterProducer
 
bool selOnDigiCharge
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter 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::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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 13 of file MTCCHLTrigger.h.

Constructor & Destructor Documentation

cms::MTCCHLTrigger::MTCCHLTrigger ( const edm::ParameterSet ps)

Definition at line 9 of file MTCCHLTrigger.cc.

References ChargeThreshold, clusterProducer, edm::ParameterSet::getParameter(), selOnDigiCharge, and AlCaHLTBitMon_QueryRunRegistry::string.

9  {
10  selOnDigiCharge=ps.getParameter<bool>("SelOnDigiCharge");
11  ChargeThreshold=ps.getParameter<int>("ChargeThreshold");
12  clusterProducer = ps.getParameter<std::string>("ClusterProducer");
13  produces <int>();
14  produces <unsigned int>();
15 }
T getParameter(std::string const &) const
unsigned int ChargeThreshold
Definition: MTCCHLTrigger.h:23
std::string clusterProducer
Definition: MTCCHLTrigger.h:27
virtual cms::MTCCHLTrigger::~MTCCHLTrigger ( )
inlinevirtual

Definition at line 16 of file MTCCHLTrigger.h.

16 {}

Member Function Documentation

bool cms::MTCCHLTrigger::filter ( edm::Event e,
edm::EventSetup const &  c 
)
virtual

Implements edm::EDFilter.

Definition at line 17 of file MTCCHLTrigger.cc.

References edm::DetSetVector< T >::begin(), ChargeThreshold, clusterProducer, end, edm::Event::getByLabel(), edm::Event::getManyByType(), h, convertSQLitetoXML_cfg::output, edm::Event::put(), and selOnDigiCharge.

17  {
18  //get data
19  //StripCluster
22 
23  //StripDigi from RawToDigi and ZeroSuppressor
24  std::vector< edm::Handle< edm::DetSetVector<SiStripDigi> > > di;
25  e.getManyByType(di);
26 
27  if (selOnDigiCharge) {
28  unsigned int digiadc=0;
29  for (std::vector< edm::Handle< edm::DetSetVector<SiStripDigi> > >::const_iterator mi = di.begin(); mi!=di.end(); mi++){
30  for (edm::DetSetVector<SiStripDigi>::const_iterator it = (*mi)->begin(); it!= (*mi)->end();it++) {
31  for(std::vector<SiStripDigi>::const_iterator vit=(it->data).begin(); vit!=(it->data).end(); vit++) digiadc += vit->adc();
32  }
33  }
34  return (digiadc>ChargeThreshold) ? true : false;
35  } else {
36  unsigned int amplclus=0;
37  for (edm::DetSetVector<SiStripCluster>::const_iterator it=h->begin();it!=h->end();it++) {
38  for(std::vector<SiStripCluster>::const_iterator vit=(it->data).begin(); vit!=(it->data).end(); vit++){
39  for(auto ia=vit->amplitudes().begin(); ia!=vit->amplitudes().end(); ia++)
40  {
41  if ((*ia)>0){ amplclus+=(*ia); }
42  }
43  }
44  }
45  bool decision= (amplclus>ChargeThreshold) ? true : false;
46  std::auto_ptr< unsigned int > output( new unsigned int(amplclus) );
47  std::auto_ptr< int > output_dec( new int(decision) );
48  e.put(output);
49  e.put(output_dec);
50  return decision;
51  }
52  }
void getManyByType(std::vector< Handle< PROD > > &results) const
Definition: Event.h:452
unsigned int ChargeThreshold
Definition: MTCCHLTrigger.h:23
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::string clusterProducer
Definition: MTCCHLTrigger.h:27
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
#define end
Definition: vmac.h:37
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:418
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:346
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:104

Member Data Documentation

unsigned int cms::MTCCHLTrigger::ChargeThreshold
private

Definition at line 23 of file MTCCHLTrigger.h.

Referenced by filter(), and MTCCHLTrigger().

std::string cms::MTCCHLTrigger::clusterProducer
private

Definition at line 27 of file MTCCHLTrigger.h.

Referenced by filter(), and MTCCHLTrigger().

bool cms::MTCCHLTrigger::selOnDigiCharge
private

Definition at line 22 of file MTCCHLTrigger.h.

Referenced by filter(), and MTCCHLTrigger().