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