CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
Inspector.Inspector Class Reference

Public Member Functions

def createXML (self, value)
 
def GetListObjects (self)
 
def Loop (self)
 
def SetFilename (self, value)
 
def SetTag (self, value)
 
def Verbose (self, value)
 

Public Attributes

 dir
 
 Filename
 
 tag
 
 TagOption
 
 Verbose
 
 XML
 

Detailed Description

Definition at line 20 of file Inspector.py.

Member Function Documentation

◆ createXML()

def Inspector.Inspector.createXML (   self,
  value 
)

Definition at line 27 of file Inspector.py.

27  def createXML(self, value):
28  self.XML = value
29 
createXML
Definition: cuy.py:321

◆ GetListObjects()

def Inspector.Inspector.GetListObjects (   self)

Definition at line 69 of file Inspector.py.

References Inspector.Inspector.Filename, print(), and Inspector.Inspector.XML.

69  def GetListObjects(self):
70 
71  afile = TFile(self.Filename)
72 
73  if afile.IsZombie():
74  print(" error trying to open file: " + self.Filename)
75  sys.exit()
76 
77  if self.XML:
78 
79  print('''
80 <cuy>
81 ''')
82  print(' <validation type=\"'+afile.GetName()+'\" file=\"'+self.Filename+'\" release=\"x.y.z\">')
83 
84  self.dir = ROOT.gDirectory
85  self.Loop()
86 
87  if self.XML:
88 
89  print('''
90  </validation>
91 
92 </cuy>
93 ''')
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ Loop()

def Inspector.Inspector.Loop (   self)

Definition at line 34 of file Inspector.py.

References edm::storage::LocalFileSystem::FSInfo.dir, histograms.Histograms.dir, muonisolation::TrackSelector::Parameters.dir, egammaisolation::EgammaTrackSelector::Parameters.dir, Inspector.Inspector.dir, SteppingHelixStateInfo.dir, VariablePlotter::SubDirectory.dir, VariablePlotter::Directory.dir, dataset.LocalDataset.dir, Inspector.Inspector.Filename, print(), FWLite.ElectronMVAID.tag, Entry< T >.tag, tnp::TagProbePair.tag, MeasurementEstimator::OpaquePayload.tag, cond::persistency::IOVEditorData.tag, Inspector.Inspector.tag, BeamSpotFakeConditions.tag, FWLite.WorkingPoints.tag, TrackListMerger::TkEDGetTokenss.tag, MuIsolatorResultProducer< BT >::DepositConf.tag, DQMNet::CoreObject.tag, personalPlayback.FrameworkJob.tag, Inspector.Inspector.TagOption, Inspector.Inspector.Verbose, L1TTwinMuxParams.Verbose, and Inspector.Inspector.XML.

34  def Loop(self):
35 
36  afile = TFile(self.Filename)
37  afilename = self.Filename
38  stripfilename = afilename
39 
40  try:
41  if self.TagOption:
42  stripfilename = self.tag
43  except:
44  stripfilename = afilename.split('/')[len(afilename.split('/')) -1]
45  stripfilename = stripfilename[0:(len(stripfilename)-5)]
46 
47  alist = self.dir.GetListOfKeys()
48 
49  for i in alist:
50  aobj = i.ReadObj()
51  if aobj.IsA().InheritsFrom("TDirectory"):
52  if self.Verbose:
53  print(' found directory: '+i.GetName())
54 
55  if self.XML:
56  print(' <!-- '+i.GetName()+' -->')
57 
58  bdir = self.dir
59  afile.GetObject(i.GetName(),bdir)
60  blist = bdir.GetListOfKeys()
61  for j in blist:
62  bobj = j.ReadObj()
63  if bobj.IsA().InheritsFrom(ROOT.TH1.Class()):
64  if self.Verbose:
65  print(' --> found TH1: name = '+j.GetName() + ' title = '+j.GetTitle())
66  if self.XML:
67  print(' <TH1 name=\"'+stripfilename+'_'+j.GetName()+'\" source=\"'+'/'+i.GetName()+'/'+j.GetName()+'\"/>')
68 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ SetFilename()

def Inspector.Inspector.SetFilename (   self,
  value 
)

Definition at line 22 of file Inspector.py.

22  def SetFilename(self, value):
23  self.Filename = value

◆ SetTag()

def Inspector.Inspector.SetTag (   self,
  value 
)

Definition at line 30 of file Inspector.py.

30  def SetTag(self,value):
31  self.tag = value
32  self.TagOption = True
33 

◆ Verbose()

def Inspector.Inspector.Verbose (   self,
  value 
)

Definition at line 24 of file Inspector.py.

References Inspector.Inspector.Verbose.

24  def Verbose(self, value):
25  self.Verbose = value
26 

Member Data Documentation

◆ dir

Inspector.Inspector.dir

Definition at line 84 of file Inspector.py.

Referenced by Inspector.Inspector.Loop().

◆ Filename

Inspector.Inspector.Filename

Definition at line 23 of file Inspector.py.

Referenced by Inspector.Inspector.GetListObjects(), and Inspector.Inspector.Loop().

◆ tag

◆ TagOption

Inspector.Inspector.TagOption

Definition at line 32 of file Inspector.py.

Referenced by Inspector.Inspector.Loop().

◆ Verbose

Inspector.Inspector.Verbose

Definition at line 25 of file Inspector.py.

Referenced by Inspector.Inspector.Loop(), and Inspector.Inspector.Verbose().

◆ XML

Inspector.Inspector.XML

Definition at line 28 of file Inspector.py.

Referenced by Inspector.Inspector.GetListObjects(), and Inspector.Inspector.Loop().