diff --git a/Tools/PyUtils/bin/checkxAOD.py b/Tools/PyUtils/bin/checkxAOD.py index 49f3bd20afe49c551382628d32afda150714c3e1..a187120410943ed878019f31da3b7943a4cd430c 100755 --- a/Tools/PyUtils/bin/checkxAOD.py +++ b/Tools/PyUtils/bin/checkxAOD.py @@ -2,14 +2,14 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # -# $Id: checkxAOD.py 776363 2016-10-04 10:02:03Z wlampl $ +# $Id: checkxAOD.py 776263 2016-10-03 14:46:39Z wlampl $ # # This is a modified version of PyUtils/bin/checkFile.py. It has been taught # how to sum up the sizes of all the branches belonging to a single xAOD # object/container. # -__version__ = "$Revision: 776363 $" +__version__ = "$Revision: 776263 $" __author__ = "Sebastien Binet <binet@cern.ch>, " \ "Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>, " \ "RD Schaffer R.D.Schaffer@cern.ch" diff --git a/Tools/PyUtils/python/AthFile/impl.py b/Tools/PyUtils/python/AthFile/impl.py index d0f0f92903dec5385e74ec8779283a8e5f298473..115139ed00e51e350fb9e5f64ff0b5fbd8e4afa1 100644 --- a/Tools/PyUtils/python/AthFile/impl.py +++ b/Tools/PyUtils/python/AthFile/impl.py @@ -7,7 +7,7 @@ from __future__ import with_statement -__version__ = "$Revision: 768237 $" +__version__ = "$Revision: 723532 $" __author__ = "Sebastien Binet" __doc__ = "implementation of AthFile-server behind a set of proxies to isolate environments" @@ -29,7 +29,7 @@ except: pass ### globals ------------------------------------------------------------------- -DEFAULT_AF_RUN = os.environ.get('DEFAULT_AF_RUN', True) +DEFAULT_AF_RUN = os.environ.get('DEFAULT_AF_RUN', False) '''Revert to old file peeking via Athena sub-process if True.''' DEFAULT_AF_CACHE_FNAME = os.environ.get('DEFAULT_AF_CACHE_FNAME', diff --git a/Tools/PyUtils/python/scripts/cmt_newanalysisalg.py b/Tools/PyUtils/python/scripts/cmt_newanalysisalg.py index 125605e58b5c563738dda03028b6366346452835..42aa94528bb8bfeca4c3cee7b291dc2acbd389d4 100644 --- a/Tools/PyUtils/python/scripts/cmt_newanalysisalg.py +++ b/Tools/PyUtils/python/scripts/cmt_newanalysisalg.py @@ -9,7 +9,7 @@ from __future__ import with_statement -__version__ = "$Revision: 734631 $" +__version__ = "$Revision: 774188 $" __author__ = "Will Buttinger" __doc__ = "streamline and ease the creation of new AthAnalysisAlgorithm" @@ -249,7 +249,7 @@ def main(args): print "#use xAODEventInfo xAODEventInfo-* Event/xAOD" print "" if not hasAsgTools: - print "use AsgTools AsgTools-* Control/AthToolSupport" + print "#use AsgTools AsgTools-* Control/AthToolSupport" print "" if not inPrivate: print "end_private" if line.startswith("private"): inPrivate=True diff --git a/Tools/PyUtils/python/scripts/cmt_newanalysisapp.py b/Tools/PyUtils/python/scripts/cmt_newanalysisapp.py index f3d640bf89f804d9a293c8438cb9cc3ed53153fb..a1f1de2a4336d7c5c1952fc50584f40d4fe202b1 100644 --- a/Tools/PyUtils/python/scripts/cmt_newanalysisapp.py +++ b/Tools/PyUtils/python/scripts/cmt_newanalysisapp.py @@ -9,7 +9,7 @@ from __future__ import with_statement -__version__ = "$Revision: 734631 $" +__version__ = "$Revision: 774188 $" __author__ = "Will Buttinger" __doc__ = "streamline and ease the creation of new standalone applications" @@ -41,7 +41,7 @@ using namespace asg::msgUserCode; //messaging int main( int argc, char* argv[] ) { - IAppMgrUI* app = POOL::Init(); //important to do this first! + IAppMgrUI* app = Gaudi::Init(); //important to do this first, for MessageSvc to exist properly for MSG_INFO macro // Open the input file: TString fileName = "$ASG_TEST_FILE_MC"; @@ -55,11 +55,19 @@ int main( int argc, char* argv[] ) { //Here's an example of how you would create a tool of type ToolType, and set a property on it //The preferred way to create and configure the tool is with a ToolHandle: //ToolHandle<IToolInterface> myTool("ToolType/myTool"); - //AthAnalysisHelper::setProperty( myTool, "MyProperty", value ); + //AAH::setProperty( myTool, "MyProperty", value ); //myTool.retrieve(); //this will cause the tool to be created and initialized //loop over input file with POOL - POOL::TEvent evt; + POOL::TEvent evt(POOL::TEvent::kPOOLAccess); + + //read modes (constructor argument) are: + //kPOOLAccess = default (slowest but reads all POOL file types (including xAOD)), + //kAthenaAccess, (just xAOD) + //kClassAccess, (just xAOD, but not some primary xAOD) + //kBranchAccess (just xAOD, fastest but might not always work) + + evt.readFrom( fileName ); for(int i=0;i < evt.getEntries(); i++) { @@ -72,7 +80,7 @@ int main( int argc, char* argv[] ) { } - app->finalize(); //trigger finalization of all services and tools created by the Gaudi Application + app->finalize(); //optional trigger finalization of all services and tools created by the Gaudi Application return 0; } diff --git a/Tools/PyUtils/python/scripts/cmt_newjobo.py b/Tools/PyUtils/python/scripts/cmt_newjobo.py index 795a9fbfd672b0902e2fbf2cd685d1d11396cbaa..1c12e3eb6987f8f15db1f1b209d6d51e28a01c03 100644 --- a/Tools/PyUtils/python/scripts/cmt_newjobo.py +++ b/Tools/PyUtils/python/scripts/cmt_newjobo.py @@ -9,7 +9,7 @@ from __future__ import with_statement -__version__ = "$Revision: 710998 $" +__version__ = "$Revision: 774188 $" __author__ = "Will Buttinger" __doc__ = "streamline and ease the creation of new skeleton joboption for analysis" @@ -24,14 +24,25 @@ class Templates: jobo_template = """\ #Skeleton joboption for a simple analysis job +#---- Minimal joboptions ------- + theApp.EvtMax=10 #says how many events to run over. Set to -1 for all events +jps.AthenaCommonFlags.FilesInput = ["%(inFile)s"] #insert your list of input files here (do this before next lines) import AthenaPoolCnvSvc.ReadAthenaPool #sets up reading of POOL files (e.g. xAODs) -svcMgr.EventSelector.InputCollections=["%(inFile)s"] #insert your list of input files here +#import AthenaRootComps.ReadAthenaxAODHybrid #alternative for FAST xAOD reading! algseq = CfgMgr.AthSequencer("AthAlgSeq") #gets the main AthSequencer algseq += CfgMgr.%(klass)s() #adds an instance of your alg to it +#------------------------------- + + +#note that if you edit the input files after this point you need to pass the new files to the EventSelector: +#like this: svcMgr.EventSelector.InputCollections = ["new","list"] + + + ##--------------------------------------------------------------------