CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
CSCReadoutMappingFromFile Class Reference

#include <CSCReadoutMappingFromFile.h>

Inheritance diagram for CSCReadoutMappingFromFile:
CSCReadoutMappingForSliceTest CSCReadoutMapping

Public Member Functions

 CSCReadoutMappingFromFile (std::string iFullPathFileName)
 Constructor. More...
 
 CSCReadoutMappingFromFile ()
 
void fill (std::string iFullPathFileName)
 Fill mapping store. More...
 
 ~CSCReadoutMappingFromFile () override
 Destructor. More...
 
- Public Member Functions inherited from CSCReadoutMappingForSliceTest
 CSCReadoutMappingForSliceTest ()
 Constructor. More...
 
 ~CSCReadoutMappingForSliceTest () override
 Destructor. More...
 
- Public Member Functions inherited from CSCReadoutMapping
void addRecord (int endcap, int station, int ring, int chamber, int vmecrate, int dmb, int tmb, int tsector, int cscid, int ddu, int dcc)
 
int chamber (int endcap, int station, int vmecrate, int dmb, int tmb) const
 
int crate (const CSCDetId &) const
 returns vmecrate given CSCDetId More...
 
 CSCReadoutMapping ()
 Default constructor. More...
 
int dccId (const CSCDetId &) const
 returns DCC# given CSCDetId More...
 
int dduId (const CSCDetId &) const
 returns DDU# given CSCDetId More...
 
bool debugV (void) const
 
CSCDetId detId (int endcap, int station, int vmecrate, int dmb, int tmb, int cfeb, int layer=0) const
 
int dmbId (const CSCDetId &) const
 returns dmbId given CSCDetId More...
 
CSCLabel findHardwareId (const CSCDetId &) const
 returns hardware ids given chamber id More...
 
const std::string & myName (void) const
 
void setDebugV (bool dbg)
 
virtual ~CSCReadoutMapping ()
 Destructor. More...
 

Private Attributes

std::string theMappingFile
 

Detailed Description

Author
Tim Cox A concrete CSCReadoutMappingForSliceTest to read mapping from Ascii file. Find file from FileInPath of ParameterSet passed from calling E_Producer.

Definition at line 14 of file CSCReadoutMappingFromFile.h.

Constructor & Destructor Documentation

CSCReadoutMappingFromFile::CSCReadoutMappingFromFile ( std::string  iFullPathFileName)
explicit

Constructor.

Definition at line 7 of file CSCReadoutMappingFromFile.cc.

References fill(), and eostools::move().

7 { fill(std::move(iName)); }
void fill(std::string iFullPathFileName)
Fill mapping store.
def move
Definition: eostools.py:511
CSCReadoutMappingFromFile::CSCReadoutMappingFromFile ( )
inline

Definition at line 18 of file CSCReadoutMappingFromFile.h.

18 {}
CSCReadoutMappingFromFile::~CSCReadoutMappingFromFile ( )
override

Destructor.

Definition at line 9 of file CSCReadoutMappingFromFile.cc.

9 {}

Member Function Documentation

void CSCReadoutMappingFromFile::fill ( std::string  iFullPathFileName)

Fill mapping store.

Definition at line 11 of file CSCReadoutMappingFromFile.cc.

References CSCReadoutMapping::addRecord(), recoMuon::in, geometryCSVtoXML::line, eostools::move(), AlCaHLTBitMon_QueryRunRegistry::string, and theMappingFile.

Referenced by CSCReadoutMappingFromFile().

11  {
13  std::ifstream in(theMappingFile.c_str());
15  const std::string commentFlag = "#";
16  if (!in) {
17  edm::LogError("CSC") << " Failed to open file " << theMappingFile << " containing mapping.";
18  } else {
19  edm::LogInfo("CSC") << " Opened file " << theMappingFile << " containing mapping.";
20 
21  while (getline(in, line)) { // getline() from <string>
22  // LogDebug("CSC") << line;
23  if (line[0] != commentFlag[0]) {
24  int i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11;
25  std::istringstream is(line);
26  is >> i1 >> i2 >> i3 >> i4 >> i5 >> i6 >> i7 >> i8 >> i9 >> i10 >> i11;
27  // LogDebug("CSC") << i1 << " " << i2 << " " << i3 << " " << i4 << " " <<
28  // i5 << " " << i6 << " " << i7 << " " << i8 << " " << i9;
29  addRecord(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);
30  }
31  }
32  }
33 
34  return;
35 }
Log< level::Error, false > LogError
def move
Definition: eostools.py:511
void addRecord(int endcap, int station, int ring, int chamber, int vmecrate, int dmb, int tmb, int tsector, int cscid, int ddu, int dcc)
Log< level::Info, false > LogInfo

Member Data Documentation

std::string CSCReadoutMappingFromFile::theMappingFile
private

Definition at line 27 of file CSCReadoutMappingFromFile.h.

Referenced by fill().