Belle II Software  release-05-02-19
defaultOccupancyImporter Class Reference
Inheritance diagram for defaultOccupancyImporter:
Collaboration diagram for defaultOccupancyImporter:

Public Member Functions

def beginRun (self)
 

Detailed Description

default importer of strip occupancy

Definition at line 24 of file SVDDefaultOccupancyImporter.py.

Member Function Documentation

◆ beginRun()

def beginRun (   self)
begin run

Definition at line 27 of file SVDDefaultOccupancyImporter.py.

27  def beginRun(self):
28  '''begin run'''
29 
31 
32  payload = Belle2.SVDOccupancyCalibrations.t_payload(-1, "OccupancyCalibrations_default_" +
33  str(now.isoformat()) + "_INFO:_testJamesBranch")
34 
36 
37  for layer in geoCache.getLayers(Belle2.VXD.SensorInfoBase.SVD):
38  layerNumber = layer.getLayerNumber()
39  for ladder in geoCache.getLadders(layer):
40  ladderNumber = ladder.getLadderNumber()
41  for sensor in geoCache.getSensors(ladder):
42  sensorNumber = sensor.getSensorNumber()
43  for side in (0, 1):
44  Nstrips = 768
45  print("setting Occupancy for " +
46  str(layerNumber) + "." + str(ladderNumber) + "." + str(sensorNumber) + "." + str(side))
47  if side == 0:
48  if layerNumber == 3: # L3
49  occupancy = occupancy_L3
50  else:
51  Nstrips = 512
52  occupancy = occupancy_allOtherLayers
53  elif side == 1: # U
54  if layerNumber == 3: # L3 U
55  occupancy = occupancy_L3
56  else:
57  occupancy = occupancy_allOtherLayers
58  else:
59  print("WARNING: sensors end!...")
60 
61  print(str(Nstrips))
62 
63  for strip in range(0, Nstrips):
64  payload.set(layerNumber, ladderNumber, sensorNumber, bool(side), strip, occupancy)
65 
66  Belle2.Database.Instance().storeData(Belle2.SVDOccupancyCalibrations.name, payload, iov)
67 
68 
69 use_local_database("localDB_occupancy/database.txt", "localDB_occupancy")
70 

The documentation for this class was generated from the following file:
Belle2::IntervalOfValidity::always
static IntervalOfValidity always()
Function that returns an interval of validity that is always valid, c.f.
Definition: IntervalOfValidity.h:72
Belle2::VXD::GeoCache::getInstance
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:215
Belle2::Database::Instance
static Database & Instance()
Instance of a singleton Database.
Definition: Database.cc:54
Belle2::SVDCalibrationsBase
base class for calibrations classes
Definition: SVDCalibrationsBase.h:36