Classes | Functions | Variables
samweb_client.client Namespace Reference

Classes

class  ExperimentNotDefined
 
class  SAMWebClient
 

Functions

def get_version ()
 
def samweb_method (m)
 

Variables

 _version = None
 

Function Documentation

def samweb_client.client.get_version ( )
Get the version somehow 

Definition at line 10 of file client.py.

Referenced by samweb_client.http_client.SAMWebHTTPClient._get_user_agent(), samweb_client.projects.prestageDataset(), and samweb_client.projects.runProject().

11  """ Get the version somehow """
12  global _version
13  if _version is None:
14 
15  # first try the baked in value
16  try:
17  from _version import version
18  _version = version
19  except ImportError:
20  _version = 'unknown'
21 
22  # if running from a git checkout, try to obtain the version
23  gitdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../.git")
24  if os.path.exists(gitdir):
25  import subprocess
26  try:
27  p = subprocess.Popen(["git", "--work-tree=%s" % os.path.join(gitdir,".."), "--git-dir=%s" % gitdir, "describe", "--tags", "--dirty"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
28  if p.wait() == 0:
29  _version = p.stdout.read().strip()
30  except: pass
31  return _version
32 
def samweb_client.client.samweb_method (   m)
Attach this function as a method of the SAMWebClient class 

Definition at line 182 of file client.py.

183  """ Attach this function as a method of the SAMWebClient class """
184  setattr(SAMWebClient, m.func_name, m)
185  return m
186 
def samweb_method(m)
Definition: client.py:182

Variable Documentation

samweb_client.client._version = None
private

Definition at line 9 of file client.py.

Referenced by daqdataformats::VERSION_NAMESPACE::RawNanoSlice.getEncodeType(), daqdataformats::VERSION_NAMESPACE::RawNanoSlice.getNPretriggeredSamples(), daqdataformats::VERSION_NAMESPACE::RawNanoSlice.getNSamples(), daqdataformats::VERSION_NAMESPACE::RawNanoSlice.getWordPointer(), daqdataformats::VERSION_NAMESPACE::RawSummaryDCMDataHeader.init(), daqdataformats::VERSION_NAMESPACE::RawTriggerRange.init(), daqdataformats::VERSION_NAMESPACE::RawMicroBlockHeader.init(), daqdataformats::VERSION_NAMESPACE::RawConfigurationName.init(), daqdataformats::VERSION_NAMESPACE::RawConfigurationSystemID.init(), daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader.init(), daqdataformats::VERSION_NAMESPACE::RawSummaryDroppedMicroblock.init(), daqdataformats::VERSION_NAMESPACE::RawConfigurationTail.init(), daqdataformats::VERSION_NAMESPACE::RawSummaryDCMDataPoint.init(), daqdataformats::VERSION_NAMESPACE::RawTriggerTimingMarker.init(), daqdataformats::VERSION_NAMESPACE::RawEventTail.init(), daqdataformats::VERSION_NAMESPACE::RawTriggerMask.init(), daqdataformats::VERSION_NAMESPACE::RawTriggerTime.init(), daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader.init(), daqdataformats::VERSION_NAMESPACE::RawTriggerHeader.init(), daqdataformats::VERSION_NAMESPACE::RawConfigurationHeader.init(), daqdataformats::VERSION_NAMESPACE::RawEventHeader.init(), daqdataformats::VERSION_NAMESPACE::RawNanoSliceHeader.init(), daqdataformats::VERSION_NAMESPACE::RawRunHeader.init(), daqdataformats::RawDAQData.isVersionUnknown(), daqdataformats::VERSION_NAMESPACE::RawSummaryDCMData.print(), daqdataformats::VERSION_NAMESPACE::RawMicroBlock.print(), daqdataformats::VERSION_NAMESPACE::RawDataBlock.print(), daqdataformats::VERSION_NAMESPACE::RawConfigurationBlock.print(), daqdataformats::VERSION_NAMESPACE::RawEvent.print(), daqdataformats::VERSION_NAMESPACE::RawSummaryDCMDataHeader.print(), daqdataformats::VERSION_NAMESPACE::RawMicroBlockHeader.print(), daqdataformats::VERSION_NAMESPACE::RawTrigger.print(), daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader.print(), daqdataformats::VERSION_NAMESPACE::RawDataBlock.readDataUnknownVersion(), daqdataformats::VERSION_NAMESPACE::RawTrigger.readDataUnknownVersion(), daqdataformats::VERSION_NAMESPACE::RawSummaryDCMData.setBufferSource(), daqdataformats::VERSION_NAMESPACE::RawMicroBlock.setBufferSource(), daqdataformats::VERSION_NAMESPACE::RawDataBlock.setBufferSource(), daqdataformats::VERSION_NAMESPACE::RawConfigurationBlock.setBufferSource(), daqdataformats::VERSION_NAMESPACE::RawEvent.setBufferSource(), daqdataformats::VERSION_NAMESPACE::RawTrigger.setBufferSource(), daqdataformats::VERSION_NAMESPACE::RawNanoSlice.setBufferSource(), daqdataformats::RawMicroSliceHeader.setVersion(), and daqdataformats::RawMicroSliceHeader.setVersionSoft().