CMS 3D CMS Logo

popcon::RpcData Class Reference

#include <CondTools/RPC/src/RPCSourceHandler.h>

Inheritance diagram for popcon::RpcData:

popcon::PopConSourceHandler< RPCdbData >

List of all members.

Public Member Functions

void getNewObjects ()
std::string id () const
 RpcData (const edm::ParameterSet &pset)
 ~RpcData ()

Public Attributes

RPCdbDataIdata
RPCdbDataSdata
int snc
int tll
RPCdbDataVdata

Private Attributes

std::string m_name


Detailed Description

Definition at line 29 of file RPCSourceHandler.h.


Constructor & Destructor Documentation

popcon::RpcData::~RpcData (  ) 

Definition at line 19 of file RPCSourceHandler.cc.

00020 {
00021 }

popcon::RpcData::RpcData ( const edm::ParameterSet pset  ) 

Definition at line 15 of file RPCSourceHandler.cc.

00015                                                   :
00016   m_name(pset.getUntrackedParameter<std::string>("name","RpcData")){
00017 }


Member Function Documentation

void popcon::RpcData::getNewObjects (  )  [virtual]

Implements popcon::PopConSourceHandler< RPCdbData >.

Definition at line 23 of file RPCSourceHandler.cc.

References TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, RPCFw::createIMON(), RPCFw::createSTATUS(), RPCFw::createVMON(), lat::endl(), Idata, RPCdbData::Imon_rpc, cond::TagInfo::lastInterval, m_name, popcon::PopConSourceHandler< RPCdbData >::m_to_transfer, cond::TagInfo::name, Sdata, snc, RPCdbData::Status_rpc, popcon::PopConSourceHandler< RPCdbData >::tagInfo(), tll, TtoUT(), Vdata, and RPCdbData::Vmon_rpc.

00023                                   {
00024    std::cerr << "------- " << m_name 
00025              << " - > getNewObjects" << std::endl;
00026 
00027   //check whats already inside of database
00028   std::cerr<<"got offlineInfo"<<std::endl;
00029   std::cerr << tagInfo().name << " , last object valid since " 
00030             << tagInfo().lastInterval.first << std::endl;  
00031 
00032   coral::TimeStamp* time = new coral::TimeStamp;
00033   coral::TimeStamp now = time->now();
00034   int utime = TtoUT(now);
00035 
00036   snc = tagInfo().lastInterval.first;
00037   tll = utime;
00038 
00039   std::cout <<">> Time = "<<now.day()<<"/"<<now.month()<<"/"<<now.year()<<" "<<now.hour()<<":"<<now.minute()<<"."<<now.second()<< std::endl;
00040 
00041   std::cout << ">> UTime = " << utime << "--> IOV :: since = " << snc << " :: till = " << tll << std::endl;
00042       
00043 
00044   // RPCFw caen ( "oracle://devdb10/CMS_RPC_COMM_DATA", "CMS_RPC_COMM_DATA", "cms.rpcd4vide" ); // MyDB
00045   RPCFw caen ( "oracle://omds/RPC_CONDITION", "RPC_CONDITION", "take_data" ); // OMDS
00046   
00047   //  snc = 1163552461; // just for the first time
00048  
00049   std::vector<RPCdbData::Item> Icheck;
00050   std::vector<RPCdbData::Item> Vcheck;
00051   std::vector<RPCdbData::Item> Scheck;
00052   
00053   Icheck = caen.createIMON(snc);
00054   Vcheck = caen.createVMON(snc);
00055   Scheck = caen.createSTATUS(snc);
00056   
00057   // make an fill Imon object
00058   Idata = new RPCdbData();
00059   RPCdbData::Item Ifill;
00060   std::vector<RPCdbData::Item>::iterator Iit;
00061   for(Iit = Icheck.begin(); Iit != Icheck.end(); Iit++)
00062     {
00063       Ifill = *(Iit);
00064       Idata->Imon_rpc.push_back(Ifill);
00065     }
00066   std::cout << "Incoming object size: " << Icheck.size() << " >> Final object size: " << Idata->Imon_rpc.size() << std::endl;
00067 
00068 
00069   // make an fill Vmon object
00070   Vdata = new RPCdbData();
00071   RPCdbData::Item Vfill;
00072   std::vector<RPCdbData::Item>::iterator Vit;
00073   for(Vit = Vcheck.begin(); Vit != Vcheck.end(); Vit++)
00074   {
00075   Vfill = *(Vit);
00076   Vdata->Vmon_rpc.push_back(Vfill);
00077   }
00078   std::cout << "Incoming object size: " << Vcheck.size() << " >> Final object size: " << Vdata->Vmon_rpc.size() << std::endl;
00079 
00080 
00081   // make an fill Status object
00082   Sdata = new RPCdbData();
00083   RPCdbData::Item Sfill;
00084   std::vector<RPCdbData::Item>::iterator Sit;
00085   for(Sit = Scheck.begin(); Sit != Scheck.end(); Sit++)
00086   {
00087   Sfill = *(Sit);
00088   Sdata->Status_rpc.push_back(Sfill);
00089   }
00090   std::cout << "Incoming object size: " << Scheck.size() << " >> Final object size: " << Sdata->Status_rpc.size() << std::endl;
00091 
00092 
00093   m_to_transfer.push_back(std::make_pair((RPCdbData*)Idata,tll));
00094   //  m_to_transfer.push_back(std::make_pair((RPCdbData*)Vdata,snc));
00095   //  m_to_transfer.push_back(std::make_pair((RPCdbData*)Sdata,snc));
00096 
00097   std::cerr << "------- " << m_name << " - > getNewObjects" << std::endl;
00098   
00099 }

std::string popcon::RpcData::id ( void   )  const [inline, virtual]

Implements popcon::PopConSourceHandler< RPCdbData >.

Definition at line 32 of file RPCSourceHandler.h.

References m_name.

00032 { return m_name;}


Member Data Documentation

RPCdbData* popcon::RpcData::Idata

Definition at line 36 of file RPCSourceHandler.h.

Referenced by getNewObjects().

std::string popcon::RpcData::m_name [private]

Definition at line 43 of file RPCSourceHandler.h.

Referenced by getNewObjects(), and id().

RPCdbData* popcon::RpcData::Sdata

Definition at line 38 of file RPCSourceHandler.h.

Referenced by getNewObjects().

int popcon::RpcData::snc

Definition at line 40 of file RPCSourceHandler.h.

Referenced by getNewObjects().

int popcon::RpcData::tll

Definition at line 41 of file RPCSourceHandler.h.

Referenced by getNewObjects().

RPCdbData* popcon::RpcData::Vdata

Definition at line 37 of file RPCSourceHandler.h.

Referenced by getNewObjects().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:50:32 2009 for CMSSW by  doxygen 1.5.4