CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

SiStripBadModuleByHandBuilder Class Reference

#include <SiStripBadModuleByHandBuilder.h>

Inheritance diagram for SiStripBadModuleByHandBuilder:
ConditionDBWriter< SiStripBadStrip > edm::EDAnalyzer

List of all members.

Public Member Functions

 SiStripBadModuleByHandBuilder (const edm::ParameterSet &)
 ~SiStripBadModuleByHandBuilder ()

Private Member Functions

SiStripBadStripgetNewObject ()

Private Attributes

std::vector< uint32_t > BadModuleList_
edm::FileInPath fp_
bool printdebug_
SiStripDetInfoFileReaderreader

Detailed Description

Definition at line 17 of file SiStripBadModuleByHandBuilder.h.


Constructor & Destructor Documentation

SiStripBadModuleByHandBuilder::SiStripBadModuleByHandBuilder ( const edm::ParameterSet iConfig) [explicit]
SiStripBadModuleByHandBuilder::~SiStripBadModuleByHandBuilder ( )

Definition at line 18 of file SiStripBadModuleByHandBuilder.cc.

                                                             {
}

Member Function Documentation

SiStripBadStrip * SiStripBadModuleByHandBuilder::getNewObject ( ) [private, virtual]

Implements ConditionDBWriter< SiStripBadStrip >.

Definition at line 21 of file SiStripBadModuleByHandBuilder.cc.

References BadModuleList_, SiStripBadStrip::encode(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), VarParsing::obj, printdebug_, SiStripBadStrip::put(), and reader.

                                                            {
  
  SiStripBadStrip* obj = new SiStripBadStrip();

  unsigned int firstBadStrip=0;
  unsigned short NconsecutiveBadStrips;
  unsigned int theBadStripRange; 

  for(std::vector<uint32_t>::const_iterator it=BadModuleList_.begin(); it!=BadModuleList_.end(); ++it){
    
    std::vector<unsigned int> theSiStripVector;
    
    NconsecutiveBadStrips=reader->getNumberOfApvsAndStripLength(*it).first*128;
    theBadStripRange = obj->encode(firstBadStrip,NconsecutiveBadStrips);
    if (printdebug_)
      edm::LogInfo("SiStripBadModuleByHandBuilder") << " BadModule " << *it << " \t"
                                                   << " firstBadStrip " << firstBadStrip << "\t "
                                                   << " NconsecutiveBadStrips " << NconsecutiveBadStrips << "\t "
                                                   << " packed integer " << std::hex << theBadStripRange  << std::dec
                                                   << std::endl;            
    
    theSiStripVector.push_back(theBadStripRange);
    SiStripBadStrip::Range range(theSiStripVector.begin(),theSiStripVector.end());
    if ( ! obj->put(*it,range) )
      edm::LogError("SiStripBadModuleByHandBuilder")<<"[SiStripBadModuleByHandBuilder::analyze] detid already exists"<<std::endl;
  }
  return obj;
}

Member Data Documentation

std::vector<uint32_t> SiStripBadModuleByHandBuilder::BadModuleList_ [private]

Definition at line 32 of file SiStripBadModuleByHandBuilder.h.

Referenced by getNewObject(), and SiStripBadModuleByHandBuilder().

Definition at line 30 of file SiStripBadModuleByHandBuilder.h.

Referenced by SiStripBadModuleByHandBuilder().

Definition at line 31 of file SiStripBadModuleByHandBuilder.h.

Referenced by getNewObject(), and SiStripBadModuleByHandBuilder().

Definition at line 33 of file SiStripBadModuleByHandBuilder.h.

Referenced by getNewObject(), and SiStripBadModuleByHandBuilder().