5     '''Function to configure LVL1 L1CaloCTP algorithm in the monitoring system.''' 
    9     from AthenaConfiguration.ComponentFactory 
import CompFactory
 
   10     from AthenaConfiguration.ComponentAccumulator 
import ComponentAccumulator
 
   18     from AthenaMonitoring 
import AthMonitorCfgHelper
 
   19     helper = AthMonitorCfgHelper(flags,
'L1CaloCTPMonitoringCfg')
 
   22     L1CaloCTPMonAlg = helper.addAlgorithm(CompFactory.L1CaloCTPMonitorAlgorithm,
'L1CaloCTPMonAlg')
 
   25     groupName = 
'L1CaloCTPMonitor'  
   26     L1CaloCTPMonAlg.PackageName = groupName
 
   28     mainDir = 
'LVL1_Interfaces' 
   32     myGroup = helper.addGroup(L1CaloCTPMonAlg, groupName , mainDir)
 
   34     multiplicity_labels = [
'EM1', 
'EM2', 
'Tau1', 
'Tau2', 
'Jet1 (3-bit)', 
'Jet2 (2-bit)', 
'TE (full eta)', 
'XE (full eta)', 
'XS', 
'TE (restr. eta)', 
'XE (restr. eta)']
 
   37     myGroup.defineHistogram(
'run',title=
'Run Number;run;Events',
 
   38                             path=trigPath,xbins=1000000,xmin=-0.5,xmax=999999.5)
 
   40     myGroup.defineHistogram(
'ctp_1d_L1CaloNeCTPSummary;h_ctp_1d_L1CaloNeCTPSummary', title=
'L1Calo Ne CTP',
 
   41                             type=
'TH1F', path=trigPath, xlabels=multiplicity_labels, xbins=len(multiplicity_labels),xmin=0,xmax=len(multiplicity_labels))
 
   43     myGroup.defineHistogram(
'ctp_1d_L1CaloEqCTPSummary;h_ctp_1d_L1CaloEqCTPSummary', title=
'L1Calo Eq CTP',
 
   44                             type=
'TH1F', path=trigPath, xlabels=multiplicity_labels, xbins=len(multiplicity_labels),xmin=0,xmax=len(multiplicity_labels))
 
   46     myGroup.defineHistogram(
'ctp_1d_TIPMatches;h_ctp_1d_TIPMatches', title=
'TIP Matches',
 
   47                             type=
'TH1F', path=trigPath, xbins=512,xmin=0.0,xmax=512.0)
 
   49     myGroup.defineHistogram(
'ctp_1d_HitNoTIPMismatch;h_ctp_1d_HitNoTIPMismatch', title=
'Hit No TIP Mismatches',
 
   50                             type=
'TH1F', path=trigPath, xbins=512,xmin=0.0,xmax=512.0)
 
   52     myGroup.defineHistogram(
'ctp_1d_TIPNoHitMismatch;h_ctp_1d_TIPNoHitMismatch', title=
'TIP No Hit Mismatches',
 
   53                             type=
'TH1F', path=trigPath, xbins=512,xmin=0.0,xmax=512.0)
 
   61 if __name__==
'__main__':
 
   63     from AthenaCommon.Logging 
import log
 
   68     from AthenaConfiguration.AllConfigFlags 
import initConfigFlags
 
   72     inputs = glob.glob(
'/eos/atlas/atlastier0/rucio/data18_13TeV/physics_Main/00354311/data18_13TeV.00354311.physics_Main.recon.ESD.f1129/data18_13TeV.00354311.physics_Main.recon.ESD.f1129._lb0013._SFO-8._0001.1')
 
   75     flags.Input.Files = inputs
 
   76     flags.Output.HISTFileName = 
'ExampleMonitorOutput_LVL1.root' 
   81     from AthenaConfiguration.MainServicesConfig 
import MainServicesCfg 
 
   82     from AthenaPoolCnvSvc.PoolReadConfig 
import PoolReadCfg
 
   87     cfg.merge(L1CaloCTPMonitorCfg)
 
   90     L1CaloCTPMonitorCfg.getEventAlgo(
'L1CaloCTPMonAlg').OutputLevel = 2 
 
   92     cfg.printConfig(withDetails=
False, summariseProps = 
True)