13 connector->connect(iEvent);
31 : ml( desc->moduleLabel() ),
32 pin( desc->productInstanceName() )
44 std::map<std::string, LEAFTYPE> leafmap;
45 leafmap[
"bool"] =
BOOL; leafmap[
"bools"] =
BOOL_V;
46 leafmap[
"short int"] =
SHORT; leafmap[
"shorts"] =
SHORT_V;
48 leafmap[
"int"] =
INT; leafmap[
"ints"] =
INT_V;
52 leafmap[
"lint"] =
LONG; leafmap[
"longs"] =
LONG_V;
54 leafmap[
"char"] =
CHAR; leafmap[
"chars"] =
CHAR_V;
62 productSelector_.
initialize(productSelectorRules_, allBranches);
64 std::set<std::string> branchnames;
66 for(
auto const&
selection : allBranches) {
70 if (branchnames.find(
selection->productInstanceName()) != branchnames.end() ) {
72 <<
"More than one branch named: "
73 <<
selection->productInstanceName() << std::endl
74 <<
"Exception thrown from ShallowTree::beginJob" << std::endl;
77 branchnames.insert(
selection->productInstanceName() );
107 typedef std::pair<std::string, LEAFTYPE> pair_t;
108 for(
const pair_t&
leaf: leafmap) {
109 leafstring+=
"\t" +
leaf.first +
"\n";
113 <<
"class ShallowTree does not handle leaves of type " <<
selection->className() <<
" like\n"
116 <<
selection->productInstanceName() <<
"_"
118 <<
"Valid leaf types are (friendlyClassName):\n"
120 <<
"Exception thrown from ShallowTree::beginJob\n";
bool selected(BranchDescription const &desc) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
TypedBranchConnector(edm::BranchDescription const *, std::string, TTree *)
T * make(const Args &...args) const
make new ROOT object
U second(std::pair< T, U > const &p)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void connect(const edm::Event &)
edm::Service< TFileService > fs
std::vector< BranchConnector * > connectors
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
std::vector< BranchDescription const * > allBranchDescriptions() const