CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
L1TMuonEndCapForestESProducer Class Reference
Inheritance diagram for L1TMuonEndCapForestESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef boost::shared_ptr
< L1TMuonEndCapForest
ReturnType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey,
edm::propagate_const
< std::shared_ptr< DataProxy > > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 

Public Member Functions

 L1TMuonEndCapForestESProducer (const edm::ParameterSet &)
 
ReturnType produce (const L1TMuonEndCapForestRcd &)
 
 ~L1TMuonEndCapForestESProducer ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

Private Attributes

l1t::ForestHelper data_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 24 of file L1TMuonEndCapForestESProducer.cc.

Member Typedef Documentation

Definition at line 29 of file L1TMuonEndCapForestESProducer.cc.

Constructor & Destructor Documentation

L1TMuonEndCapForestESProducer::L1TMuonEndCapForestESProducer ( const edm::ParameterSet iConfig)

Definition at line 36 of file L1TMuonEndCapForestESProducer.cc.

References data_, dir, l1t::ForestHelper::initializeFromXML(), edm::ESProducer::setWhatProduced(), and AlCaHLTBitMon_QueryRunRegistry::string.

36  :
38 {
39  //the following line is needed to tell the framework what
40  // data is being produced
41  setWhatProduced(this);
42 
43  // these should come from pythong config...
44  std::vector<int> modes = {3,5,9,6,10,12,7,11,13,14,15};
45  //std::string dir = "L1Trigger/L1TMuon/data/emtf_luts/ModeVariables/trees/";
46  std::string dir = "L1Trigger/L1TMuon/data/emtf_luts/v_16_02_21/ModeVariables/trees/";
47  int ntrees = 64;
48 
49  data_.initializeFromXML(dir.c_str(), modes, ntrees);
50  //data_.print(cout);
51 
52  // Benchmark calculations from original version of UF
53 
54  //DEBUG: mode: 15 dir L1Trigger/L1TMuon/data/emtf_luts/v_16_02_21/ModeVariables/trees/15 num trees 64
55  //DEBUG: pred val: 0.201249
56  //DEBUG: data = 1, 1.975, 121, -10, -16, 1,
57  {
58  //std::vector<double> x = {1, 1.975, 121, -10, -16, 1};
59  //cout << "DEBUG: original result: 0.201249, our result: " << data_.evaluate(15, x) << "\n";
60  }
61 
62  //DEBUG: mode: 15 dir L1Trigger/L1TMuon/data/emtf_luts/v_16_02_21/ModeVariables/trees/15 num trees 64
63  //DEBUG: pred val: 0.0201636
64  //DEBUG: data = 1, 1.325, 7, 0, 0, 0
65  {
66  //std::vector<double> x = {1, 1.325, 7, 0, 0, 0};
67  //cout << "DEBUG: original result: 0.0201636, our result: " << data_.evaluate(15, x) << "\n";
68  }
69 
70  //DEBUG: mode: 11 dir L1Trigger/L1TMuon/data/emtf_luts/v_16_02_21/ModeVariables/trees/11 num trees 64
71  //DEBUG: pred val: 0.0260195
72  //DEBUG: data = 1, 1.675, 34, 10, 2, 0, 1
73  {
74  //std::vector<double> x = {1, 1.675, 34, 10, 2, 0, 1};
75  //cout << "DEBUG: original result: 0.0260195, our result: " << data_.evaluate(11, x) << "\n";
76  }
77 
78  //DEBUG: mode: 10 dir L1Trigger/L1TMuon/data/emtf_luts/v_16_02_21/ModeVariables/trees/10 num trees 64
79  //DEBUG: pred val: 0.209812
80  //DEBUG: data = 1, 1.675, -38, 3, 1, 0, 1
81  {
82  //std::vector<double> x = {1, 1.675, -38, 3, 1, 0, 1};
83  //cout << "DEBUG: original result: 0.209812, our result: " << data_.evaluate(10, x) << "\n";
84  }
85 
86  //DEBUG: mode: 15 dir L1Trigger/L1TMuon/data/emtf_luts/v_16_02_21/ModeVariables/trees/15 num trees 64
87  //DEBUG: pred val: 0.0788114
88  //DEBUG: data = 1, 1.375, 27, 16, 4, 1
89  {
90  //std::vector<double> x = {1, 1.375, 27, 16, 4, 1};
91  //cout << "DEBUG: original result: 0.0788114, our result: " << data_.evaluate(15, x) << "\n";
92  }
93 
94 }
void initializeFromXML(const char *dirname, const std::vector< int > &modes, int ntrees)
Definition: ForestHelper.cc:72
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
dbl *** dir
Definition: mlp_gen.cc:35
L1TMuonEndCapForestESProducer::~L1TMuonEndCapForestESProducer ( )

Definition at line 98 of file L1TMuonEndCapForestESProducer.cc.

99 {
100 }

Member Function Documentation

L1TMuonEndCapForestESProducer::ReturnType L1TMuonEndCapForestESProducer::produce ( const L1TMuonEndCapForestRcd iRecord)

Definition at line 110 of file L1TMuonEndCapForestESProducer.cc.

References data_, and l1t::ForestHelper::getWriteInstance().

111 {
112  using namespace edm::es;
113  boost::shared_ptr<L1TMuonEndCapForest> pEMTFForest;
114 
115  pEMTFForest = boost::shared_ptr<L1TMuonEndCapForest>(data_.getWriteInstance());
116  return pEMTFForest;
117 
118 }
L1TMuonEndCapForest * getWriteInstance()
Definition: ForestHelper.h:67

Member Data Documentation

l1t::ForestHelper L1TMuonEndCapForestESProducer::data_
private

Definition at line 33 of file L1TMuonEndCapForestESProducer.cc.

Referenced by L1TMuonEndCapForestESProducer(), and produce().