ATLAS Offline Software
Loading...
Searching...
No Matches
CheckDAODCompleteness Namespace Reference

Functions

 MakeArg (DSidentifier, InputType)
 B.

Variables

 client = pyAMI.client.Client('atlas')
 infile = open(argv[1],"r")
str outfilenom = 'for_reprocessing_'+time.strftime('%y%m%d_%H%M%S')+'.txt'
 outfile = open(outfilenom,'w')
bool found_a_file = False
 sample = asample.split('#')[0].strip()
 result_DAOD = client.execute(['GetDatasetInfo', '-logicalDatasetName=%s'%sample], format = 'dict_object')
 identifier = result_DAOD.get_rows('Element_Info')[0]['identifier']
 nInputEvents_DAOD = int(client.execute(['SearchQuery', MakeArg(identifier,'nInputEvents')], format = 'dict_object').get_rows('Element_Info')[0]['SUM'])
 nInputEventsUsed_DAOD = int(client.execute(['SearchQuery', MakeArg(identifier,'nInputEventsUsed')], format = 'dict_object').get_rows('Element_Info')[0]['SUM'])
 result_xAOD = client.execute(['GetDatasetProv', '-logicalDatasetName=%s'%sample], format = 'dict_object')
 nEvents_xAOD = int(result_xAOD.get_rows('node')[1]['events'])

Function Documentation

◆ MakeArg()

CheckDAODCompleteness.MakeArg ( DSidentifier,
InputType )

B.

Martin - 26/01/2017

This script checks whether a DAOD was produced with the full statistics of the corresponding xAOD. python checkDAODstats.py list.txt where list.txt is a list of MC15 DAODs

Don't forget to setup pyAMI...

export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase source $ATLAS_LOCAL_ROOT_BASE/user/atlasLocalSetup.sh lsetup pyami

Definition at line 20 of file CheckDAODCompleteness.py.

20def MakeArg( DSidentifier, InputType):
21
22 arg='-gLiteEntity=\"prodsys_task\" -gLiteQuery=\"SELECT prodsys_task.prodsysIdentifier, prodsys_task.nInputEvents, prodsys_task.nInputEventsUsed, prodsys_task.datasetFK, prodsys_task.identifier , prodsys_task.taskStatus WHERE dataset.identifier=\'%s\'\", -processingStep=\"production\" -project=\"mc15_001\" -sql=\"SELECT prodsys_task.prodsysIdentifier, prodsys_task.nInputEvents, prodsys_task.nInputEventsUsed, prodsys_task.datasetFK, prodsys_task.identifier ,\'mc15_001\' as PROJECT,\'production\' as PROCESS, \'prodsys_task\' as AMIENTITYNAME, prodsys_task.identifier as AMIELEMENTID , FROM dataset,prodsys_task WHERE (dataset.identifier IN (SELECT dataset.identifier FROM dataset WHERE dataset.identifier = \'%s\')) AND (dataset.identifier = prodsys_task.datasetFK ) AND (\'DATA_DELETED\' <> prodsys_task.taskStatus)\" -stats=\"prodsys_task.%s\"' % (DSidentifier, DSidentifier, InputType)
23
24 return arg
25
26

Variable Documentation

◆ client

CheckDAODCompleteness.client = pyAMI.client.Client('atlas')

Definition at line 30 of file CheckDAODCompleteness.py.

◆ found_a_file

bool CheckDAODCompleteness.found_a_file = False

Definition at line 44 of file CheckDAODCompleteness.py.

◆ identifier

CheckDAODCompleteness.identifier = result_DAOD.get_rows('Element_Info')[0]['identifier']

Definition at line 63 of file CheckDAODCompleteness.py.

◆ infile

CheckDAODCompleteness.infile = open(argv[1],"r")

Definition at line 39 of file CheckDAODCompleteness.py.

◆ nEvents_xAOD

CheckDAODCompleteness.nEvents_xAOD = int(result_xAOD.get_rows('node')[1]['events'])

Definition at line 77 of file CheckDAODCompleteness.py.

◆ nInputEvents_DAOD

CheckDAODCompleteness.nInputEvents_DAOD = int(client.execute(['SearchQuery', MakeArg(identifier,'nInputEvents')], format = 'dict_object').get_rows('Element_Info')[0]['SUM'])

Definition at line 66 of file CheckDAODCompleteness.py.

◆ nInputEventsUsed_DAOD

CheckDAODCompleteness.nInputEventsUsed_DAOD = int(client.execute(['SearchQuery', MakeArg(identifier,'nInputEventsUsed')], format = 'dict_object').get_rows('Element_Info')[0]['SUM'])

Definition at line 67 of file CheckDAODCompleteness.py.

◆ outfile

CheckDAODCompleteness.outfile = open(outfilenom,'w')

Definition at line 43 of file CheckDAODCompleteness.py.

◆ outfilenom

str CheckDAODCompleteness.outfilenom = 'for_reprocessing_'+time.strftime('%y%m%d_%H%M%S')+'.txt'

Definition at line 42 of file CheckDAODCompleteness.py.

◆ result_DAOD

CheckDAODCompleteness.result_DAOD = client.execute(['GetDatasetInfo', '-logicalDatasetName=%s'%sample], format = 'dict_object')

Definition at line 61 of file CheckDAODCompleteness.py.

◆ result_xAOD

CheckDAODCompleteness.result_xAOD = client.execute(['GetDatasetProv', '-logicalDatasetName=%s'%sample], format = 'dict_object')

Definition at line 76 of file CheckDAODCompleteness.py.

◆ sample

CheckDAODCompleteness.sample = asample.split('#')[0].strip()

Definition at line 48 of file CheckDAODCompleteness.py.