Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
BunchCrossingIntensityCondAlgConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from IOVDbSvc.IOVDbSvcConfig import IOVDbSvcCfg
6 from LumiBlockComps.dummyLHCFillDB import createSqliteForInt,fillFolderForInt,createBCMask1,createBCMask2
7 
8 
9 
11 
12  result=ComponentAccumulator()
13  run1=(configFlags.IOVDb.DatabaseInstance=='COMP200')
14  from IOVDbSvc.IOVDbSvcConfig import addFolders
15 
16  Mode = 0
17  folder = '/TDAQ/OLC/LHC/BUNCHDATA'
18  result.merge(addFolders(configFlags,folder,'TDAQ',className = 'CondAttrListCollection',tag='HEAD'))
19  alg = CompFactory.BunchCrossingIntensityCondAlg('BunchCrossingIntensityCondAlgDefault',
20  Run1=run1,
21  FillParamsFolderKey =folder,
22  Mode=Mode )
23 
24  result.addCondAlgo(alg)
25 
26  return result
27 
28 
29 
30 if __name__=="__main__":
31  from AthenaConfiguration.AllConfigFlags import initConfigFlags
32  flags = initConfigFlags()
33  flags.Input.Files = []
34  flags.Input.isMC=False
35  flags.IOVDb.DatabaseInstance="CONDBR2"
36  flags.IOVDb.GlobalTag="CONDBR2-BLKPA-2017-05"
37  flags.lock()
38 
39  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
40  result=MainServicesCfg(flags)
41 
42  from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
43 
44 
45 
46 
47  db,folder=createSqliteForInt("testInt.db",folderName="/TDAQ/OLC/LHC/BUNCHDATA")
50 
51  onesec=1000000000
52 
53 
54  #Add two dummy masks with iov 2-3 and 3-4
55  fillFolderForInt(folder,d1,iovMin=1*onesec,iovMax=2*onesec)
56  fillFolderForInt(folder,d2,2*onesec,4*onesec)
57 
58  db.closeDatabase()
59  #The time stamp correspond to: Wednesday 10 August 2024 22:26:00 (Run 430897)
60  result.merge(McEventSelectorCfg(flags,
61  RunNumber=430897,
62  EventsPerRun=1,
63  FirstEvent=1183722158,
64  FirstLB=310,
65  EventsPerLB=1,
66  InitialTimeStamp=1,
67  TimeStampInterval=1))
68 
69 
70 
71  result.merge(BunchCrossingIntensityCondAlgCfg(flags))
72  result.merge(IOVDbSvcCfg(flags))
73  result.getService("IOVDbSvc").Folders=["<db>sqlite://;schema=testInt.db;dbname=CONDBR2</db><tag>HEAD</tag>/TDAQ/OLC/LHC/BUNCHDATA"]
74  BunchCrossingIntensityCondTest=CompFactory.BunchCrossingIntensityCondTest
75  result.addEventAlgo(BunchCrossingIntensityCondTest(FileName="BCIntData1.txt"))
76 
77  result.run(1)
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.BunchCrossingCondAlgTest.createBCMask1
def createBCMask1()
Definition: BunchCrossingCondAlgTest.py:12
python.BunchCrossingCondAlgTest.createBCMask2
def createBCMask2()
Definition: BunchCrossingCondAlgTest.py:32
python.BunchCrossingIntensityCondAlgConfig.BunchCrossingIntensityCondAlgCfg
def BunchCrossingIntensityCondAlgCfg(configFlags)
Definition: BunchCrossingIntensityCondAlgConfig.py:10
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
python.McEventSelectorConfig.McEventSelectorCfg
def McEventSelectorCfg(flags, **kwargs)
Definition: McEventSelectorConfig.py:5
python.IOVDbSvcConfig.addFolders
def addFolders(flags, folderStrings, detDb=None, className=None, extensible=False, tag=None, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:81
python.IOVDbSvcConfig.IOVDbSvcCfg
def IOVDbSvcCfg(flags, **kwargs)
Definition: IOVDbSvcConfig.py:28
python.dummyLHCFillDB.fillFolderForInt
def fillFolderForInt(folder, data=[], iovMin=cool.ValidityKeyMin, iovMax=cool.ValidityKeyMax)
Definition: dummyLHCFillDB.py:201
BunchCrossingIntensityCondTest
Definition: BunchCrossingIntensityCondTest.h:18
python.dummyLHCFillDB.createSqliteForInt
def createSqliteForInt(sqliteName, folderName="/TDAQ/OLC/LHC/BUNCHDATA")
Definition: dummyLHCFillDB.py:88
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19