/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 | Static Public Attributes
Scraper::adwphv::AdWpHvSource Class Reference

List of all members.

Public Member Functions

def alternate__init__
def __init__

Static Public Attributes

dictionary sitemap = { Site.kDayaBay:"DBNS", Site.kFar:"FARS", Site.kLingAo:"LANS" }

Detailed Description

Definition at line 32 of file adwphv.py.


Constructor & Destructor Documentation

def Scraper::adwphv::AdWpHvSource::__init__ (   self,
  srcdb 
)
:param srcdb: source DB instance of :py:class:`Scraper.base.DCS` 

List of source SA classes that map tables/joins in srcdb 
Current locations for 8 ADs - update when AD7/8 installed
Three sites for muon pmts: need to separate IWS and OWS!! 

Definition at line 52 of file adwphv.py.

00052                              :    
00053         """
00054         :param srcdb: source DB instance of :py:class:`Scraper.base.DCS` 
00055 
00056         List of source SA classes that map tables/joins in srcdb 
00057         Current locations for 8 ADs - update when AD7/8 installed
00058         Three sites for muon pmts: need to separate IWS and OWS!! 
00059         
00060         """
00061 
00062         #ETW 10/09/2012 Add AD7 & AD8
00063         #ETW 11/07/2012 Use AdLogicalPhysical instead of hardwired mapping
00064         #Note this code does not allow for changing AD positions - currently
00065         #no plans for that to happen, but if it did, would need to update
00066         #code.
00067         alp = AdLogicalPhysical()
00068 
00069         #AD1
00070         thissite, thissubsite = alp(1)
00071         thisksite = "k"+SiteAsString(thissite)
00072         thisksubsite = "kAD"+str(thissubsite)
00073         dtn = SourceContext(table="DBNS_AD1_HV_Vmon",ksite=thisksite,ksubsite=thisksubsite)
00074         self.append( srcdb.kls(dtn) )
00075 
00076         #AD2
00077         thissite, thissubsite = alp(2)
00078         thisksite = "k"+SiteAsString(thissite)
00079         thisksubsite = "kAD"+str(thissubsite)
00080         dtn = SourceContext(table="DBNS_AD2_HV_Vmon",ksite=thisksite,ksubsite=thisksubsite)
00081 
00082         #AD3
00083         thissite, thissubsite = alp(3)
00084         thisksite = "k"+SiteAsString(thissite)
00085         thisksubsite = "kAD"+str(thissubsite)
00086         self.append( srcdb.kls(dtn) )
00087         dtn = SourceContext(table="LANS_AD3_HV_Vmon",ksite=thisksite,ksubsite=thisksubsite)
00088         self.append( srcdb.kls(dtn) )
00089 
00090         #AD8
00091         thissite, thissubsite = alp(8)
00092         thisksite = "k"+SiteAsString(thissite)
00093         thisksubsite = "kAD"+str(thissubsite)        
00094         dtn = SourceContext(table="LANS_AD8_HV_Vmon",ksite=thisksite,ksubsite=thisksubsite)
00095         self.append( srcdb.kls(dtn) )
00096 
00097         #AD4
00098         thissite, thissubsite = alp(4)
00099         thisksite = "k"+SiteAsString(thissite)
00100         thisksubsite = "kAD"+str(thissubsite)        
00101         dtn = SourceContext(table="FARS_AD4_HV_Vmon",ksite=thisksite,ksubsite=thisksubsite)
00102         self.append( srcdb.kls(dtn) )
00103 
00104         #AD5
00105         thissite, thissubsite = alp(5)
00106         thisksite = "k"+SiteAsString(thissite)
00107         thisksubsite = "kAD"+str(thissubsite)        
00108         dtn = SourceContext(table="FARS_AD5_HV_Vmon",ksite=thisksite,ksubsite=thisksubsite)
00109         self.append( srcdb.kls(dtn) )
00110 
00111         #AD6
00112         thissite, thissubsite = alp(6)
00113         thisksite = "k"+SiteAsString(thissite)
00114         thisksubsite = "kAD"+str(thissubsite)        
00115         dtn = SourceContext(table="FARS_AD6_HV_Vmon",ksite=thisksite,ksubsite=thisksubsite)
00116         self.append( srcdb.kls(dtn) )
00117 
00118         #AD7
00119         thissite, thissubsite = alp(7)
00120         thisksite = "k"+SiteAsString(thissite)
00121         thisksubsite = "kAD"+str(thissubsite)        
00122         dtn = SourceContext(table="FARS_AD7_HV_Vmon",ksite=thisksite,ksubsite=thisksubsite)
00123         self.append( srcdb.kls(dtn) )
00124 
00125         #Water Pool
00126         dtn = SourceContext(name = "DBNS_MUON_IWS", table="DBNS_MUON_PMT_HV_Vmon",ksite="kDayaBay",ksubsite="kIWS")
00127         self.append(srcdb.kls(dtn) )
00128         dtn = SourceContext(name = "DBNS_MUON_OWS", table="DBNS_MUON_PMT_HV_Vmon",ksite="kDayaBay",ksubsite="kOWS")
00129         self.append(srcdb.kls(dtn) )
00130         dtn = SourceContext(name = "LANS_MUON_IWS", table="LANS_MUON_PMT_HV_Vmon",ksite="kLingAo",ksubsite="kIWS")
00131         self.append(srcdb.kls(dtn) )
00132         dtn = SourceContext(name = "LANS_MUON_OWS", table="LANS_MUON_PMT_HV_Vmon",ksite="kLingAo",ksubsite="kOWS")
00133         self.append(srcdb.kls(dtn) ) 
00134         dtn = SourceContext(name = "FARS_MUON_IWS", table="FARS_MUON_PMT_HV_Vmon",ksite="kFar",ksubsite="kIWS")
00135         self.append(srcdb.kls(dtn) )
00136         dtn = SourceContext(name = "FARS_MUON_OWS", table="FARS_MUON_PMT_HV_Vmon",ksite="kFar",ksubsite="kOWS")
00137         self.append(srcdb.kls(dtn) ) 
00138 
00139         

Member Function Documentation

def Scraper::adwphv::AdWpHvSource::alternate__init__ (   self)

Definition at line 35 of file adwphv.py.

00036                                :
00037         alp = AdLogicalPhysical()
00038         for site,subsite in sorted(alp,key=lambda _:alp[_]):
00039             phys = alp[(site,subsite)]
00040             table = "%s_AD%s_HV_Vmon" % ( self.sitemap[site] , phys )
00041             dtn = SourceContext(table=table,ksite=site,ksubsite=subsite)
00042             self.append( srcdb.kls(dtn) )
00043 
00044         #Water Pool
00045         for site in (Site.kDayaBay,Site.kLingAo,Site.kFar):
00046             for kxws in ("kIWS","kOWS"):
00047                 name = "%s_MUON_%s" % ( self.sitemap[site], kxws[1:] )
00048                 table = "%s_MUON_PMT_HV_Vmon"
00049                 dtn = SourceContext(name = name, table=table,ksite=site,ksubsite=kxws )
00050                 self.append(srcdb.kls(dtn) )
00051 


Member Data Documentation

dictionary Scraper::adwphv::AdWpHvSource::sitemap = { Site.kDayaBay:"DBNS", Site.kFar:"FARS", Site.kLingAo:"LANS" } [static]

Definition at line 34 of file adwphv.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:50:03 for Scraper by doxygen 1.7.4