#include <tmp/CaloTowerConstituentsMapBuilder/interface/CaloTowerConstituentsMapBuilder.h>
Public Types | |
typedef std::auto_ptr < CaloTowerConstituentsMap > | ReturnType |
Public Member Functions | |
CaloTowerConstituentsMapBuilder (const edm::ParameterSet &) | |
ReturnType | produce (const IdealGeometryRecord &) |
~CaloTowerConstituentsMapBuilder () | |
Private Member Functions | |
void | parseTextMap (const std::string &filename, CaloTowerConstituentsMap &theMap) |
Private Attributes | |
std::string | mapFile_ |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 37 of file CaloTowerConstituentsMapBuilder.h.
typedef std::auto_ptr<CaloTowerConstituentsMap> CaloTowerConstituentsMapBuilder::ReturnType |
Definition at line 42 of file CaloTowerConstituentsMapBuilder.h.
CaloTowerConstituentsMapBuilder::CaloTowerConstituentsMapBuilder | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 30 of file CaloTowerConstituentsMapBuilder.cc.
References edm::ESProducer::setWhatProduced().
: mapFile_(iConfig.getUntrackedParameter<std::string>("MapFile","")) /* doStandardHBHE_(iConfig.getParameter<bool>("standardHBHE","true")), doStandardHF_(iConfig.getParameter<bool>("standardHF","true")), doStandardEB_(iConfig.getParameter<bool>("standardEB","true")) */ { //the following line is needed to tell the framework what // data is being produced setWhatProduced(this); //now do what ever other initialization is needed }
CaloTowerConstituentsMapBuilder::~CaloTowerConstituentsMapBuilder | ( | ) |
Definition at line 46 of file CaloTowerConstituentsMapBuilder.cc.
{ }
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().
{ edm::FileInPath eff(filename); gzFile gzed=gzopen(eff.fullPath().c_str(),"rb"); while (!gzeof(gzed)) { char line[1024]; int ieta, iphi, rawid; gzgets(gzed,line,1023); if (index(line,'#')!=0) *(index(line,'#'))=0; int ct=sscanf(line,"%i %d %d",&rawid,&ieta,&iphi); if (ct==3) { DetId detid(rawid); CaloTowerDetId tid(ieta,iphi); theMap.assign(detid,tid); } } gzclose(gzed); }
CaloTowerConstituentsMapBuilder::ReturnType CaloTowerConstituentsMapBuilder::produce | ( | const IdealGeometryRecord & | iRecord | ) |
Definition at line 57 of file CaloTowerConstituentsMapBuilder.cc.
References mapFile_, parseTextMap(), and parseEventContent::prod.
{ std::auto_ptr<CaloTowerConstituentsMap> prod(new CaloTowerConstituentsMap()); prod->useStandardHB(true); prod->useStandardHE(true); prod->useStandardHF(true); prod->useStandardHO(true); prod->useStandardEB(true); if (!mapFile_.empty()) { parseTextMap(mapFile_,*prod); } prod->sort(); return prod; }
std::string CaloTowerConstituentsMapBuilder::mapFile_ [private] |
Definition at line 47 of file CaloTowerConstituentsMapBuilder.h.
Referenced by produce().