271 if (
arg.iConfig.exists(
"expr") &&
arg.iConfig.exists(
"index")){
273 index_=
arg.iConfig.getParameter<
unsigned int>(
"index");
276 std::stringstream ss;
277 ss<<
"on object at index: "<<index_<<
" of: "<<
srcTag_;
279 if (
arg.iConfig.exists(
"order")){
282 ss<<
" after sorting according to: "<<order;
285 if (
arg.iConfig.exists(
"selection")){
298 std::map<std::string, edm::Entry> indexEntry;
299 if (
arg.n.find(
"_N")!=std::string::npos){
301 std::vector<unsigned int> indexes =
arg.iConfig.getParameter<std::vector<unsigned int> >(
"indexes");
302 for (
unsigned int iI=0;iI!=indexes.size();++iI){
305 std::stringstream ss;
308 indexEntry.insert(std::make_pair(ss.str(),
e));
312 std::map< std::string, edm::Entry> varEntry;
313 if (
arg.n.find(
"_V")!=std::string::npos){
315 std::vector<std::string> vars =
arg.iConfig.getParameter<std::vector<std::string> >(
"vars");
316 for (
unsigned int v=0;
v!=vars.size();++
v){
317 unsigned int sep=vars[
v].find(
":");
322 varEntry.insert(std::make_pair(name,
e));
328 if (!varEntry.empty())
329 radical = radical.substr(0,radical.size()-2);
331 if (!indexEntry.empty())
332 radical = radical.substr(0,radical.size()-2);
334 if(varEntry.empty()){
336 for(std::map< std::string, edm::Entry>::iterator iIt=indexEntry.begin();iIt!=indexEntry.end();++iIt){
338 toUse.
insert(
true,
"index",iIt->second);
345 for (std::map< std::string, edm::Entry>::iterator vIt=varEntry.begin();vIt!=varEntry.end();++vIt){
346 if (indexEntry.empty()){
348 toUse.
insert(
true,
"expr",vIt->second);
354 for(std::map< std::string, edm::Entry>::iterator iIt=indexEntry.begin();iIt!=indexEntry.end();++iIt){
356 toUse.
insert(
true,
"expr",vIt->second);
357 toUse.
insert(
true,
"index",iIt->second);
358 std::string newVname = radical+iIt->first+vIt->first;
CachingVariable(std::string m, std::string n, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
StringCutObjectSelector< Object > * selector_
void insert(bool ok_to_replace, char const *, Entry const &)
StringObjectFunction< Object > * f_
void addDescriptionLine(const std::string &s)
edm::EDGetTokenT< edm::View< Object > > src_
StringObjectFunction< Object > * forder_
ExpressionVariable(const CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
const std::string & name() const