ATLAS Offline Software
Public Attributes | Static Public Attributes | Private Member Functions | List of all members
python.AthenaCommonFlags.AccessMode Class Reference
Inheritance diagram for python.AthenaCommonFlags.AccessMode:
Collaboration diagram for python.AthenaCommonFlags.AccessMode:

Public Attributes

 StoredValue
 

Static Public Attributes

bool statusOn = True
 
string allowedType = "str"
 
list allowedValues = ["TreeAccess","TreeAccessWithEventInfo","BranchAccess","ClassAccess","AthenaAccess","POOLAccess"]
 
string StoredValue = "ClassAccess"
 

Private Member Functions

def _do_action (self, *args, **kwds)
 

Detailed Description

The type of read mechanism to use in this athena job

Definition at line 84 of file AthenaCommonFlags.py.

Member Function Documentation

◆ _do_action()

def python.AthenaCommonFlags.AccessMode._do_action (   self,
args,
**  kwds 
)
private

Definition at line 91 of file AthenaCommonFlags.py.

91  def _do_action( self, *args, **kwds ):
92  from AthenaCommon import AppMgr
93 
94  if self.StoredValue in ["ClassAccess","AthenaAccess","BranchAccess"]:
95  if hasattr(AppMgr.ServiceMgr,"EventSelector"):
96  if AppMgr.ServiceMgr.EventSelector.getType()!="Athena::xAODEventSelector":
97  raise ValueError("Cannot switch to %s mode with existing EventSelector of type %s" % (self.StoredValue,AppMgr.ServiceMgr.EventSelector.getType()) )
98  else:
99  import AthenaRootComps.ReadAthenaxAODHybrid # noqa: F401
100  if self.StoredValue=="ClassAccess": AppMgr.ServiceMgr.EventSelector.AccessMode = 1
101  elif self.StoredValue=="BranchAccess": AppMgr.ServiceMgr.EventSelector.AccessMode = 0
102  elif self.StoredValue=="AthenaAccess": AppMgr.ServiceMgr.EventSelector.AccessMode = 2
103  elif self.StoredValue=="POOLAccess":
104  if hasattr(AppMgr.ServiceMgr,"EventSelector"):
105  if AppMgr.ServiceMgr.EventSelector.getType()!="EventSelectorAthenaPool":
106  raise ValueError("Cannot switch to %s mode with existing EventSelector of type %s" % (self.StoredValue,AppMgr.ServiceMgr.EventSelector.getType()) )
107  else:
108  import AthenaPoolCnvSvc.ReadAthenaPool # noqa: F401
109  elif self.StoredValue=="TreeAccess" or self.StoredValue=="TreeAccessWithEventInfo":
110  if hasattr(AppMgr.ServiceMgr,"EventSelector"):
111  if AppMgr.ServiceMgr.EventSelector.getType()!="Athena::RootNtupleEventSelector":
112  raise ValueError("Cannot switch to %s mode with existing EventSelector of type %s" % (self.StoredValue,AppMgr.ServiceMgr.EventSelector.getType()) )
113  else:
114  import AthenaRootComps.ReadAthenaRoot # noqa: F401
115  AppMgr.ServiceMgr.EventSelector.TupleName = jobproperties.AthenaCommonFlags.TreeName()
116  if self.StoredValue=="TreeAccessWithEventInfo":
117  AppMgr.ServiceMgr.EventSelector.CreateEventInfo = True
118  AppMgr.ServiceMgr.AthenaEventLoopMgr.DoLiteLoop = False
119 
120 

Member Data Documentation

◆ allowedType

string python.AthenaCommonFlags.AccessMode.allowedType = "str"
static

Definition at line 87 of file AthenaCommonFlags.py.

◆ allowedValues

list python.AthenaCommonFlags.AccessMode.allowedValues = ["TreeAccess","TreeAccessWithEventInfo","BranchAccess","ClassAccess","AthenaAccess","POOLAccess"]
static

Definition at line 88 of file AthenaCommonFlags.py.

◆ statusOn

bool python.AthenaCommonFlags.AccessMode.statusOn = True
static

Definition at line 86 of file AthenaCommonFlags.py.

◆ StoredValue [1/2]

string python.AthenaCommonFlags.AccessMode.StoredValue = "ClassAccess"
static

Definition at line 89 of file AthenaCommonFlags.py.

◆ StoredValue [2/2]

python.AthenaCommonFlags.AccessMode.StoredValue

Definition at line 100 of file AthenaCommonFlags.py.


The documentation for this class was generated from the following file: