#include <CSCReadoutMappingFromFile.h>
Public Member Functions | |
CSCReadoutMappingFromFile (const edm::ParameterSet &ps) | |
Constructor. | |
CSCReadoutMappingFromFile () | |
virtual void | fill (const edm::ParameterSet &ps) |
Fill mapping store. | |
virtual | ~CSCReadoutMappingFromFile () |
Destructor. | |
Private Attributes | |
std::string | theMappingFile |
Definition at line 15 of file CSCReadoutMappingFromFile.h.
CSCReadoutMappingFromFile::CSCReadoutMappingFromFile | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Constructor.
Definition at line 8 of file CSCReadoutMappingFromFile.cc.
References fill().
{ fill( ps ); }
CSCReadoutMappingFromFile::CSCReadoutMappingFromFile | ( | ) | [inline] |
Definition at line 20 of file CSCReadoutMappingFromFile.h.
{}
CSCReadoutMappingFromFile::~CSCReadoutMappingFromFile | ( | ) | [virtual] |
void CSCReadoutMappingFromFile::fill | ( | const edm::ParameterSet & | ps | ) | [virtual] |
Fill mapping store.
Implements CSCReadoutMapping.
Definition at line 14 of file CSCReadoutMappingFromFile.cc.
References CSCReadoutMapping::addRecord(), edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), recoMuon::in, geometryCSVtoXML::line, AlCaHLTBitMon_QueryRunRegistry::string, and theMappingFile.
Referenced by CSCReadoutMappingFromFile().
{ edm::FileInPath fp = ps.getParameter<edm::FileInPath>("theMappingFile"); theMappingFile = fp.fullPath(); std::ifstream in( theMappingFile.c_str() ); std::string line; const std::string commentFlag = "#"; if ( !in ) { edm::LogError("CSC") << " Failed to open file " << theMappingFile << " containing mapping."; } else { edm::LogInfo("CSC") << " Opened file " << theMappingFile << " containing mapping."; while ( getline(in, line) ) { // getline() from <string> // LogDebug("CSC") << line; if ( line[0] != commentFlag[0] ) { int i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11; std::istringstream is( line ); is >> i1 >> i2 >> i3 >> i4 >> i5 >> i6 >> i7 >> i8 >> i9 >> i10 >> i11; // LogDebug("CSC") << i1 << " " << i2 << " " << i3 << " " << i4 << " " << // i5 << " " << i6 << " " << i7 << " " << i8 << " " << i9; addRecord( i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11 ); } } } return; }
std::string CSCReadoutMappingFromFile::theMappingFile [private] |
Definition at line 29 of file CSCReadoutMappingFromFile.h.
Referenced by fill().