1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#ifndef PIXELPOPCONSOURCEHANDLER_H
#define PIXELPOPCONSOURCEHANDLER_H
// Package: CondTools/SiPixel
// Class: PixelPopConSourceHandler
/** \class PixelPopConSourceHandler PixelPopConSourceHandler.cc CondTools/SiPixel/src/PixelPopConSourceHandler.cc
Description: PopCon source handler base class for all pixel popcon applications
Implementation:
<Notes on implementation>
*/
//
// Original Author: Michael Eads
// Created: 19 Apr 2008
//
//
#include "CondCore/PopCon/interface/PopConSourceHandler.h"
#include <string>
#include <iostream>
#include "FWCore/ParameterSet/interface/ParameterSet.h"
template <class T>
class PixelPopConSourceHandler : public popcon::PopConSourceHandler<T> {
public:
//PixelPopConSourceHandler(edm::ParameterSet const &) {;}
void getNewObjects() override {
// look at _connectString to see which method to call
if (_connectString.find("oracle") == 0)
getNewObjects_coral();
else if (_connectString.find("file") == 0)
getNewObjects_file();
else {
std::cout << " PixelPopConSourceHandler::getNewObjects() - unknown connect string:" << _connectString
<< std::endl;
std::cout << " connect string must begin with \"oracle\" or \"file\"" << std::endl;
}
} // virtual void getNewObjects()
virtual void getNewObjects_coral() { ; }
virtual void getNewObjects_file() { ; }
std::string id() const override { return std::string("PixelPopConSourceHandler"); }
protected:
std::string _connectString;
std::string _schemaName;
std::string _viewName;
std::string _configKeyName;
int _runNumber;
unsigned int _sinceIOV;
};
#endif
|