48 std::vector<std::string>
names = ps.getParameterNames();
49 for (std::vector<std::string>::iterator it=names.begin();it!= names.end();++it)
52 if (!pset.exists(
"type"))
continue;
55 std::vector<InputTag>
tags=pset.getParameter<std::vector<InputTag> >(
"input");
58 if (
object==
"SimTrack") {
62 if (tags.size()>0) tag=tags[0];
65 produces<PCrossingFrame<SimTrack> >(
label);
66 LogInfo(
"MixingModule") <<
"Add PCrossingFrame<SimTrack> "<<
object<<
"s with InputTag= "<<tag.encode()<<
", label will be "<<
label;
70 else if (
object==
"SimVertex") {
74 if (tags.size()>0) tag=tags[0];
77 produces<PCrossingFrame<SimVertex> >(
label);
78 LogInfo(
"MixingModule") <<
"Add SimVertexContainer "<<
object<<
"s with InputTag= "<<tag.encode()<<
", label will be "<<
label;
82 else if (
object==
"PCaloHit"){
85 std::vector<std::string>
subdets=pset.getParameter<std::vector<std::string> >(
"subdets");
86 for (
unsigned int ii=0;
ii<subdets.size();
ii++) {
88 if (tags.size()==1) tag=tags[0];
89 else if(tags.size()>1) tag=tags[
ii];
92 branchesActivate(TypeID(
typeid(std::vector<PCaloHit>)).friendlyClassName(),subdets[
ii],tag,label);
93 produces<PCrossingFrame<PCaloHit> >(
label);
94 LogInfo(
"MixingModule") <<
"Add PCrossingFrame<PCaloHit> "<<
object<<
"s with InputTag= "<<tag.encode()<<
", label will be "<<
label;
102 else if (
object==
"PSimHit"){
105 std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >(
"subdets");
106 for (
unsigned int ii=0;
ii<subdets.size();
ii++) {
108 if (tags.size()==1) tag=tags[0];
110 else if(tags.size()>1) tag=tags[
ii];
113 branchesActivate(TypeID(
typeid(std::vector<PSimHit>)).friendlyClassName(),subdets[
ii],tag,label);
114 produces<PCrossingFrame<PSimHit> >(
label);
115 LogInfo(
"MixingModule") <<
"Add PSimHitContainer "<<
object<<
"s with InputTag= "<<tag.encode()<<
", label will be "<<
label;
123 else if (
object==
"HepMCProduct"){
127 if (tags.size()>0) tag=tags[0];
131 produces<PCrossingFrame<edm::HepMCProduct> >(
label);
132 LogInfo(
"MixingModule") <<
"Add HepMCProduct "<<
object<<
"s with InputTag= "<<tag.encode()<<
", label will be "<<
label;
134 else LogWarning(
"MixingModule") <<
"You did not mix a type of object("<<
object<<
").";
static const HistoName names[]
std::vector< std::string > labCaloHit
std::vector< std::string > labSimHit
virtual void branchesActivate(const std::string &friendlyName, std::string subdet, InputTag &tag, std::string &label)
constexpr char const * subdets[11]