1 |
|
// $Id$ |
2 |
|
|
3 |
|
#include "MitProd/TreeFiller/interface/BaseFiller.h" |
4 |
+ |
#include <TSystem.h> |
5 |
+ |
#include <TError.h> |
6 |
|
|
7 |
|
using namespace std; |
8 |
|
using namespace edm; |
9 |
|
using namespace mithep; |
10 |
|
|
11 |
< |
//------------------------------------------------------------------------------------------------- |
12 |
< |
BaseFiller::BaseFiller(const ParameterSet &cfg, const char *en, const char *mn) : |
13 |
< |
config_(cfg), |
14 |
< |
edmName_(cfg.getUntrackedParameter<string>("edmName",en)), |
15 |
< |
mitName_(cfg.getUntrackedParameter<string>("mitName",mn)), |
14 |
< |
active_ (cfg.getUntrackedParameter<bool> ("active",true)) |
11 |
> |
//-------------------------------------------------------------------------------------------------- |
12 |
> |
BaseFiller::BaseFiller(const ParameterSet &cfg, const char *name, bool active) : |
13 |
> |
name_(name), |
14 |
> |
config_(cfg.exists(name) ? cfg.getUntrackedParameter<ParameterSet>(name) : ParameterSet()), |
15 |
> |
active_(config_.getUntrackedParameter<bool>("active",active)) |
16 |
|
{ |
17 |
|
} |
18 |
+ |
|
19 |
+ |
//-------------------------------------------------------------------------------------------------- |
20 |
+ |
void BaseFiller::PrintErrorAndExit(const char *msg) const |
21 |
+ |
{ |
22 |
+ |
Error("PrintErrorAndExit", msg); |
23 |
+ |
gSystem->Exit(1); |
24 |
+ |
} |