#include <CSCTriggerMappingFromFile.h>
Public Member Functions | |
CSCTriggerMappingFromFile (std::string filename) | |
Constructor. | |
CSCTriggerMappingFromFile () | |
virtual void | fill (void) |
Fill mapping store. | |
virtual | ~CSCTriggerMappingFromFile () |
Destructor. | |
Private Attributes | |
std::string | filename_ |
Definition at line 13 of file CSCTriggerMappingFromFile.h.
CSCTriggerMappingFromFile::CSCTriggerMappingFromFile | ( | std::string | filename | ) | [explicit] |
CSCTriggerMappingFromFile::CSCTriggerMappingFromFile | ( | ) | [inline] |
Definition at line 18 of file CSCTriggerMappingFromFile.h.
{}
CSCTriggerMappingFromFile::~CSCTriggerMappingFromFile | ( | ) | [virtual] |
void CSCTriggerMappingFromFile::fill | ( | void | ) | [virtual] |
Fill mapping store.
Implements CSCTriggerMapping.
Definition at line 11 of file CSCTriggerMappingFromFile.cc.
References CSCTriggerMapping::addRecord(), gather_cfg::cout, CSCTriggerMapping::debugV(), filename_, recoMuon::in, geometryCSVtoXML::line, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by CSCTriggerMappingFromFile().
{ std::ifstream in( filename_.c_str() ); std::string line; const std::string commentFlag = "#"; if ( !in ) { std::cout << "CSCTriggerMappingFromFile: ERROR! Failed to open file containing mapping, " << filename_ << std::endl ; } else { std::cout << "CSCTriggerMappingFromFile: opened file containing mapping, " << filename_ << std::endl ; while ( getline(in, line) ) { // getline() from <string> if ( debugV() ) std::cout << line << std::endl; if ( line[0] != commentFlag[0] ) { int i1, i2, i3, i4, i5, i6, i7, i8, i9, i10; std::istringstream is( line ); is >> i1 >> i2 >> i3 >> i4 >> i5 >> i6 >> i7 >> i8 >> i9 >> i10; if ( debugV() ) std::cout << i1 << " " << i2 << " " << i3 << " " << i4 << " " << i5 << " " << i6 << " " << i7 << " " << i8 << " " << i9 << " " << i10 << std::endl; addRecord( i1, i2, i3, i4, i5, i6, i7, i8, i9 , i10); } } } return; }
std::string CSCTriggerMappingFromFile::filename_ [private] |
Definition at line 27 of file CSCTriggerMappingFromFile.h.
Referenced by fill().