CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
core.autovars.NTupleObjectType Class Reference

Public Member Functions

def __init__ (self, name, baseObjectTypes=[], mcOnly=[], variables=[])
 
def __repr__ (self)
 
def addSubObjects (self, sos)
 
def addVariables (self, newvars)
 
def allBases (self)
 
def allVars (self, isMC)
 
def ownVars (self, isMC)
 
def removeVariable (self, name)
 

Public Attributes

 baseObjectTypes
 
 mcOnly
 
 name
 
 subObjects
 
 variables
 

Private Attributes

 _subObjectVars
 

Detailed Description

Type defining a collection of variables associated to a single object. Contans NTupleVariable and NTupleSubObject

Definition at line 36 of file autovars.py.

Constructor & Destructor Documentation

def core.autovars.NTupleObjectType.__init__ (   self,
  name,
  baseObjectTypes = [],
  mcOnly = [],
  variables = [] 
)

Definition at line 38 of file autovars.py.

38  def __init__(self,name,baseObjectTypes=[],mcOnly=[],variables=[]):
39  self.name = name
40  self.baseObjectTypes = baseObjectTypes
41  self.mcOnly = mcOnly
42  self.variables = []
43  self.subObjects = []
44  for v in variables:
45  if issubclass(v.__class__,NTupleSubObject):
46  self.subObjects.append(v)
47  else:
48  self.variables.append(v)
49  self._subObjectVars = {}
def __init__(self, name, baseObjectTypes=[], mcOnly=[], variables=[])
Definition: autovars.py:38

Member Function Documentation

def core.autovars.NTupleObjectType.__repr__ (   self)

Definition at line 118 of file autovars.py.

References AlignableObjectId::entry.name, TmModule.name, cond::persistency::TAG::NAME.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, core.autovars.NTupleVariable.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::RUN_INFO::END_TIME.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::TAG::DESCRIPTION.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::MODIFICATION_TIME.name, FWTGeoRecoGeometry::Info.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, personalPlayback.Applet.name, Types._Untracked.name, ParameterSet.name, PixelDCSObject< T >::Item.name, DQMRivetClient::LumiOption.name, MagCylinder.name, ParSet.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, SingleObjectCondition.name, cond::persistency::GTProxyData.name, MyWatcher.name, core.autovars.NTupleObjectType.name, edm::PathSummary.name, cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, alignment.Alignment.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, DQMGenericClient::EfficOption.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, EcalLogicID.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, MEtoEDM< T >::MEtoEDMObject.name, cms::DDAlgoArguments.name, ExpressionHisto< T >.name, XMLProcessor::_loaderBaseConfig.name, cond::persistency::PAYLOAD::HASH.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, cond::persistency::PAYLOAD::DATA.name, TreeCrawler.Package.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, genericValidation.GenericValidation.name, cond::persistency::PAYLOAD::VERSION.name, options.ConnectionHLTMenu.name, MagGeoBuilderFromDDD::volumeHandle.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, DQMGenericClient::ProfileOption.name, dqmoffline::l1t::HistDefinition.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, DQMGenericClient::NormOption.name, emtf::Node.name, FastHFShowerLibrary.name, h4DSegm.name, PhysicsTools::Calibration::Variable.name, DQMGenericClient::CDOption.name, CounterChecker.name, TrackerSectorStruct.name, cond::TagInfo_t.name, DQMGenericClient::NoFlowOption.name, cond::persistency::IOV::TAG_NAME.name, EDMtoMEConverter.name, cond::persistency::IOV::SINCE.name, Mapper::definition< ScannerT >.name, cond::persistency::IOV::PAYLOAD_HASH.name, cond::persistency::IOV::INSERTION_TIME.name, classes.MonitorData.name, HistogramManager.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, options.HLTProcessOptions.name, h2DSegm.name, nanoaod::FlatTable::Column.name, geometry.Structure.name, DQMNet::WaitObject.name, AlpgenParameterName.name, SiStripMonitorDigi.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, BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, personalPlayback.FrameworkJob.name, plotscripts.SawTeethFunction.name, crabFunctions.CrabTask.name, hTMaxCell.name, cscdqm::ParHistoDef.name, BeautifulSoup.Tag.name, SummaryOutputProducer::GenericSummary.name, and BeautifulSoup.SoupStrainer.name.

118  def __repr__(self):
119  return "<NTupleObjectType[%s]>" % self.name
120 
121 
122 
123 
def core.autovars.NTupleObjectType.addSubObjects (   self,
  sos 
)

Definition at line 103 of file autovars.py.

References core.autovars.NTupleObjectType.allVars(), AlignableObjectId::entry.name, TmModule.name, cond::persistency::TAG::NAME.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, core.autovars.NTupleVariable.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::RUN_INFO::END_TIME.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::TAG::DESCRIPTION.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::MODIFICATION_TIME.name, FWTGeoRecoGeometry::Info.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, personalPlayback.Applet.name, Types._Untracked.name, ParameterSet.name, PixelDCSObject< T >::Item.name, DQMRivetClient::LumiOption.name, MagCylinder.name, ParSet.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, SingleObjectCondition.name, cond::persistency::GTProxyData.name, MyWatcher.name, core.autovars.NTupleObjectType.name, edm::PathSummary.name, lumi::TriggerInfo.name, cond::TimeTypeSpecs.name, alignment.Alignment.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, DQMGenericClient::EfficOption.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, EcalLogicID.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, MEtoEDM< T >::MEtoEDMObject.name, cms::DDAlgoArguments.name, ExpressionHisto< T >.name, XMLProcessor::_loaderBaseConfig.name, cond::persistency::PAYLOAD::HASH.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, cond::persistency::PAYLOAD::DATA.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, TreeCrawler.Package.name, cond::persistency::PAYLOAD::VERSION.name, genericValidation.GenericValidation.name, options.ConnectionHLTMenu.name, MagGeoBuilderFromDDD::volumeHandle.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, DQMGenericClient::ProfileOption.name, dqmoffline::l1t::HistDefinition.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, DQMGenericClient::NormOption.name, emtf::Node.name, FastHFShowerLibrary.name, h4DSegm.name, PhysicsTools::Calibration::Variable.name, DQMGenericClient::CDOption.name, CounterChecker.name, cond::TagInfo_t.name, TrackerSectorStruct.name, DQMGenericClient::NoFlowOption.name, cond::persistency::IOV::TAG_NAME.name, EDMtoMEConverter.name, cond::persistency::IOV::SINCE.name, Mapper::definition< ScannerT >.name, cond::persistency::IOV::PAYLOAD_HASH.name, cond::persistency::IOV::INSERTION_TIME.name, classes.MonitorData.name, HistogramManager.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, options.HLTProcessOptions.name, h2DSegm.name, nanoaod::FlatTable::Column.name, geometry.Structure.name, DQMNet::WaitObject.name, AlpgenParameterName.name, SiStripMonitorDigi.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, BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, personalPlayback.FrameworkJob.name, plotscripts.SawTeethFunction.name, crabFunctions.CrabTask.name, hTMaxCell.name, cscdqm::ParHistoDef.name, BeautifulSoup.Tag.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, and core.autovars.NTupleObjectType.subObjects.

103  def addSubObjects(self,sos):
104  currentnames = [v.name for v in self.subObjects]
105  uniquenewobjs = []
106  for ob in sos:
107  if ob.name in uniquenewobjs: raise RuntimeError("Duplicate definition of sub-object %s while adding it to object type %s" % (ob.name,self.name))
108  uniquenewobjs.append(ob.name)
109  if ob.name not in currentnames:
110  self.subObjects.append(ob)
111  else:
112  raise RuntimeError("Sub-object %s is already present in object type %s" % (ob.name,self.name))
113  self._subObjectVars.clear() # clear and update cache of subobj variables
114  mynewvars = self.allVars(True)
115  mynewvars = self.allVars(False)
def allVars(self, isMC)
Definition: autovars.py:69
def addSubObjects(self, sos)
Definition: autovars.py:103
def core.autovars.NTupleObjectType.addVariables (   self,
  newvars 
)

Definition at line 93 of file autovars.py.

References core.autovars.NTupleObjectType.allVars(), AlignableObjectId::entry.name, TmModule.name, cond::persistency::TAG::NAME.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, core.autovars.NTupleVariable.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::RUN_INFO::END_TIME.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::TAG::DESCRIPTION.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::MODIFICATION_TIME.name, FWTGeoRecoGeometry::Info.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, personalPlayback.Applet.name, Types._Untracked.name, ParameterSet.name, PixelDCSObject< T >::Item.name, DQMRivetClient::LumiOption.name, MagCylinder.name, ParSet.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, SingleObjectCondition.name, cond::persistency::GTProxyData.name, MyWatcher.name, core.autovars.NTupleObjectType.name, edm::PathSummary.name, lumi::TriggerInfo.name, cond::TimeTypeSpecs.name, alignment.Alignment.name, perftools::EdmEventSize::BranchRecord.name, PixelEndcapLinkMaker::Item.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, DQMGenericClient::EfficOption.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, EcalLogicID.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, MEtoEDM< T >::MEtoEDMObject.name, cms::DDAlgoArguments.name, ExpressionHisto< T >.name, XMLProcessor::_loaderBaseConfig.name, cond::persistency::PAYLOAD::HASH.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, cond::persistency::PAYLOAD::DATA.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, TreeCrawler.Package.name, cond::persistency::PAYLOAD::VERSION.name, genericValidation.GenericValidation.name, options.ConnectionHLTMenu.name, MagGeoBuilderFromDDD::volumeHandle.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, DQMGenericClient::ProfileOption.name, dqmoffline::l1t::HistDefinition.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, DQMGenericClient::NormOption.name, emtf::Node.name, FastHFShowerLibrary.name, h4DSegm.name, PhysicsTools::Calibration::Variable.name, DQMGenericClient::CDOption.name, CounterChecker.name, TrackerSectorStruct.name, cond::TagInfo_t.name, DQMGenericClient::NoFlowOption.name, cond::persistency::IOV::TAG_NAME.name, EDMtoMEConverter.name, cond::persistency::IOV::SINCE.name, Mapper::definition< ScannerT >.name, cond::persistency::IOV::PAYLOAD_HASH.name, classes.MonitorData.name, cond::persistency::IOV::INSERTION_TIME.name, HistogramManager.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, options.HLTProcessOptions.name, h2DSegm.name, nanoaod::FlatTable::Column.name, geometry.Structure.name, DQMNet::WaitObject.name, AlpgenParameterName.name, SiStripMonitorDigi.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, BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, personalPlayback.FrameworkJob.name, plotscripts.SawTeethFunction.name, crabFunctions.CrabTask.name, hTMaxCell.name, cscdqm::ParHistoDef.name, BeautifulSoup.Tag.name, SummaryOutputProducer::GenericSummary.name, and BeautifulSoup.SoupStrainer.name.

93  def addVariables(self,newvars):
94  currentnames = [v.name for v in self.allVars(True)] # require no conflict with all variables, including mcOnly ones
95  uniquenewvars = []
96  for var in newvars:
97  if var.name in uniquenewvars: raise RuntimeError("Duplicate definition of variable %s while adding variables to object type %s" % (var.name,self.name))
98  uniquenewvars.append(var.name)
99  if var.name not in currentnames:
100  self.variables.append(var)
101  else:
102  raise RuntimeError("Variable %s is already present in object type %s" % (var.name,self.name))
def allVars(self, isMC)
Definition: autovars.py:69
def addVariables(self, newvars)
Definition: autovars.py:93
def core.autovars.NTupleObjectType.allBases (   self)

Definition at line 84 of file autovars.py.

References core.autovars.NTupleObjectType.baseObjectTypes.

Referenced by core.autovars.NTupleObjectType.allVars().

84  def allBases(self):
85  ret = []
86  for b in self.baseObjectTypes:
87  if b not in ret:
88  ret.append(b)
89  for b2 in b.allBases():
90  if b2 not in ret:
91  ret.append(b2)
92  return ret
def core.autovars.NTupleObjectType.allVars (   self,
  isMC 
)
Return all vars, including the base ones. Duplicate bases are not added twice

Definition at line 69 of file autovars.py.

References core.autovars.NTupleObjectType.allBases(), core.autovars.NTupleVariable.mcOnly, core.autovars.NTupleObjectType.mcOnly, AlignableObjectId::entry.name, cond::persistency::TAG::NAME.name, TmModule.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::TAG::TIME_TYPE.name, core.autovars.NTupleVariable.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::RUN_INFO::END_TIME.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, MEPSet.name, cond::persistency::TAG::END_OF_VALIDITY.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::TAG::DESCRIPTION.name, cond::persistency::GTEditorData.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::MODIFICATION_TIME.name, FWTGeoRecoGeometry::Info.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, personalPlayback.Applet.name, Types._Untracked.name, ParameterSet.name, PixelDCSObject< T >::Item.name, DQMRivetClient::LumiOption.name, MagCylinder.name, ParSet.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, SingleObjectCondition.name, cond::persistency::GTProxyData.name, MyWatcher.name, core.autovars.NTupleObjectType.name, edm::PathSummary.name, cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, alignment.Alignment.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, DQMGenericClient::EfficOption.name, FWTableViewManager::TableEntry.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, PixelBarrelLinkMaker::Item.name, EcalLogicID.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, MEtoEDM< T >::MEtoEDMObject.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, cms::DDAlgoArguments.name, ExpressionHisto< T >.name, XMLProcessor::_loaderBaseConfig.name, cond::persistency::PAYLOAD::HASH.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, cond::persistency::PAYLOAD::DATA.name, TreeCrawler.Package.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, cond::persistency::PAYLOAD::VERSION.name, genericValidation.GenericValidation.name, options.ConnectionHLTMenu.name, MagGeoBuilderFromDDD::volumeHandle.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, DQMGenericClient::ProfileOption.name, dqmoffline::l1t::HistDefinition.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, DQMGenericClient::NormOption.name, emtf::Node.name, h4DSegm.name, FastHFShowerLibrary.name, PhysicsTools::Calibration::Variable.name, DQMGenericClient::CDOption.name, CounterChecker.name, TrackerSectorStruct.name, cond::TagInfo_t.name, DQMGenericClient::NoFlowOption.name, cond::persistency::IOV::TAG_NAME.name, EDMtoMEConverter.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, Mapper::definition< ScannerT >.name, classes.MonitorData.name, cond::persistency::IOV::INSERTION_TIME.name, HistogramManager.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, options.HLTProcessOptions.name, h2DSegm.name, nanoaod::FlatTable::Column.name, geometry.Structure.name, DQMNet::WaitObject.name, AlpgenParameterName.name, SiStripMonitorDigi.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, BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, personalPlayback.FrameworkJob.name, plotscripts.SawTeethFunction.name, crabFunctions.CrabTask.name, hTMaxCell.name, cscdqm::ParHistoDef.name, BeautifulSoup.Tag.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, and core.autovars.NTupleObjectType.ownVars().

Referenced by core.autovars.NTupleObjectType.addSubObjects(), and core.autovars.NTupleObjectType.addVariables().

69  def allVars(self,isMC):
70  """Return all vars, including the base ones. Duplicate bases are not added twice"""
71  ret = []; names = {}
72  if not isMC and self.mcOnly: return []
73  for base in self.allBases():
74  if not isMC and base.mcOnly: continue
75  for var in base.ownVars(isMC):
76  if var.name in names: raise RuntimeError("Duplicate definition of variable %s from %s and %s" % (var.name, base.name, names[var.name]))
77  names[var.name] = base.name
78  ret.append(var)
79  for var in self.ownVars(isMC):
80  if var.name in names: raise RuntimeError("Duplicate definition of variable %s from %s and %s" % (var.name, self.name, names[var.name]))
81  names[var.name] = self.name
82  ret.append(var)
83  return ret
def allVars(self, isMC)
Definition: autovars.py:69
def ownVars(self, isMC)
Definition: autovars.py:50
def core.autovars.NTupleObjectType.ownVars (   self,
  isMC 
)
Return only my vars, not including the ones from the bases

Definition at line 50 of file autovars.py.

References core.autovars.NTupleObjectType._subObjectVars, core.autovars.NTupleObjectType.subObjects, core.autovars.NTupleObjectType.variables, and TaggingVariablePlotter.variables.

Referenced by core.autovars.NTupleObjectType.allVars().

50  def ownVars(self,isMC):
51  """Return only my vars, not including the ones from the bases"""
52  vars = [ v for v in self.variables if (isMC or not v.mcOnly) ]
53  if self.subObjects:
54  if isMC not in self._subObjectVars:
55  subvars = []
56  for so in self.subObjects:
57  if so.mcOnly and not isMC: continue
58  for subvar in so.objectType.allVars(isMC):
59  subvars.append(NTupleVariable(so.name+"_"+subvar.name,
60  #DebugComposer(so,subvar),#lambda object : subvar(so(object)),
61  lambda object, subvar=subvar, so=so : subvar(so(object)),
62  # ^-- lambda object : subvar(so(object)) doesn't work due to scoping, see
63  # http://stackoverflow.com/questions/2295290/what-do-lambda-function-closures-capture-in-python/2295372#2295372
64  type = subvar.type, help = subvar.help, default = subvar.default, mcOnly = subvar.mcOnly,
65  filler = subvar.filler))
66  self._subObjectVars[isMC] = subvars
67  vars += self._subObjectVars[isMC]
68  return vars
def ownVars(self, isMC)
Definition: autovars.py:50
def core.autovars.NTupleObjectType.removeVariable (   self,
  name 
)

Definition at line 116 of file autovars.py.

References core.autovars.NTupleObjectType.variables, and TaggingVariablePlotter.variables.

116  def removeVariable(self,name):
117  self.variables = [ v for v in self.variables if v.name != name]
def removeVariable(self, name)
Definition: autovars.py:116

Member Data Documentation

core.autovars.NTupleObjectType._subObjectVars
private

Definition at line 49 of file autovars.py.

Referenced by core.autovars.NTupleObjectType.ownVars().

core.autovars.NTupleObjectType.baseObjectTypes

Definition at line 40 of file autovars.py.

Referenced by core.autovars.NTupleObjectType.allBases().

core.autovars.NTupleObjectType.mcOnly
core.autovars.NTupleObjectType.name

Definition at line 39 of file autovars.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(), dataset.Dataset.__getDataType(), dataset.Dataset.__getFileInfoList(), dirstructure.Comparison.__make_image(), 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(), dirstructure.Directory.calcStats(), validation.Sample.digest(), python.rootplot.utilities.Hist.divide(), python.rootplot.utilities.Hist.divide_wilson(), DisplayManager.DisplayManager.Draw(), 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.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(), Vispa.Views.PropertyView.Property.valueChanged(), counter.Counter.write(), and average.Average.write().

core.autovars.NTupleObjectType.subObjects
core.autovars.NTupleObjectType.variables