Belle II Software development
defaultOccupancyImporter Class Reference
Inheritance diagram for defaultOccupancyImporter:

Public Member Functions

def beginRun (self)
 

Detailed Description

 default importer of strip occupancy

Definition at line 26 of file SVDDefaultOccupancyImporter.py.

Member Function Documentation

◆ beginRun()

def beginRun (   self)
begin run

Definition at line 29 of file SVDDefaultOccupancyImporter.py.

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