CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
bitset_utilities Namespace Reference

this file contains additional dynamic_bitset methods More...

Functions

boost::dynamic_bitset append (const boost::dynamic_bitset<> &bs1, const boost::dynamic_bitset<> &bs2)
 this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1 More...
 
void bitsetToChar (const boost::dynamic_bitset<> &bs, unsigned char *result)
 this method takes bitset obj and returns char * array More...
 
void printWords (const boost::dynamic_bitset<> &bs)
 
boost::dynamic_bitset ushortToBitset (const unsigned int numberOfBits, unsigned short *buf)
 this method takes numberOfBits bits from unsigned short * array and returns them in the bitset obj. More...
 

Detailed Description

this file contains additional dynamic_bitset methods

Function Documentation

boost::dynamic_bitset bitset_utilities::append ( const boost::dynamic_bitset<> &  bs1,
const boost::dynamic_bitset<> &  bs2 
)

this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1

Definition at line 10 of file bitset_append.cc.

References i, and query::result.

Referenced by cfg-viewer.visitor::_doModules(), cmsPerfSuiteHarvest::_eventContent_DEBUG(), BeautifulSoup.PageElement::_invert(), EmbeddingKineReweightNtupleProducer::addBranch_EnPxPyPz(), EmbeddingKineReweightNtupleProducer::addBranch_MEtResProjections(), Vispa.Main.SplitterTab.SplitterToolBar::addWidgetToSection(), ModuleToSequenceAssign::assignModulesToSeqs(), lumiCalcAPI::beamForIds(), lumiCalcAPI::beamForRange(), lumiQueryAPI::beamIntensityForRun(), METCorrectorDBWriter::beginJob(), JetCorrectorDBWriter::beginJob(), confdb::buildOptions(), bookConverter::compute(), pat::TauJetCorrFactors::correctionLabelString(), pat::JetCorrFactors::correctionLabelString(), plotscripts::corrections2D(), HcalLutManager::create_lut_loader(), XMLLUTLoader::createLoader(), XMLHTRPatternLoader::createLoader(), validateAlignments::createMergeScript(), edmStreamStallGrapher::createPDFImage(), plotscripts::curvatureDTsummary(), customiseCheckEventSetup::customise(), plotscripts::DBdiff(), lumiCalcAPI::deliveredLumiForIds(), dqmCopyRecursively(), PrintMaterialBudgetInfo::dumpElementMassFraction(), cmsHarvester.DBSXMLHandler::endElement(), TauDQMHistEffProducer::endRun(), TauDQMHistPlotter::endRun(), cfg-viewer.visitor::enter(), SequenceTypes._CopyAndExcludeSequenceVisitorOld::enter(), SequenceTypes._MutatingSequenceVisitor::enter(), cmsPerfSuiteHarvest::exportIgProfReport(), cmsPerfSuiteHarvest::exportMemcheckReport(), cmsPerfSuiteHarvest::exportTimeSizeJob(), Impl.cosmicsRun2.cosmicsRun2::expressProcessing(), Impl.cosmics.cosmics::expressProcessing(), Impl.ppRun2at50ns.ppRun2at50ns::expressProcessing(), Impl.ppRun2B0T.ppRun2B0T::expressProcessing(), Impl.ppRun2.ppRun2::expressProcessing(), Impl.pp.pp::expressProcessing(), Impl.HeavyIons.HeavyIons::expressProcessing(), Impl.HeavyIonsRun2.HeavyIonsRun2::expressProcessing(), TableParser::extractPages(), TableParser::extractPagesForPackage(), PatZToMuMuAnalyzer::fill(), MainPageGenerator::fillContentTemplate(), dataDML::fillInRange(), dataDML::fillrunMap(), edmConvertToStreamModule::find_all_module_classes(), EgammaHLTValidationUtils::findEgammaPaths(), gen::Py8JetGun::generatePartonsAndHadronize(), gen::Py8PtGun::generatePartonsAndHadronize(), gen::Py8EGun::generatePartonsAndHadronize(), dqm-mbProfile::get_children(), web.app_utils::get_folders(), o2o::get_iovs(), web.app_utils::get_release_summary_stats(), o2o::get_tags(), HcalQIEManager::getHfQieTable(), BeamSpotWorkflow::getListOfRunsAndLumiFromDBS(), specificLumi::getSpecificLumi(), PrintRecoObjects::getString(), HcalQIEManager::getTableFromDb(), histoStyle::graphProducer(), heppy_hadd::haddChunks(), cacheconfigParser.cacheconfigParser::handleFrontierConnect(), lumiCalcAPI::hltForIds(), lumiCalcAPI::hltpathsForRange(), generateEDF::loadEvents(), VarParsing.VarParsing::loadFromFile(), EmbeddingKineReweightProducer::lutEntryType::lutEntryType(), MuonRadiationCorrWeightProducer::lutEntryType::lutEntryType(), checkRuns::main(), main(), utils_v2::make_file_pairs(), utils::make_files_pairs(), mps_list_evts::merge_datasets(), MultShiftMETcorrInputProducer::MultShiftMETcorrInputProducer(), EnablePSetHistory::new__place(), EnablePSetHistory::new__placeLooper(), EnablePSetHistory::new__placeService(), EnablePSetHistory::new__placeSource(), EnablePSetHistory::new_addAction(), EnablePSetHistory::new_setLooper_(), EnablePSetHistory::new_setSchedule_(), python.rootplot.rootmath::newadd(), cmsPerfStripChart::operate(), CSCDCCEventData::pack(), CSCDDUEventData::pack(), CSCTMBData::pack(), CSCEventData::pack(), CSCALCTHeader::pack(), parserPerfsuiteMetadata.parserPerfsuiteMetadata::parseAllOtherTests(), matplotRender.matplotRender::plotPeakPerday_Time(), matplotRender.matplotRender::plotPerdayX_Time(), matplotRender.matplotRender::plotSumX_Fill(), matplotRender.matplotRender::plotSumX_Run(), matplotRender.matplotRender::plotSumX_Time(), MatrixInjector.MatrixInjector::prepare(), bookConverter::priorities(), create_public_peakpu_plots::processdata(), parserTimingReport::processModuleTimeLogData(), Impl.hcalnzsRun2.hcalnzsRun2::promptReco(), Impl.cosmicsRun2.cosmicsRun2::promptReco(), Impl.cosmics.cosmics::promptReco(), Impl.ppRun2B0T.ppRun2B0T::promptReco(), Impl.ppRun2.ppRun2::promptReco(), Impl.ppRun2at50ns.ppRun2at50ns::promptReco(), Impl.pp.pp::promptReco(), Impl.HeavyIons.HeavyIons::promptReco(), Impl.HeavyIonsRun2.HeavyIonsRun2::promptReco(), psClasses.BuildThread::putInServerQueue(), CommonMethods::readBeamSpotFile(), python.readProv.filereader::readfile(), heppy_report::root2map(), production_tasks.MonitorJobs::run(), production_tasks.WriteJobReport::run(), production_tasks.CleanJobFiles::run(), lumiQueryAPI::runsByfillrange(), MatrixUtil::selectedLS(), BeamSpotWorkflow::selectFilesToProcess(), jsoncollector::DataPoint::serialize(), VarParsing.VarParsing::setDefault(), EmbeddingKineReweightNtupleProducer::setValue_EnPxPyPz(), EmbeddingKineReweightNtupleProducer::setValue_MEtResProjections(), edmIntegrityCheck.IntegrityCheck::sortByBaseDir(), specificLumi::specificlumiTofile(), edmIntegrityCheck.IntegrityCheck::stripDuplicates(), edmIntegrityCheck.IntegrityCheck::structured(), DictTypes.TestDictTypes::testFixedKeysDict(), lumiReport::toScreenLSEffective(), lumiReport::toScreenLSTrg(), lumiReport::toScreenLumiByLS(), lumiReport::toScreenTotEffective(), lumiCalcAPI::trgForIds(), queryDataSource::trgFromOldLumi(), dataDML::trgLSById(), Vispa.Gui.VispaWidget.TextField::truncate(), lumiQueryAPI::validation(), Impl.cosmics.cosmics::visualizationProcessing(), Impl.cosmicsRun2.cosmicsRun2::visualizationProcessing(), Impl.ppRun2B0T.ppRun2B0T::visualizationProcessing(), Impl.ppRun2at50ns.ppRun2at50ns::visualizationProcessing(), Impl.ppRun2.ppRun2::visualizationProcessing(), Impl.pp.pp::visualizationProcessing(), Impl.HeavyIons.HeavyIons::visualizationProcessing(), Impl.HeavyIonsRun2.HeavyIonsRun2::visualizationProcessing(), and ZmumuEvtSelEffCorrWeightProducer::ZmumuEvtSelEffCorrWeightProducer().

12  {
13  boost::dynamic_bitset<> result(bs1.size()+bs2.size());
14  unsigned size1 = bs1.size();
15  for(unsigned i = 0; i < size1; ++i)
16  {
17  result[i] = bs1[i];
18  }
19  for(unsigned i = 0; i < bs2.size(); ++i)
20  {
21  result[size1+i] = bs2[i];
22  }
23  return result;
24  }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: query.py:137
void bitset_utilities::bitsetToChar ( const boost::dynamic_bitset<> &  bs,
unsigned char *  result 
)

this method takes bitset obj and returns char * array

Definition at line 40 of file bitset_append.cc.

References i.

Referenced by CSCDigiToRaw::createFedBuffers(), cscClassPackerCompare(), cscPackAndUnpack(), CSCALCTHeader::pack(), and printWords().

41  {
42  for(unsigned i = 0; i < bs.size(); ++i)
43  {
44  result[i/8] = (bs[i+7]<<7)+
45  (bs[i+6]<<6)+
46  (bs[i+5]<<5)+
47  (bs[i+4]<<4)+
48  (bs[i+3]<<3)+
49  (bs[i+2]<<2)+
50  (bs[i+1]<<1)+
51  bs[i];
52  i+=7;
53  }
54  }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: query.py:137
void bitset_utilities::printWords ( const boost::dynamic_bitset<> &  bs)

Definition at line 56 of file bitset_append.cc.

References bitsetToChar(), and i.

Referenced by cscClassPackerCompare().

57  {
58  unsigned char words[60000];
59  bitsetToChar(bs, words);
60  unsigned short * buf= (unsigned short *) words;
61  for (int unsigned i=0;i<bs.size()/16;++i) {
62  printf("%04x %04x %04x %04x\n",buf[i+3],buf[i+2],buf[i+1],buf[i]);
63  i+=3;
64  }
65  }
int i
Definition: DBlmapReader.cc:9
void bitsetToChar(const boost::dynamic_bitset<> &bs, unsigned char *result)
this method takes bitset obj and returns char * array
boost::dynamic_bitset bitset_utilities::ushortToBitset ( const unsigned int  numberOfBits,
unsigned short *  buf 
)

this method takes numberOfBits bits from unsigned short * array and returns them in the bitset obj.

Definition at line 27 of file bitset_append.cc.

References i, and query::result.

Referenced by CSCDCCEventData::pack(), CSCDDUEventData::pack(), CSCTMBData::pack(), CSCEventData::pack(), and CSCALCTHeader::pack().

29  {
30  boost::dynamic_bitset<> result(numberOfBits);
31  for(unsigned i = 0; i < result.size(); ++i)
32  {
33  result[i] = (buf[i/16]>>(i%16)) & 0x1;
34  }
35  return result;
36  }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: query.py:137