46 std::vector<std::string>
names = ps.getParameterNames();
47 for (std::vector<std::string>::iterator it=names.begin();it!= names.end();++it)
50 if (!pset.exists(
"type"))
continue;
53 std::vector<InputTag> tags=pset.getParameter<std::vector<InputTag> >(
"input");
56 if (
object==
"SimTrack") {
60 if (!tags.empty()) tag=tags[0];
63 produces<PCrossingFrame<SimTrack> >(
label);
64 consumes<std::vector<SimTrack>>(
tag);
65 LogInfo(
"MixingModule") <<
"Add PCrossingFrame<SimTrack> "<<
object<<
"s with InputTag= "<<tag.encode()<<
", label will be "<<
label;
69 else if (
object==
"SimVertex") {
73 if (!tags.empty()) tag=tags[0];
76 produces<PCrossingFrame<SimVertex> >(
label);
77 consumes<std::vector<SimVertex>>(
tag);
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 consumes<std::vector<PCaloHit>>(
tag);
95 LogInfo(
"MixingModule") <<
"Add PCrossingFrame<PCaloHit> "<<
object<<
"s with InputTag= "<<tag.encode()<<
", label will be "<<
label;
103 else if (
object==
"PSimHit"){
106 std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >(
"subdets");
107 for (
unsigned int ii=0;
ii<subdets.size();
ii++) {
109 if (tags.size()==1) tag=tags[0];
111 else if(tags.size()>1) tag=tags[
ii];
114 branchesActivate(TypeID(
typeid(std::vector<PSimHit>)).friendlyClassName(),subdets[
ii],tag,label);
115 produces<PCrossingFrame<PSimHit> >(
label);
116 consumes<std::vector<PSimHit>>(
tag);
117 LogInfo(
"MixingModule") <<
"Add PSimHitContainer "<<
object<<
"s with InputTag= "<<tag.encode()<<
", label will be "<<
label;
125 else if (
object==
"HepMCProduct"){
129 if (!tags.empty()) tag=tags[0];
133 produces<PCrossingFrame<edm::HepMCProduct> >(
label);
134 consumes<HepMCProduct>(
tag);
135 LogInfo(
"MixingModule") <<
"Add HepMCProduct "<<
object<<
"s with InputTag= "<<tag.encode()<<
", label will be "<<
label;
137 else LogWarning(
"MixingModule") <<
"You did not mix a type of object("<<
object<<
").";
std::vector< std::string > labCaloHit
const std::string names[nVars_]
std::vector< std::string > labSimHit
virtual void branchesActivate(const std::string &friendlyName, std::string subdet, InputTag &tag, std::string &label)
static const std::string subdets[7]