ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
makeDTCalibBlob_pickPhase.logFile Class Reference
Collaboration diagram for makeDTCalibBlob_pickPhase.logFile:

Public Member Functions

def __init__ (self, logpath)
 
def runsFromLog (self)
 
def __str__ (self)
 
def getTopDirs (self, topdir)
 
def getDBfiles (self)
 
def getBCSnapshots (self)
 

Public Attributes

 logfile
 
 lines
 
 runs
 
 name
 
 topdirs
 
 infiles
 
 sqldbs
 
 bcsnapshots
 
 pooldirs
 

Detailed Description

Definition at line 101 of file makeDTCalibBlob_pickPhase.py.

Constructor & Destructor Documentation

◆ __init__()

def makeDTCalibBlob_pickPhase.logFile.__init__ (   self,
  logpath 
)

Definition at line 102 of file makeDTCalibBlob_pickPhase.py.

102  def __init__(self, logpath):
103  self.logfile = open(logpath, "r", newline="\n")
104  self.lines = self.logfile.readlines()
105  self.runs = self.runsFromLog()
106  self.name = pathlib.Path(logpath).stem
107 

Member Function Documentation

◆ __str__()

def makeDTCalibBlob_pickPhase.logFile.__str__ (   self)

Definition at line 114 of file makeDTCalibBlob_pickPhase.py.

114  def __str__(self):
115  toprint = []
116  for line in self.lines:
117  if not line.startswith("Run "): continue
118  line = line.strip("\n")
119  toprint.append(line)
120  return "\n".join(toprint)

◆ getBCSnapshots()

def makeDTCalibBlob_pickPhase.logFile.getBCSnapshots (   self)

Definition at line 137 of file makeDTCalibBlob_pickPhase.py.

137  def getBCSnapshots(self):
138  indbs = [ g for pd in self.topdirs for g in glob.glob(f"{pd}/*/SnapshotBadChannel.db") ]
139  indbs = list(set(indbs))
140  return indbs
141  # /eos/project/a/atlas-larcalib/AP/00473386_00473391_00473394_FMhighEtaBack_HIGH_2/pool_files/SnapshotBadChannel.db
142 
143 

◆ getDBfiles()

def makeDTCalibBlob_pickPhase.logFile.getDBfiles (   self)

Definition at line 131 of file makeDTCalibBlob_pickPhase.py.

131  def getDBfiles(self):
132  indbs = [ g for pd in self.topdirs for g in glob.glob(f"{pd}/*/mysql.db") ]
133  indbs = list(set(indbs))
134  self.pooldirs = list(set([ str(pathlib.Path(i).parents[0]) for i in indbs ]) )
135  return indbs
136 

◆ getTopDirs()

def makeDTCalibBlob_pickPhase.logFile.getTopDirs (   self,
  topdir 
)

Definition at line 121 of file makeDTCalibBlob_pickPhase.py.

121  def getTopDirs(self, topdir):
122  self.topdirs = []
123  for run in self.runs:
124  self.infiles = glob.glob(f"{topdir}/*{run}*/root_files/*{run}*")
125  self.topdirs.extend( list(set([ str(pathlib.Path(i).parents[1]) for i in self.infiles ])) )
126  self.topdirs = list(set(self.topdirs))
127  self.sqldbs = self.getDBfiles()
128  self.bcsnapshots = self.getBCSnapshots()
129  return self.topdirs
130 

◆ runsFromLog()

def makeDTCalibBlob_pickPhase.logFile.runsFromLog (   self)

Definition at line 108 of file makeDTCalibBlob_pickPhase.py.

108  def runsFromLog(self):
109  runs = []
110  for line in self.lines:
111  if not line.startswith("Run "): continue
112  runs.append(int(line.split("Run")[1].split(":")[0]))
113  return runs

Member Data Documentation

◆ bcsnapshots

makeDTCalibBlob_pickPhase.logFile.bcsnapshots

Definition at line 128 of file makeDTCalibBlob_pickPhase.py.

◆ infiles

makeDTCalibBlob_pickPhase.logFile.infiles

Definition at line 124 of file makeDTCalibBlob_pickPhase.py.

◆ lines

makeDTCalibBlob_pickPhase.logFile.lines

Definition at line 104 of file makeDTCalibBlob_pickPhase.py.

◆ logfile

makeDTCalibBlob_pickPhase.logFile.logfile

Definition at line 103 of file makeDTCalibBlob_pickPhase.py.

◆ name

makeDTCalibBlob_pickPhase.logFile.name

Definition at line 106 of file makeDTCalibBlob_pickPhase.py.

◆ pooldirs

makeDTCalibBlob_pickPhase.logFile.pooldirs

Definition at line 134 of file makeDTCalibBlob_pickPhase.py.

◆ runs

makeDTCalibBlob_pickPhase.logFile.runs

Definition at line 105 of file makeDTCalibBlob_pickPhase.py.

◆ sqldbs

makeDTCalibBlob_pickPhase.logFile.sqldbs

Definition at line 127 of file makeDTCalibBlob_pickPhase.py.

◆ topdirs

makeDTCalibBlob_pickPhase.logFile.topdirs

Definition at line 122 of file makeDTCalibBlob_pickPhase.py.


The documentation for this class was generated from the following file:
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
makeDTCalibBlob_pickPhase.int
int
Definition: makeDTCalibBlob_pickPhase.py:273
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
Trk::open
@ open
Definition: BinningType.h:40
ActsTrk::detail::MakeDerivedVariant::extend
constexpr std::variant< Args..., T > extend(const std::variant< Args... > &, const T &)
Definition: MakeDerivedVariant.h:17
str
Definition: BTagTrackIpAccessor.cxx:11
Trk::split
@ split
Definition: LayerMaterialProperties.h:38