Belle II Software  release-08-01-10
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 27 of file SVDDefaultOccupancyImporter.py.

Member Function Documentation

◆ beginRun()

def beginRun (   self)
begin run

Definition at line 30 of file SVDDefaultOccupancyImporter.py.

30  def beginRun(self):
31  '''begin run'''
32 
34 
35  payload = Belle2.SVDOccupancyCalibrations.t_payload(-1, "OccupancyCalibrations_default_" +
36  str(now.isoformat()) + "_INFO:_testJamesBranch")
37 
39 
40  for layer in geoCache.getLayers(Belle2.VXD.SensorInfoBase.SVD):
41  layerNumber = layer.getLayerNumber()
42  for ladder in geoCache.getLadders(layer):
43  ladderNumber = ladder.getLadderNumber()
44  for sensor in geoCache.getSensors(ladder):
45  sensorNumber = sensor.getSensorNumber()
46  for side in (0, 1):
47  Nstrips = 768
48  print("setting Occupancy for " +
49  str(layerNumber) + "." + str(ladderNumber) + "." + str(sensorNumber) + "." + str(side))
50  if side == 0:
51  if layerNumber == 3: # L3
52  occupancy = occupancy_L3
53  else:
54  Nstrips = 512
55  occupancy = occupancy_allOtherLayers
56  elif side == 1: # U
57  if layerNumber == 3: # L3 U
58  occupancy = occupancy_L3
59  else:
60  occupancy = occupancy_allOtherLayers
61  else:
62  print("WARNING: sensors end!...")
63 
64  print(str(Nstrips))
65 
66  for strip in range(0, Nstrips):
67  payload.set(layerNumber, ladderNumber, sensorNumber, bool(side), strip, occupancy)
68 
69  Belle2.Database.Instance().storeData(Belle2.SVDOccupancyCalibrations.name, payload, iov)
70 
71 
static IntervalOfValidity always()
Function that returns an interval of validity that is always valid, c.f.
base class for calibrations classes
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
static Database & Instance()
Instance of a singleton Database.
Definition: Database.cc:42

The documentation for this class was generated from the following file: