/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes
DBUploader::DBUploader Class Reference

List of all members.

Public Member Functions

def __init__
def SetTask
def Upload

Public Attributes

 vdate
 thetask

Detailed Description

Definition at line 20 of file DBUploader.py.


Constructor & Destructor Documentation

def DBUploader::DBUploader::__init__ (   self,
  dbconf 
)

Definition at line 22 of file DBUploader.py.

00023                               :
00024 
00025         logging.info("Initializing DBUploader")
00026         os.environ['DBCONF'] = dbconf
00027         logging.info("...done!")
00028 
00029         # Auto version date by default
00030         self.vdate = TimeStamp(0, 0)
00031 
00032         # Use task=1 by default
00033         self.thetask=1


Member Function Documentation

def DBUploader::DBUploader::SetTask (   self,
  taskin 
)

Definition at line 34 of file DBUploader.py.

00035                             :
00036         self.thetask=taskin;

def DBUploader::DBUploader::Upload (   self,
  timestart,
  EH,
  AD,
  mean,
  mean_err 
)

Definition at line 37 of file DBUploader.py.

00038                                                        :
00039 
00040         #ensure use of right convention
00041         if EH==3:
00042             EH=4;
00043             
00044         #ensure we have an AD
00045         assert EH==1 or EH==2 or EH==4;
00046         assert AD>=1 and AD<=4;
00047 
00048         #Can put more checks here (PeEvis and PeEvis in right range... etc)
00049 
00050         #uploading
00051         tstart = TimeStamp(timestart)
00052         tend = TimeStamp.GetEOT();
00053         contran=ContextRange(EH,SimFlag.kData,tstart,tend);
00054         wrt = src.Wrt()
00055         wrt.ctx(
00056             contextrange=contran,
00057             versiondate=self.vdate,
00058             subsite=AD,
00059             task=self.thetask
00060             )
00061 
00062         erc=src.Create(PeEvis=mean,PeEvisUnc=mean_err);
00063         wrt.Write(erc)
00064 
00065         seqno = wrt.Close();
00066         logging.info("Wrote seqno %d with PeEvis=%f" % (seqno, mean))

Member Data Documentation

Definition at line 22 of file DBUploader.py.

Definition at line 22 of file DBUploader.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:55:35 for ESCalibSPN by doxygen 1.7.4