16 fs_->
file().SetCompressionSettings(compSettings);
19 std::map<std::string, LEAFTYPE> leafmap;
20 leafmap[
"bool"] =
BOOL;
22 leafmap[
"short int"] =
SHORT;
24 leafmap[
"ushort int"] =
U_SHORT;
27 leafmap[
"ints"] =
INT_V;
28 leafmap[
"uint"] =
U_INT;
30 leafmap[
"float"] =
FLOAT;
32 leafmap[
"double"] =
DOUBLE;
34 leafmap[
"lint"] =
LONG;
38 leafmap[
"char"] =
CHAR;
47 productSelector_.
initialize(productSelectorRules_, allBranches);
49 std::set<std::string> branchnames;
51 for (
auto const&
selection : allBranches) {
54 if (branchnames.find(
selection->productInstanceName()) != branchnames.end()) {
56 <<
"More than one branch named: " <<
selection->productInstanceName() << std::endl
57 <<
"Exception thrown from ShallowTree::ShallowTree" << std::endl;
59 branchnames.insert(
selection->productInstanceName());
86 eat<std::vector<unsigned int> >(
selection);
102 eat<std::vector<unsigned short> >(
selection);
134 eat<std::vector<unsigned long> >(
selection);
150 eat<std::vector<unsigned char> >(
selection);
154 typedef std::pair<std::string, LEAFTYPE> pair_t;
155 for (
const auto& leaf : leafmap) {
156 leafstring +=
"\t" + leaf.first +
"\n";
160 <<
"class ShallowTree does not handle leaves of type " <<
selection->className() <<
" like\n" 163 <<
"Valid leaf types are (friendlyClassName):\n" 164 << leafstring <<
"Exception thrown from ShallowTree::ShallowTree\n";
173 connector->connect(
iEvent);
181 iEvent.getByLabel(
ml, pin, handle_);
static const std::string kSharedResource
std::vector< BranchDescription const * > allBranchDescriptions() const
TypedBranchConnector(edm::BranchDescription const *, std::string, TTree *)
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const *> const &branchDescriptions)
void analyze(const edm::Event &, const edm::EventSetup &) override
T getUntrackedParameter(std::string const &, T const &) const
U second(std::pair< T, U > const &p)
edm::Service< TFileService > fs_
bool selected(BranchDescription const &desc) const
ShallowTree(const edm::ParameterSet &iConfig)
void connect(const edm::Event &) override
T * make(const Args &...args) const
make new ROOT object
std::vector< BranchConnector * > connectors_
TFile & file() const
return opened TFile