CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/CondTools/SiPixel/interface/PixelPopConSourceHandler.h

Go to the documentation of this file.
00001 #ifndef PIXELPOPCONSOURCEHANDLER_H
00002 #define PIXELPOPCONSOURCEHANDLER_H
00003 
00004 // Package: CondTools/SiPixel
00005 // Class: PixelPopConSourceHandler
00013 //
00014 // Original Author:  Michael Eads
00015 //         Created:  19 Apr 2008
00016 //
00017 //
00018 
00019 #include "CondCore/PopCon/interface/PopConSourceHandler.h"
00020 #include <string>
00021 #include <iostream>
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023 
00024 template <class T> 
00025 class PixelPopConSourceHandler : public popcon::PopConSourceHandler<T> {
00026 
00027  public:
00028   //PixelPopConSourceHandler(edm::ParameterSet const &) {;}
00029 
00030   virtual void getNewObjects() {
00031     // look at _connectString to see which method to call
00032     if (_connectString.find("oracle") == 0)
00033       getNewObjects_coral();
00034     else if (_connectString.find("file") == 0)
00035       getNewObjects_file();
00036     else {
00037       std::cout << "  PixelPopConSourceHandler::getNewObjects() - unknown connect string:" << _connectString << std::endl;
00038       std::cout << "    connect string must begin with \"oracle\" or \"file\"" << std::endl;
00039     }
00040     
00041   } // virtual void getNewObjects()
00042 
00043   virtual void getNewObjects_coral() {;}
00044   virtual void getNewObjects_file() {;}
00045   virtual std::string id() const {return std::string("PixelPopConSourceHandler");}
00046 
00047  protected:
00048   std::string _connectString;
00049   std::string _schemaName;
00050   std::string _viewName;
00051   std::string _configKeyName;
00052   int _runNumber;
00053   unsigned int _sinceIOV;
00054 
00055 };
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 #endif