CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
Inspector.Inspector Class Reference

Public Member Functions

def createXML
 
def GetListObjects
 
def Loop
 
def SetFilename
 
def SetTag
 
def Verbose
 

Public Attributes

 dir
 
 Filename
 
 tag
 
 TagOption
 
 Verbose
 
 XML
 

Detailed Description

Definition at line 20 of file Inspector.py.

Member Function Documentation

def Inspector.Inspector.createXML (   self,
  value 
)

Definition at line 27 of file Inspector.py.

27 
28  def createXML(self, value):
29  self.XML = value
def Inspector.Inspector.GetListObjects (   self)

Definition at line 69 of file Inspector.py.

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

69 
70  def GetListObjects(self):
71 
72  afile = TFile(self.Filename)
73 
74  if afile.IsZombie():
75  print(" error trying to open file: " + self.Filename)
76  sys.exit()
77 
78  if self.XML:
79 
80  print('''
81 <cuy>
82 ''')
83  print(' <validation type=\"'+afile.GetName()+'\" file=\"'+self.Filename+'\" release=\"x.y.z\">')
84 
85  self.dir = ROOT.gDirectory
86  self.Loop()
87 
88  if self.XML:
89 
90  print('''
91  </validation>
92 
93 </cuy>
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
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, cond::persistency::IOVEditorData.tag, MeasurementEstimator::OpaquePayload.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 
35  def Loop(self):
36 
37  afile = TFile(self.Filename)
38  afilename = self.Filename
39  stripfilename = afilename
40 
41  try:
42  if self.TagOption:
43  stripfilename = self.tag
44  except:
45  stripfilename = afilename.split('/')[len(afilename.split('/')) -1]
46  stripfilename = stripfilename[0:(len(stripfilename)-5)]
47 
48  alist = self.dir.GetListOfKeys()
49 
50  for i in alist:
51  aobj = i.ReadObj()
52  if aobj.IsA().InheritsFrom("TDirectory"):
53  if self.Verbose:
54  print(' found directory: '+i.GetName())
55 
56  if self.XML:
57  print(' <!-- '+i.GetName()+' -->')
58 
59  bdir = self.dir
60  afile.GetObject(i.GetName(),bdir)
61  blist = bdir.GetListOfKeys()
62  for j in blist:
63  bobj = j.ReadObj()
64  if bobj.IsA().InheritsFrom(ROOT.TH1.Class()):
65  if self.Verbose:
66  print(' --> found TH1: name = '+j.GetName() + ' title = '+j.GetTitle())
67  if self.XML:
68  print(' <TH1 name=\"'+stripfilename+'_'+j.GetName()+'\" source=\"'+'/'+i.GetName()+'/'+j.GetName()+'\"/>')
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def Inspector.Inspector.SetFilename (   self,
  value 
)

Definition at line 22 of file Inspector.py.

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

Definition at line 30 of file Inspector.py.

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

Definition at line 24 of file Inspector.py.

References Inspector.Inspector.Verbose.

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

Member Data Documentation

Inspector.Inspector.dir

Definition at line 84 of file Inspector.py.

Referenced by Inspector.Inspector.Loop().

Inspector.Inspector.Filename

Definition at line 23 of file Inspector.py.

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

Inspector.Inspector.tag

Definition at line 31 of file Inspector.py.

Referenced by Inspector.Inspector.Loop(), DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_correction(), and DTWorkflow.DTWorkflow.remote_out_path().

Inspector.Inspector.TagOption

Definition at line 32 of file Inspector.py.

Referenced by Inspector.Inspector.Loop().

Inspector.Inspector.Verbose

Definition at line 25 of file Inspector.py.

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

Inspector.Inspector.XML

Definition at line 28 of file Inspector.py.

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