CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
TreeCrawler.Package Class Reference
Inheritance diagram for TreeCrawler.Package:

Public Member Functions

def __init__ (self, name, top=False)
 
def dump
 
def search (self, pattern, result)
 

Public Attributes

 dependencies
 
 hit
 
 module
 
 name
 
 searched
 
 stack
 

Detailed Description

Definition at line 52 of file TreeCrawler.py.

Constructor & Destructor Documentation

◆ __init__()

def TreeCrawler.Package.__init__ (   self,
  name,
  top = False 
)

Definition at line 53 of file TreeCrawler.py.

53  def __init__(self,name,top=False):
54  self.name = name
55  self.dependencies = []
56  self.searched = False
57  self.stack = []
58  if top:
59  self.module = None
60  else:
61  self.module = __import__(name,[],[],"*")
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ dump()

def TreeCrawler.Package.dump (   self,
  level 
)

Definition at line 62 of file TreeCrawler.py.

References TreeCrawler.Package.dependencies, AlignableObjectId::entry.name, TmModule.name, cond::persistency::TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::RUN_INFO::END_TIME.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::O2O_RUN::JOB_NAME.name, cond::persistency::TAG::DESCRIPTION.name, cms::dd::NameValuePair< T >.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::O2O_RUN::START_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::O2O_RUN::END_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, FWTGeoRecoGeometry::Info.name, cond::persistency::O2O_RUN::STATUS_CODE.name, cond::persistency::TAG::MODIFICATION_TIME.name, cond::persistency::O2O_RUN::LOG.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::PROTECTION_CODE.name, OutputMEPSet.name, PixelDCSObject< T >::Item.name, AlignmentConstraint.name, cms::dd::ValuePair< T, U >.name, personalPlayback.Applet.name, cond::persistency::GTProxyData.name, SingleObjectCondition.name, edm::PathTimingSummary.name, cms::DDAlgoArguments.name, EgHLTOfflineSummaryClient::SumHistBinData.name, cond::TimeTypeSpecs.name, edm::PathSummary.name, lumi::TriggerInfo.name, XMLProcessor::_loaderBaseConfig.name, PixelEndcapLinkMaker::Item.name, MEtoEDM< T >::MEtoEDMObject.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, ExpressionHisto< T >.name, DQMGenericClient::EfficOption.name, TreeCrawler.Package.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cms::DDParsingContext::CompositeMaterial.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, cond::Tag_t.name, dqmoffline::l1t::HistDefinition.name, DQMGenericClient::ProfileOption.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, FastHFShowerLibrary.name, h4DSegm.name, DQMGenericClient::NormOption.name, DQMGenericClient::CDOption.name, CounterChecker.name, cond::TagInfo_t.name, TrackerSectorStruct.name, MuonGeometrySanityCheckPoint.name, PhysicsTools::Calibration::Variable.name, cond::persistency::PAYLOAD::HASH.name, EDMtoMEConverter.name, DQMGenericClient::NoFlowOption.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, Mapper::definition< ScannerT >.name, cond::persistency::PAYLOAD::DATA.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, cond::persistency::PAYLOAD::VERSION.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, classes.MonitorData.name, HistogramManager.name, classes.OutputData.name, h2DSegm.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, cond::persistency::IOV::INSERTION_TIME.name, DQMNet::WaitObject.name, geometry.Structure.name, SiStripMonitorDigi.name, nanoaod::FlatTable::Column.name, StraightTrackAlignment::RPSetPlots.name, cond::persistency::TAG_AUTHORIZATION::TAG_NAME.name, cond::persistency::TAG_AUTHORIZATION::ACCESS_TYPE.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL_TYPE.name, cond::payloadInspector::TagReference.name, cond::persistency::TAG_LOG::TAG_NAME.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, cond::persistency::TAG_LOG::USER_TEXT.name, personalPlayback.FrameworkJob.name, plotscripts.SawTeethFunction.name, crabFunctions.CrabTask.name, cscdqm::ParHistoDef.name, hTMaxCell.name, print(), and jetUpdater_cfi.sort.

62  def dump(self,level:int):
63  indent = " " * level
64  print(indent, "+", Color.info, self.name, Color.none)
65  # sort dependencies alphabetically
66  self.dependencies.sort(key = lambda x: x.name)
67  for package in self.dependencies:
68  package.dump(level+1)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ search()

def TreeCrawler.Package.search (   self,
  pattern,
  result 
)
recursive search for pattern in source files

Definition at line 69 of file TreeCrawler.py.

References TrackerTreeVariables.module, PixelToFEDAssociate::DetectorRocId.module, ShallowClustersProducer::moduleVars.module, edm::ELextendedID.module, edm::ErrorSummaryEntry.module, ErrorSummaryMapKey.module, edm::messagelogger::ErrorSummaryEntry.module, TreeCrawler.Package.module, TkOffTreeVariables.module, FWPSetTableManager::PSetData.module, PixelMapPlotter.Barrel.module, TreeCrawler.packageNameFromFilename(), and TreeCrawler.Package.searched.

69  def search(self,pattern,result):
70  """ recursive search for pattern in source files"""
71  # first start searching in the package itself / do this only once
72  if self.module:
73  for number, line in enumerate(inspect.getsource(self.module).splitlines()):
74  if pattern in line:
75  filename = packageNameFromFilename(inspect.getsourcefile(self.module))
76  if not self.searched:
77  # save the hit, so we can add later stacks to it
78  self.hit = SearchHit()
79  self.hit.number = number
80  self.hit.filename = filename
81  self.hit.line = line
82  self.hit.stacks = list()
83  result.append(self.hit)
84  self.hit.stacks.append(copy.copy(_stack))
85  # then go on with dependencies
86  _stack.append(self.name)
87  for package in self.dependencies:
88  package.search(pattern,result)
89  _stack.pop()
90  self.searched = True
91 
92 
std::vector< T >::const_iterator search(const cond::Time_t &val, const std::vector< T > &container)
Definition: IOVProxy.cc:22
def packageNameFromFilename
Definition: TreeCrawler.py:31

Member Data Documentation

◆ dependencies

TreeCrawler.Package.dependencies

Definition at line 55 of file TreeCrawler.py.

Referenced by TreeCrawler.Package.dump().

◆ hit

TreeCrawler.Package.hit

Definition at line 78 of file TreeCrawler.py.

◆ module

TreeCrawler.Package.module

Definition at line 59 of file TreeCrawler.py.

Referenced by TreeCrawler.Package.search().

◆ name

TreeCrawler.Package.name

Definition at line 54 of file TreeCrawler.py.

Referenced by ElectronMVAID.ElectronMVAID.__call__(), FWLite.ElectronMVAID.__call__(), dirstructure.Directory.__create_pie_image(), DisplayManager.DisplayManager.__del__(), dqm_interfaces.DirID.__eq__(), dirstructure.Directory.__get_full_path(), dirstructure.Comparison.__get_img_name(), dirstructure.Comparison.__make_image(), core.autovars.NTupleVariable.__repr__(), core.autovars.NTupleObjectType.__repr__(), core.autovars.NTupleObject.__repr__(), core.autovars.NTupleCollection.__repr__(), dirstructure.Directory.__repr__(), dqm_interfaces.DirID.__repr__(), dirstructure.Comparison.__repr__(), config.Service.__setattr__(), config.CFG.__str__(), counter.Counter.__str__(), average.Average.__str__(), FWLite.WorkingPoints._reformat_cut_definitions(), core.autovars.NTupleObjectType.addSubObjects(), core.autovars.NTupleObjectType.addVariables(), core.autovars.NTupleObjectType.allVars(), dataset.CMSDataset.buildListOfFiles(), dataset.LocalDataset.buildListOfFiles(), dataset.CMSDataset.buildListOfFilesDBS(), dirstructure.Directory.calcStats(), validation.Sample.digest(), python.rootplot.utilities.Hist.divide(), python.rootplot.utilities.Hist.divide_wilson(), DisplayManager.DisplayManager.Draw(), TreeCrawler.Package.dump(), core.autovars.NTupleVariable.fillBranch(), core.autovars.NTupleObject.fillBranches(), core.autovars.NTupleCollection.fillBranchesScalar(), core.autovars.NTupleCollection.fillBranchesVector(), core.autovars.NTupleCollection.get_cpp_declaration(), core.autovars.NTupleCollection.get_cpp_wrapper_class(), core.autovars.NTupleCollection.get_py_wrapper_class(), utils.StatisticalTest.get_status(), production_tasks.Task.getname(), dataset.CMSDataset.getPrimaryDatasetEntries(), dataset.PrivateDataset.getPrimaryDatasetEntries(), VIDSelectorBase.VIDSelectorBase.initialize(), core.autovars.NTupleVariable.makeBranch(), core.autovars.NTupleObject.makeBranches(), core.autovars.NTupleCollection.makeBranchesScalar(), core.autovars.NTupleCollection.makeBranchesVector(), dirstructure.Directory.print_report(), dataset.BaseDataset.printInfo(), dataset.Dataset.printInfo(), production_tasks.MonitorJobs.run(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), counter.Counter.write(), and average.Average.write().

◆ searched

TreeCrawler.Package.searched

Definition at line 56 of file TreeCrawler.py.

Referenced by TreeCrawler.Package.search().

◆ stack

TreeCrawler.Package.stack

Definition at line 57 of file TreeCrawler.py.