CMS 3D CMS Logo

Public Member Functions | Private Attributes

iovInspector::Iov Class Reference

List of all members.

Public Member Functions

def __init__
def comment
def list
def payLoad
def payloadClasses
def payloadSummaries
def revision
def summaries
def timestamp
def timetype
def trend
def trendinrange

Private Attributes

 __db
 __me
 __modName
 __tag

Detailed Description

Definition at line 58 of file iovInspector.py.


Constructor & Destructor Documentation

def iovInspector::Iov::__init__ (   self,
  db,
  tag,
  since = 0,
  till = 0,
  head = 0,
  tail = 0 
)

Definition at line 59 of file iovInspector.py.

00060                                                                     :
00061            self.__db = db
00062            self.__tag = tag
00063            self.__db.startReadOnlyTransaction()
00064            try : 
00065                self.__modName = str(db.payloadModules(tag)[0])
00066                Plug = __import__(self.__modName)
00067            except RuntimeError :
00068                self.__modName = 0
00069            self.__me = db.iov(tag)
00070            if (till) : self.__me.setRange(since,till)
00071            if (head) : self.__me.head(head)
00072            if (tail) : self.__me.tail(tail)
00073            self.__db.commitTransaction()


Member Function Documentation

def iovInspector::Iov::comment (   self)

Definition at line 144 of file iovInspector.py.

00145                         :
           return self.__me.comment()
def iovInspector::Iov::list (   self)

Definition at line 74 of file iovInspector.py.

00075                       :
00076            ret = []
00077            for elem in self.__me.elements :
00078                ret.append( (elem.payloadToken(), elem.since(), elem.till(),0))
00079            return ret
    
def iovInspector::Iov::payLoad (   self,
  since 
)

Definition at line 152 of file iovInspector.py.

00153                                :
00154            listOfIovElem= [iovElem for iovElem in self.__me.elements if iovElem.since() == since]
00155            IOVElem = listOfIovElem[0]
00156            self.__db.startReadOnlyTransaction()
00157            Plug = __import__(self.__modName)
00158            payload = Plug.Object(self.__db)
00159            payload.load(IOVElem)
00160            self.__db.commitTransaction()
00161            #print payload
00162            return payload
00163               
              
def iovInspector::Iov::payloadClasses (   self)

Definition at line 150 of file iovInspector.py.

00151                                :
           return list(self.__me.payloadClasses())
def iovInspector::Iov::payloadSummaries (   self)

Definition at line 80 of file iovInspector.py.

00081                                  :
00082            ret = []
00083            self.__db.startReadOnlyTransaction()
00084            Plug = __import__(self.__modName)
00085            payload = Plug.Object(self.__db)
00086            for elem in self.__me.elements:
00087               payloadtoken=elem.payloadToken()
00088               payload.load(elem)
00089               ret.append(payload.summary())
00090            self.__db.commitTransaction()
00091            return ret
           
def iovInspector::Iov::revision (   self)

Definition at line 146 of file iovInspector.py.

00147                          :
           return self.__me.revision()
def iovInspector::Iov::summaries (   self)

Definition at line 92 of file iovInspector.py.

00093                            :
00094            if (self.__modName==0) : return ["no plugin for "  + self.__tag+" no summaries"]
00095            self.__db.startReadOnlyTransaction()
00096            Plug = __import__(self.__modName)
00097            ret = []
00098            p = Plug.Object(self.__db)
00099            for elem in self.__me.elements :
00100                p.load(elem)
00101                ret.append( (elem.payloadToken(), elem.since(), elem.till(), p.summary()))
00102            self.__db.commitTransaction()
00103            return ret
           
def iovInspector::Iov::timestamp (   self)

Definition at line 148 of file iovInspector.py.

00149                           :
           return  CondDB.unpackTime(self.__me.timestamp())
def iovInspector::Iov::timetype (   self)

Definition at line 142 of file iovInspector.py.

00143                          :
           return  self.__me.timetype()
def iovInspector::Iov::trend (   self,
  what 
)

Definition at line 104 of file iovInspector.py.

00105                              :
00106            if (self.__modName==0) : return ["no plugin for "  + self.__tag+" no trend"]
00107            self.__db.startReadOnlyTransaction()
00108            Plug = __import__(self.__modName)
00109            ret = []
00110            w = setWhat(Plug.What(),what)
00111            ex = Plug.Extractor(w)
00112            p = Plug.Object(self.__db)
00113            for elem in self.__me.elements :
00114                p.load(elem)
00115                p.extract(ex)
00116                v = [i for i in ex.values()]
00117                ret.append((elem.since(),elem.till(),v))
00118            self.__db.commitTransaction()
00119            return ret
    
def iovInspector::Iov::trendinrange (   self,
  what,
  head,
  tail 
)
extract trend in the given range. the input parameters are in 64bit integer format. Users should pack the timestamp or lumiid before calling this method

Definition at line 120 of file iovInspector.py.

00121                                                 :
00122            '''extract trend in the given range. the input parameters are in 64bit integer format. Users should pack the timestamp or lumiid before calling this method
00123            '''
00124            if (self.__modName==0) : return ["no plugin for "  + self.__tag+" no trend"]
00125            self.__db.startReadOnlyTransaction()
00126            Plug = __import__(self.__modName)
00127            ret = []
00128            w = setWhat(Plug.What(),what)
00129            ex = Plug.Extractor(w)
00130 
00131            p = Plug.Object(self.__db)
00132            for elem in self.__me.elements :
00133                   since = elem.since()
00134                   till = elem.till()
00135                   if (head < since < tail) or (since < head < till) or (since < tail < till):
00136                          p.load(elem)
00137                          p.extract(ex)
00138                          v = [i for i in ex.values()]
00139                          ret.append((elem.since(),elem.till(),v))
00140            self.__db.commitTransaction()
00141            return ret
    

Member Data Documentation

Definition at line 59 of file iovInspector.py.

Definition at line 59 of file iovInspector.py.

Definition at line 59 of file iovInspector.py.

Definition at line 59 of file iovInspector.py.