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 Member Functions | Private Attributes
CaloTowerConstituentsMapBuilder Class Reference

#include <tmp/CaloTowerConstituentsMapBuilder/interface/CaloTowerConstituentsMapBuilder.h>

Inheritance diagram for CaloTowerConstituentsMapBuilder:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

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

Public Member Functions

 CaloTowerConstituentsMapBuilder (const edm::ParameterSet &)
 
ReturnType produce (const IdealGeometryRecord &)
 
 ~CaloTowerConstituentsMapBuilder ()
 
- 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 Member Functions

void parseTextMap (const std::string &filename, CaloTowerConstituentsMap &theMap)
 

Private Attributes

std::string mapFile_
 

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

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 37 of file CaloTowerConstituentsMapBuilder.h.

Member Typedef Documentation

Definition at line 42 of file CaloTowerConstituentsMapBuilder.h.

Constructor & Destructor Documentation

CaloTowerConstituentsMapBuilder::CaloTowerConstituentsMapBuilder ( const edm::ParameterSet iConfig)

Definition at line 30 of file CaloTowerConstituentsMapBuilder.cc.

References edm::ESProducer::setWhatProduced().

30  :
31  mapFile_(iConfig.getUntrackedParameter<std::string>("MapFile",""))
32  /*
33  doStandardHBHE_(iConfig.getParameter<bool>("standardHBHE","true")),
34  doStandardHF_(iConfig.getParameter<bool>("standardHF","true")),
35  doStandardEB_(iConfig.getParameter<bool>("standardEB","true"))
36  */
37 {
38  //the following line is needed to tell the framework what
39  // data is being produced
40  setWhatProduced(this);
41 
42  //now do what ever other initialization is needed
43 }
T getUntrackedParameter(std::string const &, T const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
CaloTowerConstituentsMapBuilder::~CaloTowerConstituentsMapBuilder ( )

Definition at line 46 of file CaloTowerConstituentsMapBuilder.cc.

47 {
48 }

Member Function Documentation

void CaloTowerConstituentsMapBuilder::parseTextMap ( const std::string &  filename,
CaloTowerConstituentsMap theMap 
)
private

Definition at line 74 of file CaloTowerConstituentsMapBuilder.cc.

References CaloTowerConstituentsMap::assign(), cond::rpcobgas::detid, interpolateCardsSimple::eff, edm::FileInPath::fullPath(), getHLTprescales::index, and geometryCSVtoXML::line.

Referenced by produce().

74  {
76 
77  gzFile gzed=gzopen(eff.fullPath().c_str(),"rb");
78 
79  while (!gzeof(gzed)) {
80  char line[1024];
81  int ieta, iphi, rawid;
82  gzgets(gzed,line,1023);
83  if (index(line,'#')!=0) *(index(line,'#'))=0;
84  int ct=sscanf(line,"%i %d %d",&rawid,&ieta,&iphi);
85  if (ct==3) {
86  DetId detid(rawid);
87  CaloTowerDetId tid(ieta,iphi);
88  theMap.assign(detid,tid);
89  }
90  }
91  gzclose(gzed);
92 
93 }
void assign(const DetId &cell, const CaloTowerDetId &tower)
set the association between a DetId and a tower
Definition: DetId.h:20
tuple filename
Definition: lut2db_cfg.py:20
CaloTowerConstituentsMapBuilder::ReturnType CaloTowerConstituentsMapBuilder::produce ( const IdealGeometryRecord iRecord)

Definition at line 57 of file CaloTowerConstituentsMapBuilder.cc.

References mapFile_, parseTextMap(), and parseEventContent::prod.

58 {
59  std::auto_ptr<CaloTowerConstituentsMap> prod(new CaloTowerConstituentsMap());
60  prod->useStandardHB(true);
61  prod->useStandardHE(true);
62  prod->useStandardHF(true);
63  prod->useStandardHO(true);
64  prod->useStandardEB(true);
65 
66  if (!mapFile_.empty()) {
68  }
69  prod->sort();
70 
71  return prod;
72 }
void parseTextMap(const std::string &filename, CaloTowerConstituentsMap &theMap)

Member Data Documentation

std::string CaloTowerConstituentsMapBuilder::mapFile_
private

Definition at line 47 of file CaloTowerConstituentsMapBuilder.h.

Referenced by produce().