89{
90 int* pars = nullptr;
91
92
93 const char* dqmserver = m_conf->getconf("dqmserver", "nodename");
94 RFNSM_Status::Instance().set_flag(0);
95
96 b2nsm_sendreq(dqmserver, "RC_LOAD", 0, pars);
97 while (RFNSM_Status::Instance().get_flag() == 0) b2nsm_wait(1);
98 printf("ERecoMaster:: dqmserver configured\n");
99 sleep(2);
100
101
102 const char* distributor = m_conf->getconf("distributor", "nodename");
103 RFNSM_Status::Instance().set_flag(0);
104
105 b2nsm_sendreq(distributor, "RC_LOAD", 0, pars);
106 while (RFNSM_Status::Instance().get_flag() == 0) b2nsm_wait(1);
107 printf("ERecoMaster:: distributor configured\n");
108
109 sleep(2);
110
111
112 int maxnodes = m_conf->getconfi("processor", "nnodes");
113 int idbase = m_conf->getconfi("processor", "idbase");
114 const char* hostbase = m_conf->getconf("processor", "nodebase");
115 char* badlist = m_conf->getconf("processor", "badlist");
116
117 char hostnode[512], idname[3];
118 int nnodes = 0;
119 RFNSM_Status::Instance().set_flag(0);
120 for (int i = 0; i < maxnodes; i++) {
121 sprintf(idname, "%2.2d", idbase + i);
122 if (badlist == NULL ||
123 strstr(badlist, idname) == 0) {
124 sprintf(hostnode, "evp_%s%2.2d", hostbase, idbase + i);
125
126 b2nsm_sendreq(hostnode, "RC_LOAD", 0, pars);
127 nnodes++;
128 }
129 }
130 while (RFNSM_Status::Instance().get_flag() != nnodes) b2nsm_wait(1);
131
132 sleep(10);
133
134
135 const char* sampler = m_conf->getconf("eventsampler", "nodename");
136 RFNSM_Status::Instance().set_flag(0);
137
138 b2nsm_sendreq(sampler, "RC_LOAD", 0, pars);
139 while (RFNSM_Status::Instance().get_flag() == 0) b2nsm_wait(1);
140 printf("ERecoMaster:: sampler configured\n");
141
142 sleep(2);
143
144
145 printf("ERecoMaster:: event processors configured\n");
146
147 return 0;
148}