Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

idep_ldep.cxx File Reference

#include "idep_linkdep.h"
#include "idep_namearray.h"
#include "idep_nameindexmap.h"
#include "idep_binrel.h"
#include "idep_string.h"
#include "idep_tokeniter.h"
#include "idep_aliastable.h"
#include "idep_aliasutil.h"
#include <cmath>
#include <ctype.h>
#include <cstring>
#include <memory>
#include <fstream>
#include <sstream>
#include <iostream>
#include <cassert>

Go to the source code of this file.

Classes

struct  idep_LinkDep_i
struct  idep_AliasIter_i
struct  idep_UnaliasIter_i
struct  idep_CycleIter_i
struct  idep_MemberIter_i
struct  idep_LevelIter_i
struct  idep_ComponentIter_i
struct  idep_DependencyIter_i

Typedefs

typedef int FmtFlags_t

Functions

std::ostream & warn (std::ostream &ing, int index)
std::ostream & err (std::ostream &orr)
const char * stripDotSlash (const char *originalPath)
int isLocal (const char *dirFile)
char * removeFileName (char *dirPath)
char * removeSuffix (char *dirPath)
int digits (int n)
double logBase2 (double x)
double ccdBalencedBinaryTree (int n)
const char * s (int n)
std::ostream & operator<< (std::ostream &o, const idep_LinkDep &dep)


Typedef Documentation

typedef int FmtFlags_t
 

Definition at line 26 of file idep_ldep.cxx.

Referenced by idep_LinkDep::printLevels(), and idep_LinkDep::printSummary().


Function Documentation

double ccdBalencedBinaryTree int  n  )  [static]
 

Definition at line 100 of file idep_ldep.cxx.

References logBase2().

Referenced by idep_LinkDep::nccd().

00101 {
00102     // CCD(n)         = (n + 1) * (log (n + 1) - 1) + 1
00103     //       balanced                 2
00104     //       binary
00105     //       tree
00106 
00107     assert(n >= 0);
00108     return (n + 1) * (logBase2(n + 1) - 1) + 1;
00109 }

int digits int  n  )  [static]
 

Definition at line 79 of file idep_ldep.cxx.

Referenced by idep_LinkDep::printLevels(), AlgChopListSharp2::RunAlg(), AlgChopListSharp::RunAlg(), AlgChopListPerfectMC::RunAlg(), AlgChopListMitre::RunAlg(), AlgChopListGeneric::RunAlg(), and AlgChopListFar::RunAlg().

00080 {
00081     int fieldWidth = 10;
00082     assert (sizeof (long int) >= 4);
00083     long int x = 1000 * 1000 * 1000;    // requires 4-byte integer.
00084     while (fieldWidth > 1 && 0 == n / x) {
00085         --fieldWidth;
00086         x /= 10;
00087     }
00088     return fieldWidth;
00089 }

std::ostream& err std::ostream &  orr  )  [static]
 

Definition at line 38 of file idep_ldep.cxx.

00039 {
00040     return orr << "Error: ";
00041 }

int isLocal const char *  dirFile  )  [static]
 

Definition at line 53 of file idep_ldep.cxx.

Referenced by idep_LinkDep_i::entry().

00054 {
00055     return !strchr(dirFile, '/');
00056 }

double logBase2 double  x  )  [static]
 

Definition at line 91 of file idep_ldep.cxx.

Referenced by ccdBalencedBinaryTree().

00092 {
00093     // log (x) = ln(x)/ln(a) 
00094     //    a
00095 
00096     assert(x > 0.0);
00097     return log(x)/log(2);
00098 }

std::ostream& operator<< std::ostream &  o,
const idep_LinkDep dep
 

Definition at line 1110 of file idep_ldep.cxx.

01111 {
01112     dep.printAliases(o);
01113     dep.printUnaliases(o);
01114     dep.printCycles(o);
01115     dep.printLevels(o, 1);
01116     dep.printSummary(o);
01117     return o;
01118 }

char* removeFileName char *  dirPath  )  [static]
 

Definition at line 58 of file idep_ldep.cxx.

Referenced by idep_LinkDep_i::entry().

00059 {
00060     char *slash = strrchr(dirPath, '/');
00061     if (slash) {
00062         slash[1] = '\0';
00063     }
00064     else {
00065         dirPath[0] = '\0';
00066     }
00067     return dirPath;
00068 }

char* removeSuffix char *  dirPath  )  [static]
 

Definition at line 70 of file idep_ldep.cxx.

Referenced by idep_LinkDep_i::entry(), idep_AliasDep::extract(), idep_AliasDep::unpaired(), and idep_AliasDep::verify().

00071 {
00072     char *dot = strrchr(dirPath, '.');
00073     if (dot && !strchr(dot, '/')) {
00074         dot[0] = '\0';
00075     }
00076     return dirPath;
00077 }

const char* s int  n  )  [inline]
 

Definition at line 984 of file idep_ldep.cxx.

Referenced by add_box(), JobCEnv::AddDataFile(), TridControl::AddHistograms(), JobCEnv::AddMacroFile(), UberRecordLite::AddNextCosmicHit(), UberEvent::AddNextCosmicHit(), UberRecordLite::AddNextHit(), UberRecord::AddNextHit(), UberMC::AddNextHit(), UberEvent::AddNextHit(), DemoSnarlList::AddRunSnarl(), SimElectronics::AddSignal(), TempReader::AddTemps(), RegistryValidate::AddToRegistry(), alloc(), TestSwimmer::Ana(), DmxDeMuxCosmicsModule::Ana(), CompareMD::Ana(), CompareAll::Ana(), ChopModule::Ana(), MeuCuts::AnalyseCoilProximity(), ANtpShowerInfoAna::Analyze(), ANtpEventInfoAna::Analyze(), DbiStatement::AppendExceptionLog(), CandCalDetPIDHandle::AsString(), CalDetParticleType::AsString(), TiXmlElement::Attribute(), MeuAnalysis::BasicPlots(), MeuAnalysis::BasicReco(), AlgAltDeMuxBase::BestGuessForSingleSidedHits(), CalADCtoPE::CalADCtoPE(), MeuReco::CalcFCPC(), LITuning::CalcLastGcPointAdc(), MeuReco::CalcLPos(), MeuReco::CalcMEU(), MeuReco::CalcPLCor(), MeuReco::CalcPosOfBigGaps(), MeuReco::CalcPosOfGaps(), MeuReco::CalcPosOfTrkEndGaps(), NuHistos::CalcPOTsFromHistos(), MeuReco::CalcStripDists(), MeuReco::CalcTrace(), idep_CompileDep::calculate(), AlgTrackCam::CalculateTimingFits(), MeuReco::CalcVtx(), MeuReco::CalcVtxSpecialND(), MeuReco::CalcWindow(), MeuPlots::CalibrationGroupEnergyCorrections(), CalMapperFits::CalMapperFits(), CalMIPCalibration::CalMIPCalibration(), CalTimeCalibration::CalTimeCalibration(), CDTrackerOptions::CDTrackerOptions(), MeuCuts::CheckTrkViews(), MeuReco::CheckWinContainment(), AlgAltDeMuxBase::CleanIsolatedHits(), PlaneOutline::ClosestPointToSegment(), CalHelpers::ComputeSine(), SimDetector::Config(), OltNewModule::Config(), OltDataIntegrity::Config(), Coroner::Config(), GfxStripList::Configure(), GfxDigitList::Configure(), GuiToggledSubMenu::Connect(), GuiToggledMenuItem::Connect(), GuiMenuEntry::Connect(), BeamEnergyCalculator::ConstructName(), MeuCuts::ConvertToXY(), MeuReco::ConvertToXYZ(), SimPixelTimeBucket::CreateSignal(), createSpillTables(), StripListKG::CreateStrips(), PhotonStatSummarizer::CreateTables(), CreateTables(), DbiDemoData1::DbiDemoData1(), DCHit::DCHit(), Dcs_Chiller_Far::Dcs_Chiller_Far(), Dcs_Rps::Dcs_Rps(), CDSimpleMC::dE_dxIterative(), CDAnalysis::dE_dxIterative(), UberPlotsModule::DefaultConfig(), Cutter::DefaultConfig(), CalDet2003PlotsModule::DefaultConfig(), DemuxFast::DemuxBigGroup(), AlgAltDeMuxBase::DeMuxBigGroup(), DemuxFast::DemuxSingles(), AlgAltDeMuxBase::DeMuxSingles(), PlaneOutline::DepthInView(), PlaneOutline::DepthInViewHist(), UgliStripNode::DistanceAlong(), GeoStripNode::DistanceAlong(), CorrGauss::DoCholesky(), DrawString(), MeuPlots::DriftCalibrate(), MeuPlots::DriftDecalTwice(), dump_keys(), LIPlexMaps::DumpCalStripAtten(), MadTVAnalysis::EarlyActivity(), MadMKAnalysis::EarlyActivity(), LISummaryModule::EndJob(), GfxStripList::ExecuteEvent(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), GfxStripList::ExecuteEventStrip(), MeuCuts::ExtractPlInfo(), MeuCuts::ExtractTruthInfo(), f0(), MeuCuts::FillBeamMonDetails(), MeuCuts::FillEnVsDist(), MeuCuts::FillEnVsDist2(), MSTCalcAna::FillHitSets(), MeuHistos::FillMeuHistos(), MeuSummaryWriter::FillMeuHitInfo(), RegistryValidate::FillRegistry(), MeuCuts::FillSTSumDetails(), MeuCuts::FillSTSumRecoDetails(), MeuCuts::FillTimeHistos(), MeuCuts::FilterBadDistEndStrip(), MeuCuts::FilterBadEndGaps(), MeuCuts::FilterBadShwDist(), MeuCuts::FilterBadTrackEnd(), MeuCuts::FilterBadTrkTimes(), MeuCuts::FilterBadXY(), MeuAnalysis::FilterLI(), MeuCuts::FilterLowMatTraversed(), AlgSubShowerSRList::FindCluster(), FitNdNonlinQuad(), HardwareType::FromString(), LIAnalysis::GainCurves_Led(), DbiAsciiTablePreparer::GET(), AutoPIDMaker::Get(), MeuCuts::GetBDSelectSpillInfo(), EnergyCorrections::GetCorrectionAsString(), MeuAnalysis::GetFirstFileName(), BeamEnergyCalculator::GetHist(), QuadLinearityCalScheme::GetLinearized(), NuInputEvents::GetListOfFilesInDir(), PlotMan::GetLoud(), AlignmentRunSummary::GetSubsetMean(), AlignmentRunSummary::GetSubsetSigma(), AlignmentRunSummary::GetSubsetSize(), AlignmentRunSummary::GetSubsetSum(), LISummaryModule::GetSummaryBlocks(), MeuAnalysis::GetTemperature(), MadUtilities::GetTotEntries(), TGeant3::GetTransformation(), glfConsoleDraw(), glfDraw3DSolidString(), glfDraw3DSolidStringF(), glfDraw3DSolidSymbol(), glfDraw3DSolidSymbolF(), glfDraw3DWiredString(), glfDraw3DWiredStringF(), glfDraw3DWiredSymbolF(), glfDrawBMaskString(), glfDrawBMaskSymbol(), glfDrawBString(), glfDrawBSymbol(), glfDrawSolidString(), glfDrawSolidStringF(), glfDrawSolidSymbol(), glfDrawSolidSymbolF(), glfDrawWiredString(), glfDrawWiredStringF(), glfDrawWiredSymbolF(), glfGetStringBounds(), glfGetStringBoundsF(), glfPrint(), glfPrintChar(), glfPrintString(), StupidStripHandle::GlobalPos(), JobCInput::GoTo(), GuiSlider::GuiSlider(), PTSimModule::HandleCommand(), MCInitModule::HandleCommand(), IoOutputModule::HandleCommand(), idep_AliasDepString::idep_AliasDepString(), MultiPage::Init(), EVD::Init(), SwimGeo::InitNearInnerCollar(), SwimGeo::InitNearOuterCollar(), GuiMenu::Insert(), UgliStripNode::Intersection(), IoFileListItem::IoFileListItem(), MeuCuts::IsAwayFromCoil(), MeuCuts::IsCorrectTrigSrc(), JobCommand::IsFloat(), CfgPromptConfigurable::IsFloat(), JobCommand::IsInt(), CfgPromptConfigurable::IsInt(), RecRecordImp< T >::IsPersistedToOutputStream(), RecMinos::IsPersistedToOutputStream(), JobCEnvSetenv(), PerInputStream::ListFile(), IoDataStreamItr::ListFile(), LISummaryAnalyser::LISummaryAnalyser(), PhotonStatSummarizer::LoadDataFromDB(), main(), make_name(), CompareMD::MakeIdString(), CompareAll::MakeIdString(), DemuxFast::MakeMap(), MadAbID::MakeRecoVariables(), MeuAnalysis::MakeSummaryTreeWithAtNu(), MeuAnalysis::MakeSummaryTreeWithNtpStOneSnarl(), HistoDisplay::MenuHelp(), Registry::Merge(), TridPage::MouseOver(), MsgG4OStream::MsgG4OStream(), MsgG4OStream::MsgG4OStreamMaker(), myfped_1gauss(), mypefit(), MeuAnalysis::N_1Plots(), nutation_angles(), Registry::RegistryKey::operator()(), operator<<(), Registry::operator=(), parseCfg(), LIAnalysis::PinMap(), PlaneData::PlaneData(), MeuAnalysis::PlaneIsWithinTrack(), DbiSimFlagAssociation::Print(), CDAnalysis::PrintBasicInfo(), MeuReco::PrintContainment(), MeuReco::PrintMeuSummary(), idep_LinkDep::printSummary(), JobCEnv::ProcessCommandLine(), TConsumerInfo::psa::psa(), PySwigPacked_compare(), JobCDialog::Querry(), CfgDialog::Query(), AutoPIDMaker::RCtoMap(), MadEvDisplay::ReadEventsFile(), JobController::ReadMacroFile(), MeuAnalysis::Recalibrate(), MeuAnalysis::RecalibrateAtNu(), OltNewModule::Reco(), ANtpTrackInfoAna::RecoMuEnergy(), MeuReco::Reconstruct(), ANtpShowerInfoAna::RecoShwEnergy(), refract(), Registry::Registry(), Cfg::RegistryToString(), IoFileListItem::RemoveFile(), DemoSnarlList::RemoveRunSnarl(), AlgTrackAtNu::RunAlg(), AlgFitTrackAtNu::RunAlg(), search(), DemuxFast::SelectHits(), AlgAltDeMuxBase::SelectHits(), JobCModule::Set(), CfgConfigurable::Set(), MsgService::SetGlobalLevel(), JobCMsgModule::SetLevel(), PlotMan::SetLoud(), NmOdeInt::SetMinStepSize(), NmOdeInt::SetScales(), MeuCuts::SetSpecificCuts(), SwimSwimmer::SetStepper(), NmOdeInt::SetStepSize(), JobCEnv::SetTimeLimit(), CDTrackerOptions::SetTrackerOptions(), setupConfig(), SwimDefStepper::SetUpIntegrator(), Shwfit::Shwfit(), MeuAnalysis::SnarlList(), MeuAnalysis::SpillPlots(), StringUtil::SplitString(), MsgService::StackTrace(), CDAnalysis::StoppingMuonCalibration(), str_querry(), Cfg::StringToRegistry(), stripDir(), strstrn(), SWIG_TypeCheck(), SWIG_TypePrettyName(), AlgFitTrackSR::Swim(), SwimObj3::SwimTo(), BeamType::TagToEnum(), terra(), inuke_reweight::test_fill_stdhep(), IoInputModuleValidate::TestAdd(), MsgStreamValidate::TestMsgStreamManipulators(), MsgStreamValidate::TestMsgStreamStreamers(), IoInputModuleValidate::TestRemove(), AlgFitTrackCam::TimingFit(), TimingVars::TimingVars(), LatticeBase::topologyText(), TCL::traat(), TCL::tras(), TCL::trasat(), TCL::trats(), TCL::tratsa(), StringUtil::trim(), TCL::trinv(), TCL::trpck(), TCL::trqsq(), TCL::trsa(), TCL::trsat(), TCL::trsequ(), TCL::trsmlu(), TCL::trupck(), TxtEntry::TxtEntry(), unpad(), idep_AliasDep::unpaired(), Validate(), AlgAltDeMuxBase::ValidatePlaneAgainstTarget(), HitCalcAna::VarCalc(), EnergyCorrections::VersionFromFilename(), idep_BinRel::warshall(), PlaneOutline::WhereIntersect(), BeamDataImp::words(), write_cxx(), and yn_querry().

00984 { return (n == 1) ? "" : "s"; }

const char* stripDotSlash const char *  originalPath  )  [static]
 

Definition at line 43 of file idep_ldep.cxx.

Referenced by idep_LinkDep::addUnaliasDirectory(), and search().

00044 {
00045     if (originalPath) {
00046         while ('.' == originalPath[0] && '/' == originalPath[1]) {
00047             originalPath += 2;
00048         }
00049     }
00050     return originalPath;
00051 }

std::ostream& warn std::ostream &  ing,
int  index
[static]
 

Definition at line 33 of file idep_ldep.cxx.

Referenced by idep_AliasDep::extract(), idep_LinkDep::printCycles(), and idep_AliasDep::unpaired().

00034 {
00035     return ing << "Warning<" << index << ">: "; // '<' and '>' match cycle  
00036 }


Generated on Thu Nov 1 11:54:48 2007 for loon by  doxygen 1.3.9.1