CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 mps_fire::i, and mps_fire::result.

Referenced by InefficientDoubleROC.InefficientDeadROCs::__TraverseDirTree(), tkal_create_file_lists.FileListCreator::_add_file_info(), cmssw_cycle_finder.Graph::_build_adjacency_list(), BeautifulSoup.PageElement::_invert(), Impl.pp.pp::alcaHarvesting(), JetCorrectorDBWriter::beginJob(), confdb.HLTProcess::buildOptions(), compareHistograms::compareMP(), bookConverter::compute(), edmStreamStallGrapher::consolidateContiguousBlocks(), pat::TauJetCorrFactors::correctionLabelString(), pat::JetCorrFactors::correctionLabelString(), plotscripts::corrections2D(), hgcalPlots::create_hgcalTrackstersPlotter(), validateAlignments::createMergeScript(), edmStreamStallGrapher::createModuleTiming(), edmStreamStallGrapher::createPDFImage(), plotscripts::curvatureDTsummary(), customiseCheckEventSetup::customise(), customiseEarlyDeleteForCandIsoDeposits::customiseEarlyDeleteForCandIsoDeposits(), customiseEarlyDeleteForSeeding::customiseEarlyDeleteForSeeding(), plotscripts::DBdiff(), getPayloadData::discover(), dqmCopyRecursively(), TauDQMHistEffProducer::dqmEndJob(), ntuplePlotting::drawMany(), PrintMaterialBudgetInfo::dumpElementMassFraction(), cmsHarvester.DBSXMLHandler::endElement(), TauDQMHistPlotter::endRun(), SequenceTypes._CopyAndExcludeSequenceVisitorOld::enter(), SequenceTypes._MutatingSequenceVisitor::enter(), Impl.AlCaTestEnable.AlCaTestEnable::expressProcessing(), Impl.trackingOnly.trackingOnly::expressProcessing(), Impl.cosmics.cosmics::expressProcessing(), Impl.pp.pp::expressProcessing(), Impl.HeavyIons.HeavyIons::expressProcessing(), TableParser::extractPages(), TableParser::extractPagesForPackage(), PatZToMuMuAnalyzer::fill(), CLIHelper.CLIHelper::fill_required_options_dict(), MainPageGenerator::fillContentTemplate(), edmConvertToStreamModule::find_all_module_classes(), EgammaHLTValidationUtils::findEgammaPaths(), gen::Py8PtAndDxyGun::generatePartonsAndHadronize(), gen::Py8PtGun::generatePartonsAndHadronize(), gen::Py8PtotGun::generatePartonsAndHadronize(), gen::Py8EGun::generatePartonsAndHadronize(), gen::Py8JetGun::generatePartonsAndHadronize(), gen::Py8MassGun::generatePartonsAndHadronize(), dqm-mbProfile::get_children(), web.app_utils::get_folders(), geometry.Alignables::get_ndiscriminator(), web.app_utils::get_release_summary_stats(), BeamSpotWorkflow::getListOfRunsAndLumiFromDBS(), PrintRecoObjects::getString(), histoStyle::graphProducer(), heppy_hadd::haddChunks(), overlapValidationPlot::hist(), cmsswSequenceInfo::inspectworkflows(), helpers::listDependencyChain(), generateEDF::loadEvents(), VarParsing.VarParsing::loadFromFile(), checkRuns::main(), utils_v2::make_file_pairs(), utils::make_files_pairs(), mps_list_evts::merge_datasets(), MultShiftMETcorrInputProducer::MultShiftMETcorrInputProducer(), python.rootplot.rootmath::newadd(), L1TMuonEndCapParamsOnlineProd::newObject(), L1TMuonGlobalParamsOnlineProd::newObject(), L1TMuonBarrelParamsOnlineProd::newObject(), L1TMuonOverlapFwVersionOnlineProd::newObject(), L1TCaloParamsOnlineProd::newObject(), L1TGlobalPrescalesVetosOnlineProd::newObject(), FileReaderDCC::open(), FileReaderDDU::open(), CSCDCCEventData::pack(), CSCDDUEventData::pack(), CSCTMBData::pack(), CSCEventData::pack(), CSCALCTHeader::pack(), bigModule::plot(), overlapValidationPlot::plot(), MatrixInjector.MatrixInjector::prepare(), bookConverter::priorities(), Impl.cosmics.cosmics::promptReco(), Impl.pp.pp::promptReco(), Impl.HeavyIons.HeavyIons::promptReco(), psClasses.BuildThread::putInServerQueue(), plotBaryCentre_VS_BeamSpot::readBaryCentreAnalyzerTree(), CommonMethods::readBeamSpotFile(), python.readProv.filereader::readfile(), createFEDtable::retrieveFedEntries(), heppy_report::root2map(), plotBaryCentre_VS_BeamSpot::Run(), production_tasks.MonitorJobs::run(), production_tasks.WriteJobReport::run(), production_tasks.CleanJobFiles::run(), validateAlignments.ValidationJobMultiIOV::runCondorJobs(), validateAlignments.ValidationJob::runJob(), MatrixUtil::selectedLS(), BeamSpotWorkflow::selectFilesToProcess(), jsoncollector::DataPoint::serialize(), cmsswSequenceInfo::serve(), cmsswConfigtrace::serve_main(), VarParsing.VarParsing::setDefault(), edmIntegrityCheck.IntegrityCheck::sortByBaseDir(), edmIntegrityCheck.IntegrityCheck::stripDuplicates(), edmIntegrityCheck.IntegrityCheck::structured(), DictTypes.TestDictTypes::testFixedKeysDict(), cmsswConfigtrace::trace_location(), Impl.cosmics.cosmics::visualizationProcessing(), Impl.pp.pp::visualizationProcessing(), and Impl.HeavyIons.HeavyIons::visualizationProcessing().

10  {
11  boost::dynamic_bitset<> result(bs1.size() + bs2.size());
12  unsigned size1 = bs1.size();
13  for (unsigned i = 0; i < size1; ++i) {
14  result[i] = bs1[i];
15  }
16  for (unsigned i = 0; i < bs2.size(); ++i) {
17  result[size1 + i] = bs2[i];
18  }
19  return result;
20  }
tuple result
Definition: mps_fire.py:311
void bitset_utilities::bitsetToChar ( const boost::dynamic_bitset<> &  bs,
unsigned char *  result 
)

this method takes bitset obj and returns char * array

Definition at line 32 of file bitset_append.cc.

References mps_fire::i.

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

32  {
33  for (unsigned i = 0; i < bs.size(); ++i) {
34  result[i / 8] = (bs[i + 7] << 7) + (bs[i + 6] << 6) + (bs[i + 5] << 5) + (bs[i + 4] << 4) + (bs[i + 3] << 3) +
35  (bs[i + 2] << 2) + (bs[i + 1] << 1) + bs[i];
36  i += 7;
37  }
38  }
tuple result
Definition: mps_fire.py:311
void bitset_utilities::printWords ( const boost::dynamic_bitset<> &  bs)

Definition at line 40 of file bitset_append.cc.

References bitsetToChar(), visDQMUpload::buf, mps_fire::i, and gpuVertexFinder::printf().

Referenced by cscClassPackerCompare().

40  {
41  constexpr unsigned int nShorts = 30000;
42  unsigned char words[nShorts * 2];
43  bitsetToChar(bs, words);
44  unsigned short *buf = (unsigned short *)words;
45  for (int unsigned i = 0; i < bs.size() / 16 && i + 3 < nShorts; ++i) {
46  printf("%04x %04x %04x %04x\n", buf[i + 3], buf[i + 2], buf[i + 1], buf[i]);
47  i += 3;
48  }
49  }
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
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 23 of file bitset_append.cc.

References mps_fire::i, and mps_fire::result.

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

23  {
24  boost::dynamic_bitset<> result(numberOfBits);
25  for (unsigned i = 0; i < result.size(); ++i) {
26  result[i] = (buf[i / 16] >> (i % 16)) & 0x1;
27  }
28  return result;
29  }
tuple result
Definition: mps_fire.py:311